Compare commits

...

18 commits

Author SHA1 Message Date
Flanks255 3f356896b7 Greenhouse glass recipe. 2024-03-09 11:41:37 -06:00
Mrbysco 53414c434a Add recipe click area for coffee machine and Powered Furnace 2024-03-09 18:02:33 +01:00
Mrbysco 0a6aa6545b Fix shift-clicking empty cups into coffee machine 2024-03-09 17:55:57 +01:00
Mrbysco fc20f4a94a Fix the Coffee Maker's tick behavior so it works 2024-03-09 17:51:33 +01:00
Mrbysco 09673dd118 Fix right clicking the coffee maker being wonky 2024-03-09 17:51:11 +01:00
Mrbysco d4cc7b0737 Fix the coffee effect displaying wrong due to setting the ticksPerSecond to 20 instead of 1 2024-03-09 17:49:20 +01:00
Mrbysco 56402e46eb Fix the coffee effect storing 2024-03-09 17:48:42 +01:00
Mrbysco ba64232ac1 Fix up FluidDisplay not using the tint color of a fluid 2024-03-09 17:04:07 +01:00
Mrbysco 53e4cb8a9b Change FluidDisplay to use the RenderSystem calls instead of GLStateManager where possible 2024-03-09 16:38:17 +01:00
Mrbysco 4a36c696ab Make getOverlayText return a Component in FluidDisplay 2024-03-09 16:36:47 +01:00
Mrbysco 83828a6def Re-enable the text rendering on the energy display
Make getOverlayText return a Component instead of Component -> getString -> Component.literal
2024-03-09 16:33:31 +01:00
Mrbysco f1c7b2491e Change the overlay checked so overlays aren't rendered over the hotbar 2024-03-09 16:31:10 +01:00
Mrbysco 951355bf05 Remove YummyItem which is a unused class for the foods that are removed
https://github.com/Ellpeck/ActuallyAdditions/blob/1.20.4/port.MD?plain=1#L25
2024-03-09 16:05:39 +01:00
Mrbysco f758e8beac Deprecate ActuallyItem and DrillAugmentItem
They both have replacements and are unused
2024-03-09 16:03:33 +01:00
Mrbysco 4b55999af3 Remove WIP from Powered Furnace name 2024-03-09 15:46:20 +01:00
Mrbysco 323c07568d Use the level and pos variable 2024-03-09 15:44:35 +01:00
Mrbysco 73f7af4dbf Fix the position of the auto split button in the Powered Furnace UI 2024-03-09 15:34:50 +01:00
Mrbysco bbf42da613 Remove todo from Powered Furnace light level code (it works) 2024-03-09 15:16:38 +01:00
19 changed files with 115 additions and 113 deletions

View file

@ -1,4 +1,4 @@
// 1.20.4 2024-03-08T16:41:19.1669609 Recipes
// 1.20.4 2024-03-09T11:39:13.7182875 Recipes
4d3128b37a7153882a9324cda49b5069207561c5 data/actuallyadditions/recipes/atomic_reconstructor.json
b0367f5012651764931e8b8fd0c5bcca4e8614c0 data/actuallyadditions/recipes/battery_box.json
fe704716268e01ca8aeeb92196d9f660b9e08640 data/actuallyadditions/recipes/black_quartz_brick_slab.json
@ -32,6 +32,7 @@ e2f9ec08306500d981cad22bc2cf7925712d08de data/actuallyadditions/recipes/fermenti
9c1e45adf3ad5ef64044ac111ef1ac2a57a498d0 data/actuallyadditions/recipes/firework_box.json
2391a543a2e43ff5b87234a71d9bd339f9fa3e9c data/actuallyadditions/recipes/fluid_collector.json
2614b2743071b86fd6d2cb92063c3e95a959e52c data/actuallyadditions/recipes/fluid_placer.json
f9fe1f2a3e4a73f9cfd4cda43a19f4730f3f6963 data/actuallyadditions/recipes/greenhouse_glass.json
ff81da8a0f6632779414c0512100696a11771814 data/actuallyadditions/recipes/hopping_item_interface.json
48d208a519aaa44547dbca19a57cc66e4e0ab46c data/actuallyadditions/recipes/iron_casing.json
5d0c6fc708579565c21e0992796ba6f403473ed7 data/actuallyadditions/recipes/item_interface.json

View file

