Posted June 30, 20169 yr protected EnergyStorage localEnergyStorage; private int transferRate; private int capacity; public int level; public int lastUsed; public TileEntityExtruder() { this.transferRate = 100000; this.capacity = 100000; if (this.localEnergyStorage == null) { localEnergyStorage = new EnergyStorage(this.capacity, this.transferRate); } } @Override public boolean canConnectEnergy(ForgeDirection from) { return true; } @Override public int receiveEnergy(ForgeDirection from, int maxReceive, boolean simulate) { int used = localEnergyStorage.receiveEnergy(maxReceive, simulate); if (used > 0 && !simulate) { this.markDirty(); } return used; } @Override public int getEnergyStored(ForgeDirection from) { return localEnergyStorage.getEnergyStored(); } @Override public int getMaxEnergyStored(ForgeDirection from) { return localEnergyStorage.getMaxEnergyStored(); } public void updateEntity() {System.out.println("-" + getEnergyStored(null));} //My problem For some reason in the console I get this: -10000 -0 -10000 -0 -10000 -0 -10000 -0 Thanks in advance (I probably forgot to do something stupid)
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.