mirror of
https://github.com/Ellpeck/ActuallyAdditions.git
synced 2024-11-04 16:19:10 +01:00
EnergyDisplay on coalgen
This commit is contained in:
parent
c6c232d648
commit
5f1c68f31f
1 changed files with 11 additions and 1 deletions
|
@ -43,7 +43,7 @@ import javax.annotation.Nullable;
|
||||||
import de.ellpeck.actuallyadditions.mod.tile.TileEntityBase.NBTType;
|
import de.ellpeck.actuallyadditions.mod.tile.TileEntityBase.NBTType;
|
||||||
import net.minecraftforge.fml.server.ServerLifecycleHooks;
|
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 CustomEnergyStorage storage = new CustomEnergyStorage(60000, 0, 80);
|
||||||
public final LazyOptional<IEnergyStorage> lazyEnergy = LazyOptional.of(() -> this.storage);
|
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) {
|
public Container createMenu(int windowId, PlayerInventory playerInventory, PlayerEntity player) {
|
||||||
return new ContainerCoalGenerator(windowId, playerInventory, this);
|
return new ContainerCoalGenerator(windowId, playerInventory, this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public CustomEnergyStorage getEnergyStorage() {
|
||||||
|
return storage;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean needsHoldShift() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue