EnergyDisplay on coalgen

This commit is contained in:
Flanks255 2021-12-28 20:40:18 -06:00
parent c6c232d648
commit 5f1c68f31f

View file

@ -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<IEnergyStorage> 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;
}
}