From 5f1c68f31f791133a63dd3aa1d2c4b3056034129 Mon Sep 17 00:00:00 2001 From: Flanks255 <32142731+Flanks255@users.noreply.github.com> Date: Tue, 28 Dec 2021 20:40:18 -0600 Subject: [PATCH] EnergyDisplay on coalgen --- .../mod/tile/TileEntityCoalGenerator.java | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityCoalGenerator.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityCoalGenerator.java index e1298bd15..0a2ae6f09 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityCoalGenerator.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityCoalGenerator.java @@ -43,7 +43,7 @@ import javax.annotation.Nullable; import de.ellpeck.actuallyadditions.mod.tile.TileEntityBase.NBTType; import net.minecraftforge.fml.server.ServerLifecycleHooks; -public class TileEntityCoalGenerator extends TileEntityInventoryBase implements INamedContainerProvider, ISharingEnergyProvider { +public class TileEntityCoalGenerator extends TileEntityInventoryBase implements INamedContainerProvider, ISharingEnergyProvider, IEnergyDisplay { public final CustomEnergyStorage storage = new CustomEnergyStorage(60000, 0, 80); public final LazyOptional lazyEnergy = LazyOptional.of(() -> this.storage); @@ -204,4 +204,14 @@ public class TileEntityCoalGenerator extends TileEntityInventoryBase implements public Container createMenu(int windowId, PlayerInventory playerInventory, PlayerEntity player) { return new ContainerCoalGenerator(windowId, playerInventory, this); } + + @Override + public CustomEnergyStorage getEnergyStorage() { + return storage; + } + + @Override + public boolean needsHoldShift() { + return false; + } }