Made player interface display the amount of RF it has

This commit is contained in:
Ellpeck 2016-06-08 18:57:57 +02:00
parent 22e886ded2
commit 1547fdaa9e

View file

@ -20,7 +20,7 @@ import net.minecraft.util.EnumFacing;
import java.util.UUID; import java.util.UUID;
public class TileEntityPlayerInterface extends TileEntityInventoryBase implements IEnergyReceiver{ public class TileEntityPlayerInterface extends TileEntityInventoryBase implements IEnergyReceiver, IEnergyDisplay{
public static final int DEFAULT_RANGE = 32; public static final int DEFAULT_RANGE = 32;
public UUID connectedPlayer; public UUID connectedPlayer;
@ -206,4 +206,14 @@ public class TileEntityPlayerInterface extends TileEntityInventoryBase implement
public boolean canExtractItem(int slot, ItemStack stack, EnumFacing side){ public boolean canExtractItem(int slot, ItemStack stack, EnumFacing side){
return true; return true;
} }
@Override
public int getEnergy(){
return this.storage.getEnergyStored();
}
@Override
public int getMaxEnergy(){
return this.storage.getMaxEnergyStored();
}
} }