From fc75b13b868f06efb38c87c1bb8780dfe564cf6f Mon Sep 17 00:00:00 2001 From: Mrbysco Date: Tue, 12 Mar 2024 17:00:02 +0100 Subject: [PATCH] Bio Reactor works :) --- .../actuallyadditions/mod/inventory/gui/GuiBioReactor.java | 6 +++--- .../actuallyadditions/mod/tile/TileEntityBioReactor.java | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiBioReactor.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiBioReactor.java index 7ac2ce511..577a93a1e 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiBioReactor.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiBioReactor.java @@ -44,7 +44,7 @@ public class GuiBioReactor extends AAScreen { @Override public void render(@Nonnull GuiGraphics guiGraphics, int mouseX, int mouseY, float partialTicks) { super.render(guiGraphics, mouseX, mouseY, partialTicks); - //this.energy.render(mouseX, mouseY); + this.energy.render(guiGraphics, mouseX, mouseY); } @Override @@ -61,9 +61,9 @@ public class GuiBioReactor extends AAScreen { } if (this.tile.producePerTick > 0) { - guiGraphics.drawCenteredString(this.font, this.tile.producePerTick + " " + I18n.get("actuallyadditions.cft"), this.leftPos + 87, this.topPos + 86, 0xFFFFFF); + guiGraphics.drawCenteredString(this.font, Component.literal(this.tile.producePerTick + " ").append(Component.translatable("misc.actuallyadditions.energy_tick")), this.leftPos + 87, this.topPos + 86, 0xFFFFFF); } - //this.energy.draw(); + this.energy.draw(guiGraphics); } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityBioReactor.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityBioReactor.java index 26cf0f1d9..11c427235 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityBioReactor.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityBioReactor.java @@ -54,7 +54,7 @@ public class TileEntityBioReactor extends TileEntityInventoryBase implements Men } public static boolean isValidItem(ItemStack stack) { - if (StackUtil.isValid(stack)) { + if (!stack.isEmpty()) { Item item = stack.getItem(); if (item.isEdible()) { return true; @@ -85,7 +85,7 @@ public class TileEntityBioReactor extends TileEntityInventoryBase implements Men if (!tile.isRedstonePowered && tile.storage.getEnergyStored() < tile.storage.getMaxEnergyStored()) { for (int i = 0; i < tile.inv.getSlots(); i++) { ItemStack stack = tile.inv.getStackInSlot(i); - if (StackUtil.isValid(stack)) { + if (!stack.isEmpty()) { Item item = stack.getItem(); if (isValidItem(stack) && (types == null || !types.contains(item))) { if (types == null) { @@ -187,7 +187,7 @@ public class TileEntityBioReactor extends TileEntityInventoryBase implements Men @Override public Component getDisplayName() { - return Component.empty(); + return Component.translatable("container.actuallyadditions.bioReactor"); } @Nullable