@ -0,0 +1,24 @@
{
"type": "minecraft:crafting_shaped",
"category": "misc",
"key": {
"E": {
"item": "actuallyadditions:empowered_palis_crystal"
},
"G": {
"tag": "forge:glass"
},
"S": {
"tag": "minecraft:saplings"
}
},
"pattern": [
"GSG",
"SES",
"GSG"
],
"result": {
"count": 2,
"item": "actuallyadditions:greenhouse_glass"
}
}

View file

@ -314,7 +314,13 @@ public class BlockRecipeGenerator extends RecipeProvider {
.define('I', ActuallyBlocks.IRON_CASING.getItem())
.save(recipeOutput);
// Greenhouse glass
Recipe.shaped(ActuallyBlocks.GREENHOUSE_GLASS.getItem(), 2)
.pattern("GSG", "SES", "GSG")
.define('G', Tags.Items.GLASS)
.define('S', ItemTags.SAPLINGS)
.define('E', ActuallyItems.EMPOWERED_PALIS_CRYSTAL)
.save(recipeOutput);
}
public static class Recipe {

View file

@ -35,16 +35,17 @@ public class BlockCoffeeMachine extends DirectionalBlock.Container {
@Override
public InteractionResult use(BlockState state, Level world, BlockPos pos, Player player, InteractionHand hand, BlockHitResult hit) {
if (!world.isClientSide) {
if (world.isClientSide) {
return InteractionResult.SUCCESS;
} else {
TileEntityCoffeeMachine tile = (TileEntityCoffeeMachine) world.getBlockEntity(pos);
if (tile != null) {
if (!this.tryUseItemOnTank(player, hand, tile.tank)) {
player.openMenu(tile, pos);
}
}
return InteractionResult.PASS;
return InteractionResult.CONSUME;
}
return super.use(state, world, pos, player, hand, hit);
}
@Nullable

View file

@ -45,7 +45,6 @@ import static net.minecraft.world.level.block.state.properties.BlockStatePropert
public class BlockPoweredFurnace extends DirectionalBlock.Container {
public BlockPoweredFurnace() {
// TODO: [port] confirm this is correct for light level... Might not be reactive.
super(ActuallyBlocks.defaultPickProps().randomTicks().lightLevel(state -> state.getValue(LIT)
? 12
: 0));

View file

@ -165,7 +165,7 @@ public class ClientEvents {
@SubscribeEvent
public void onGameOverlay(RenderGuiOverlayEvent.Post event) {
Minecraft minecraft = Minecraft.getInstance();
if (event.getOverlay() == GuiOverlayManager.findOverlay(new ResourceLocation("crosshair")) && minecraft.screen == null) { //ALL
if (event.getOverlay() == GuiOverlayManager.findOverlay(new ResourceLocation("portal")) && minecraft.screen == null) { //ALL
GuiGraphics guiGraphics = event.getGuiGraphics();
Player player = minecraft.player;
if (player == null) {
@ -202,7 +202,7 @@ public class ClientEvents {
if (!stack.isEmpty() && stack.getItem() == CommonConfig.Other.redstoneConfigureItem) {
expl = ChatFormatting.GREEN + I18n.get("info." + ActuallyAdditions.MODID + ".redstoneMode.validItem");
} else {
expl = ChatFormatting.GRAY.toString() + ChatFormatting.ITALIC + I18n.get("info." + ActuallyAdditions.MODID + ".redstoneMode.invalidItem", I18n.get(CommonConfig.Other.redstoneConfigureItem.asItem().getDescriptionId()));
expl = ChatFormatting.GRAY.toString() + ChatFormatting.ITALIC + I18n.get("info." + ActuallyAdditions.MODID + ".redstoneMode.invalidItem", I18n.get(CommonConfig.Other.redstoneConfigureItem.asItem().getDescriptionId()));
}
guiGraphics.drawString(font, expl, (int) (event.getWindow().getGuiScaledWidth() / 2f + 5), (int) (event.getWindow().getGuiScaledHeight() / 2f + 15), 0xFFFFFF);
}

View file

@ -81,7 +81,7 @@ public class ContainerCoffeeMachine extends AbstractContainerMenu {
//Other Slots in Inventory excluded
else if (slot >= inventoryStart) {
//Shift from Inventory
if (newStack.getItem() == ActuallyItems.COFFEE_CUP.get()) {
if (newStack.getItem() == ActuallyItems.EMPTY_CUP.get()) {
if (!this.moveItemStackTo(newStack, TileEntityCoffeeMachine.SLOT_INPUT, TileEntityCoffeeMachine.SLOT_INPUT + 1, false)) {
return ItemStack.EMPTY;
}

View file

@ -71,7 +71,7 @@ public class EnergyDisplay {
}
if (this.drawTextNextTo) {
//this.drawString(mc.font, this.getOverlayText(), barX + 25, barY + 78, StringUtil.DECIMAL_COLOR_WHITE);
guiGraphics.drawString(mc.font, this.getOverlayText(), barX + 25, barY + 78, 0xFFFFFF);
}
}
@ -80,8 +80,8 @@ public class EnergyDisplay {
Minecraft mc = Minecraft.getInstance();
List<Component> text = new ArrayList<>();
text.add(Component.literal(this.getOverlayText()));
guiGraphics.renderComponentTooltip(mc.font, text, mouseX, mouseY); //TODO: Check if this is correct, used to call GuiUtils.drawHoveringText
text.add(this.getOverlayText());
guiGraphics.renderComponentTooltip(mc.font, text, mouseX, mouseY);
}
}
@ -93,11 +93,10 @@ public class EnergyDisplay {
: 85);
}
private String getOverlayText() {
private Component getOverlayText() {
NumberFormat format = NumberFormat.getInstance();
return Component.translatable("misc.actuallyadditions.power_long",
format.format(this.rfReference.getEnergyStored()),
format.format(this.rfReference.getMaxEnergyStored()))
.getString();
format.format(this.rfReference.getMaxEnergyStored()));
}
}

View file

@ -10,12 +10,13 @@
package de.ellpeck.actuallyadditions.mod.inventory.gui;
import com.mojang.blaze3d.platform.GlStateManager;
import com.mojang.blaze3d.systems.RenderSystem;
import de.ellpeck.actuallyadditions.mod.util.AssetUtil;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.GuiGraphics;
import net.minecraft.network.chat.Component;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.util.FastColor;
import net.minecraft.world.level.material.Fluid;
import net.neoforged.api.distmarker.Dist;
import net.neoforged.api.distmarker.OnlyIn;
@ -88,29 +89,35 @@ public class FluidDisplay {
FluidStack stack = this.fluidReference.getFluid();
Fluid fluid = stack.getFluid();
if (this.resLoc == null || this.oldFluid != stack.getFluid()) {
this.oldFluid = stack.getFluid();
if (stack != null && !stack.isEmpty() && fluid != null) {
IClientFluidTypeExtensions fluidTypeExtension = IClientFluidTypeExtensions.of(fluid);
int color = fluidTypeExtension.getTintColor(stack);
float red = (float)(FastColor.ARGB32.red(color) / 255.0);
float green = (float)(FastColor.ARGB32.green(color) / 255.0);
float blue = (float)(FastColor.ARGB32.blue(color) / 255.0);
float alpha = (float)(FastColor.ARGB32.alpha(color) / 255.0);
if (fluid != null && IClientFluidTypeExtensions.of(fluid).getStillTexture() != null) {
this.resLoc = new ResourceLocation(IClientFluidTypeExtensions.of(fluid).getStillTexture().getNamespace(), "textures/" + IClientFluidTypeExtensions.of(fluid).getStillTexture().getPath() + ".png");
if (this.resLoc == null || this.oldFluid != stack.getFluid()) {
this.oldFluid = stack.getFluid();
if (fluidTypeExtension.getStillTexture() != null) {
this.resLoc = new ResourceLocation(fluidTypeExtension.getStillTexture().getNamespace(), "textures/" + IClientFluidTypeExtensions.of(fluid).getStillTexture().getPath() + ".png");
}
}
}
if (stack != null && fluid != null && this.resLoc != null) {
// GlStateManager._pushMatrix();
GlStateManager._enableBlend();
// GlStateManager._disableAlphaTest();
GlStateManager._blendFuncSeparate(770, 771, 1, 0);
int i = this.fluidReference.getFluid().getAmount() * 83 / this.fluidReference.getCapacity();
guiGraphics.blit(this.resLoc, barX + 1, barY + 84 - i, 0, 0, 16, i, 16, 512);
//drawModalRectWithCustomSizedTexture(barX + 1, barY + 84 - i, 36, 172, 16, i, 16, 512);
GlStateManager._disableBlend();
// GlStateManager._enableAlphaTest();
// GlStateManager._popMatrix();
}
if (this.resLoc != null) {
RenderSystem.setShaderColor(red, green, blue, alpha);
RenderSystem.enableBlend();
RenderSystem.blendFuncSeparate(770, 771, 1, 0);
int i = this.fluidReference.getFluid().getAmount() * 83 / this.fluidReference.getCapacity();
guiGraphics.blit(this.resLoc, barX + 1, barY + 84 - i, 0, 0, 16, i, 16, 512);
RenderSystem.disableBlend();
RenderSystem.setShaderColor(1.0F, 1.0F, 1.0F, 1.0F);
}
if (this.drawTextNextTo) {
guiGraphics.drawString(mc.font, Component.literal(this.getOverlayText()), barX + 25, barY + 78, 0xFFFFFF, false);
if (this.drawTextNextTo) {
guiGraphics.drawString(mc.font, this.getOverlayText(), barX + 25, barY + 78, 0xFFFFFF, false);
}
}
}
@ -121,17 +128,17 @@ public class FluidDisplay {
? 93
: 85)) {
Minecraft mc = Minecraft.getInstance();
guiGraphics.renderComponentTooltip(mc.font, Collections.singletonList(Component.literal(this.getOverlayText())), mouseX, mouseY); //TODO: Check if this is correct, used to call GuiUtils.drawHoveringText
guiGraphics.renderComponentTooltip(mc.font, Collections.singletonList(this.getOverlayText()), mouseX, mouseY);
}
}
private String getOverlayText() {
private Component getOverlayText() {
NumberFormat format = NumberFormat.getInstance();
FluidStack stack = this.fluidReference.getFluid();
String cap = format.format(this.fluidReference.getCapacity());
return stack.isEmpty()
? "0/" + cap + " mB"
: format.format(this.fluidReference.getFluidAmount()) + (drawCapacityInTooltip?"/" + cap + " mB ":" mB ") + stack.getDisplayName().getString();
? Component.literal("0/" + cap + " mB")
: Component.literal(format.format(this.fluidReference.getFluidAmount()) + (drawCapacityInTooltip?"/" + cap + " mB ":" mB ")).append(stack.getDisplayName());
}
public static class DummyTank implements IFluidTank {

View file

@ -61,7 +61,7 @@ public class GuiFurnaceDouble extends AAScreen<ContainerFurnaceDouble> {
super.init();
this.energy = new EnergyDisplay(this.leftPos + 27, this.topPos + 5, this.tileFurnace.storage);
this.buttonAutoSplit = Button.builder(Component.literal("S"), (button) -> PacketHandlerHelper.sendButtonPacket(this.tileFurnace, 0))
.bounds(this.leftPos + 27, this.topPos + 5, 16, 16).build();
.bounds(this.getGuiLeft(), 30, 16, 16).build();
buttonAutoSplit.setFGColor(this.tileFurnace.isAutoSplit ? ChatFormatting.DARK_GREEN.getColor() : ChatFormatting.RED.getColor());
this.addRenderableWidget(this.buttonAutoSplit);
}

View file

@ -105,7 +105,7 @@ public class ItemCoffee extends ItemBase {
if (effects != null) {
for (MobEffectInstance effect : effects) {
tooltip.add(Component.translatable(effect.getDescriptionId())
.append(" " + (effect.getAmplifier() + 1) + ", " + StringUtil.formatTickDuration(effect.getDuration(), 20))
.append(" " + (effect.getAmplifier() + 1) + ", " + StringUtil.formatTickDuration(effect.getDuration(), 1))
.withStyle(ChatFormatting.GRAY));
}
} else {

View file

@ -6,6 +6,8 @@ import net.minecraft.world.item.Item;
* I'm using a custom class here as I'm sure we'll need a unified way of declaring rules
* but also so we can always know if something is ours in the simplest form.
*/
// Superseded by ItemBase
@Deprecated
public abstract class ActuallyItem extends Item implements IActuallyItem {
public ActuallyItem(Properties properties) {
super(properties);

View file

@ -3,6 +3,8 @@ package de.ellpeck.actuallyadditions.mod.items.misc;
import de.ellpeck.actuallyadditions.mod.items.base.ActuallyItem;
// Superseded by ItemDrillUpgrade
@Deprecated
public class DrillAugmentItem extends ActuallyItem {
private final AugmentType type;

View file

@ -1,59 +0,0 @@
package de.ellpeck.actuallyadditions.mod.items.misc;
import de.ellpeck.actuallyadditions.mod.items.base.ActuallyItem;
import net.minecraft.world.food.FoodProperties;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.item.Items;
public class YummyItem extends ActuallyItem {
private final Foods food;
public YummyItem(Foods food) {
super(baseProps().food(food.food));
this.food = food;
}
public enum Foods {
CHEESE(new FoodProperties.Builder().nutrition(1).saturationMod(0.05F), 3),
PUMPKIN_STEW(new FoodProperties.Builder().nutrition(6).saturationMod(0.3F), 30, true, new ItemStack(Items.BOWL)),
CARROT_JUICE(new FoodProperties.Builder().nutrition(4).saturationMod(0.2F), 20, true, new ItemStack(Items.GLASS_BOTTLE)),
FRENCH_FRY(new FoodProperties.Builder().nutrition(2).saturationMod(0.025F), 3),
SPAGHETTI(new FoodProperties.Builder().nutrition(7).saturationMod(0.4F), 38, new ItemStack(Items.BOWL)),
NOODLE(new FoodProperties.Builder().nutrition(1).saturationMod(0.01F), 3),
CHOCOLATE_CAKE(new FoodProperties.Builder().nutrition(16).saturationMod(0.8F), 45),
CHOCOLATE(new FoodProperties.Builder().nutrition(3).saturationMod(0.3F), 15),
TOAST(new FoodProperties.Builder().nutrition(3).saturationMod(0.08F), 25),
SUBMARINE_SANDWICH(new FoodProperties.Builder().nutrition(9).saturationMod(0.4F), 40),
BIG_COOKIE(new FoodProperties.Builder().nutrition(4).saturationMod(0.25F), 20),
HAMBURGER(new FoodProperties.Builder().nutrition(13).saturationMod(0.65F), 40),
PIZZA(new FoodProperties.Builder().nutrition(16).saturationMod(0.8F), 45),
BAGUETTE(new FoodProperties.Builder().nutrition(6).saturationMod(0.5F), 25),
RICE(new FoodProperties.Builder().nutrition(2).saturationMod(0.05F), 10),
RICE_BREAD(new FoodProperties.Builder().nutrition(6).saturationMod(0.5F), 25),
DOUGHNUT(new FoodProperties.Builder().nutrition(2).saturationMod(0.1F), 10),
CHOCOLATE_TOAST(new FoodProperties.Builder().nutrition(5).saturationMod(0.2F), 40),
BACON(new FoodProperties.Builder().nutrition(4).saturationMod(0.1F), 30);
FoodProperties food;
int useDuration;
boolean isDrunken;
ItemStack returnItem;
Foods(FoodProperties.Builder food, int useDuration, boolean isDrunken, ItemStack returnItem) {
this.food = food.build();
this.useDuration = useDuration;
this.isDrunken = isDrunken;
this.returnItem = returnItem;
}
Foods(FoodProperties.Builder food, int useDuration) {
this(food, useDuration, false, ItemStack.EMPTY);
}
Foods(FoodProperties.Builder food, int useDuration, ItemStack returnItem) {
this(food, useDuration, false, returnItem);
}
}
}

View file

@ -17,6 +17,8 @@ import de.ellpeck.actuallyadditions.mod.crafting.CoffeeIngredientRecipe;
import de.ellpeck.actuallyadditions.mod.crafting.EmpowererRecipe;
import de.ellpeck.actuallyadditions.mod.crafting.FermentingRecipe;
import de.ellpeck.actuallyadditions.mod.crafting.LaserRecipe;
import de.ellpeck.actuallyadditions.mod.inventory.gui.GuiCoffeeMachine;
import de.ellpeck.actuallyadditions.mod.inventory.gui.GuiFurnaceDouble;
import de.ellpeck.actuallyadditions.mod.items.ActuallyItems;
import de.ellpeck.actuallyadditions.mod.jei.coffee.CoffeeMachineCategory;
import de.ellpeck.actuallyadditions.mod.jei.empowerer.EmpowererRecipeCategory;
@ -27,6 +29,7 @@ import mezz.jei.api.JeiPlugin;
import mezz.jei.api.constants.RecipeTypes;
import mezz.jei.api.helpers.IJeiHelpers;
import mezz.jei.api.recipe.RecipeType;
import mezz.jei.api.registration.IGuiHandlerRegistration;
import mezz.jei.api.registration.IRecipeCatalystRegistration;
import mezz.jei.api.registration.IRecipeCategoryRegistration;
import mezz.jei.api.registration.IRecipeRegistration;
@ -88,7 +91,13 @@ public class JEIActuallyAdditionsPlugin implements IModPlugin {
//registry.addRecipes(ActuallyAdditionsAPI.CRUSHER_RECIPES, CrusherRecipeCategory.NAME);
}
// @Override
@Override
public void registerGuiHandlers(IGuiHandlerRegistration registration) {
registration.addRecipeClickArea(GuiCoffeeMachine.class, 53, 42, 22, 16, COFFEE_MACHINE);
registration.addRecipeClickArea(GuiFurnaceDouble.class, 51, 40, 74, 22, RecipeTypes.SMELTING);
}
// @Override
// public void register(IModRegistry registry) {
// IJeiHelpers helpers = registry.getJeiHelpers();
//

View file

@ -14,6 +14,7 @@ import de.ellpeck.actuallyadditions.api.internal.IAtomicReconstructor;
import de.ellpeck.actuallyadditions.api.internal.IMethodHandler;
import de.ellpeck.actuallyadditions.api.lens.Lens;
import de.ellpeck.actuallyadditions.api.recipe.CoffeeIngredient;
import de.ellpeck.actuallyadditions.mod.ActuallyAdditions;
import de.ellpeck.actuallyadditions.mod.blocks.BlockLaserRelay;
import de.ellpeck.actuallyadditions.mod.crafting.CoffeeIngredientRecipe;
import de.ellpeck.actuallyadditions.mod.crafting.LaserRecipe;
@ -24,7 +25,10 @@ import net.minecraft.core.Direction;
import net.minecraft.core.Vec3i;
import net.minecraft.core.registries.BuiltInRegistries;
import net.minecraft.nbt.CompoundTag;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.world.effect.MobEffect;
import net.minecraft.world.effect.MobEffectInstance;
import net.minecraft.world.effect.MobEffects;
import net.minecraft.world.entity.item.ItemEntity;
import net.minecraft.world.item.BlockItem;
import net.minecraft.world.item.ItemStack;
@ -123,7 +127,7 @@ public class MethodHandler implements IMethodHandler {
int prevCounter = tag.getInt("Counter");
CompoundTag compound = new CompoundTag();
//compound.putInt("ID", Potion.getIdFromPotion(effect.getEffect())); //TODO ?!
compound.putString("ID", BuiltInRegistries.MOB_EFFECT.getKey(effect.getEffect()).toString());
compound.putInt("Duration", effect.getDuration());
compound.putInt("Amplifier", effect.getAmplifier());
@ -140,13 +144,20 @@ public class MethodHandler implements IMethodHandler {
CompoundTag tag = stack.getOrCreateTag();
int counter = tag.getInt("Counter");
while (counter > 0) {
CompoundTag compound = (CompoundTag) tag.get(counter + "");
MobEffectInstance effect = new MobEffectInstance(BuiltInRegistries.MOB_EFFECT.byId(compound.getInt("ID")), compound.getInt("Duration"), compound.getByte("Amplifier"));
effects.add(effect);
CompoundTag compound = tag.getCompound(counter + "");
String id = compound.getString("ID");
ResourceLocation effectID = id.isEmpty() ? new ResourceLocation("speed") : ResourceLocation.tryParse(id);
MobEffect effect = BuiltInRegistries.MOB_EFFECT.get(effectID);
if (effect == null) {
ActuallyAdditions.LOGGER.error("Unable to find effect with ID: {}, defaulting to speed", effectID);
effect = MobEffects.MOVEMENT_SPEED;
}
MobEffectInstance effectInstance = new MobEffectInstance(effect, compound.getInt("Duration"), compound.getByte("Amplifier"));
effects.add(effectInstance);
counter--;
}
return effects.size() > 0
? effects.toArray(new MobEffectInstance[effects.size()])
return !effects.isEmpty()
? effects.toArray(new MobEffectInstance[0])
: null;
}

View file

@ -183,7 +183,7 @@ public class TileEntityCoffeeMachine extends TileEntityInventoryBase implements
}
ItemStack input = this.inv.getStackInSlot(SLOT_INPUT);
if (StackUtil.isValid(input) && input.getItem() == ActuallyItems.COFFEE_CUP.get() && !StackUtil.isValid(this.inv.getStackInSlot(SLOT_OUTPUT)) && this.coffeeCacheAmount >= CACHE_USE && this.tank.getFluid().getFluid() == Fluids.WATER && this.tank.getFluidAmount() >= WATER_USE) {
if (!input.isEmpty() && input.is(ActuallyItems.EMPTY_CUP) && this.inv.getStackInSlot(SLOT_OUTPUT).isEmpty() && this.coffeeCacheAmount >= CACHE_USE && this.tank.getFluid().getFluid() == Fluids.WATER && this.tank.getFluidAmount() >= WATER_USE) {
if (this.storage.getEnergyStored() >= ENERGY_USED) {
if (this.brewTime % 30 == 0) {
this.level.playSound(null, this.getBlockPos().getX(), this.getBlockPos().getY(), this.getBlockPos().getZ(), AASounds.COFFEE_MACHINE.get(), SoundSource.BLOCKS, 0.1F, 1.0F);
@ -193,7 +193,7 @@ public class TileEntityCoffeeMachine extends TileEntityInventoryBase implements
this.storage.extractEnergyInternal(ENERGY_USED, false);
if (this.brewTime >= TIME_USED) {
this.brewTime = 0;
ItemStack output = new ItemStack(ActuallyItems.COFFEE_BEANS.get());
ItemStack output = new ItemStack(ActuallyItems.COFFEE_CUP.get());
for (int i = 3; i < this.inv.getSlots(); i++) {
if (StackUtil.isValid(this.inv.getStackInSlot(i))) {
RecipeHolder<CoffeeIngredientRecipe> recipeHolder = ItemCoffee.getIngredientRecipeFromStack(this.inv.getStackInSlot(i));

View file

@ -174,7 +174,7 @@ public class TileEntityPoweredFurnace extends TileEntityInventoryBase implements
}
if (changeTo != current) {
tile.level.setBlock(tile.worldPosition, state.setValue(BlockStateProperties.LIT, changeTo), Block.UPDATE_ALL);
level.setBlock(pos, state.setValue(BlockStateProperties.LIT, changeTo), Block.UPDATE_ALL);
}
tile.lastSmelted = smelted;

View file

@ -108,7 +108,7 @@
"block.actuallyadditions.feeder": "Automatic Feeder (wip)",
"block.actuallyadditions.crusher": "Crusher (wip)",
"block.actuallyadditions.crusher_double": "Double Crusher (wip)",
"block.actuallyadditions.powered_furnace": "Powered Furnace (wip)",
"block.actuallyadditions.powered_furnace": "Powered Furnace",
"block.actuallyadditions.fishing_net": "Fishing Net (wip)",
"block.actuallyadditions.heat_collector": "Heat Collector (wip)",
"block.actuallyadditions.item_repairer": "Item Repairer (wip)",
@ -168,7 +168,7 @@
"block.actuallyadditions.dropper": "Automatic Precision Dropper",
"block.actuallyadditions.ender_casing": "Ender Casing",
"block.actuallyadditions.flax": "Flax Plant",
"block.actuallyadditions.coffee_machine": "Coffee Maker (wip)",
"block.actuallyadditions.coffee_machine": "Coffee Maker",
"block.actuallyadditions.xp_solidifier": "Experience Solidifier (wip)",
"block.actuallyadditions.leaf_generator": "Leaf-Eating Generator (wip)",
"block.actuallyadditions.long_range_breaker": "Long-Range Breaker (wip)",
@ -301,7 +301,7 @@
"item.actuallyadditions.netherite_aiot": "Netherite AIOT (wip)",
"item.actuallyadditions.phantom_connector": "Phantom Connector (wip)",
"item.actuallyadditions.empty_cup": "Empty Cup",
"item.actuallyadditions.coffee_cup": "Cup with Coffee (wip)",
"item.actuallyadditions.coffee_cup": "Cup with Coffee",
"item.actuallyadditions.coffee_seeds": "Coffee Seeds",
"item.actuallyadditions.coffee_beans": "Coffee Beans (wip)",
"item.actuallyadditions.canola_seeds": "Canola Seeds",