It works!!!
Charge bench now working needs a texture and recipe
This commit is contained in:
parent
bfe0d57bc7
commit
a063e13612
2 changed files with 7 additions and 7 deletions
|
@ -36,11 +36,13 @@ public class TileChargeBench extends TileMachineBase implements IWrenchable, IEn
|
||||||
public void updateEntity(){
|
public void updateEntity(){
|
||||||
super.updateEntity();
|
super.updateEntity();
|
||||||
energy.updateEntity();
|
energy.updateEntity();
|
||||||
if(inventory.getStackInSlot(0) != null)
|
|
||||||
|
for (int i = 0; i < 6; i++)
|
||||||
|
if(inventory.getStackInSlot(i) != null)
|
||||||
{
|
{
|
||||||
if(inventory.getStackInSlot(0).getItem() instanceof IElectricItem)
|
if(inventory.getStackInSlot(i).getItem() instanceof IElectricItem)
|
||||||
{
|
{
|
||||||
ItemStack stack = inventory.getStackInSlot(0);
|
ItemStack stack = inventory.getStackInSlot(i);
|
||||||
double MaxCharge = ((IElectricItem) stack.getItem()).getMaxCharge(stack);
|
double MaxCharge = ((IElectricItem) stack.getItem()).getMaxCharge(stack);
|
||||||
double CurrentCharge = ElectricItem.manager.getCharge(stack);
|
double CurrentCharge = ElectricItem.manager.getCharge(stack);
|
||||||
if(CurrentCharge != MaxCharge)
|
if(CurrentCharge != MaxCharge)
|
||||||
|
@ -52,6 +54,7 @@ public class TileChargeBench extends TileMachineBase implements IWrenchable, IEn
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean wrenchCanSetFacing(EntityPlayer entityPlayer, int side){
|
public boolean wrenchCanSetFacing(EntityPlayer entityPlayer, int side){
|
||||||
return false;
|
return false;
|
||||||
|
@ -195,8 +198,4 @@ public class TileChargeBench extends TileMachineBase implements IWrenchable, IEn
|
||||||
// {
|
// {
|
||||||
// return slotIndex == 2;
|
// return slotIndex == 2;
|
||||||
// }
|
// }
|
||||||
//
|
|
||||||
// public int getEnergyScaled(int scale) {
|
|
||||||
// return (int)energy.getEnergyStored() * scale / energy.getCapacity();
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -54,6 +54,7 @@ tile.techreborn.machineFrame.brass.name=Brass Machine Hull
|
||||||
tile.techreborn.machineFrame.steel.name=Steel Machine Hull
|
tile.techreborn.machineFrame.steel.name=Steel Machine Hull
|
||||||
tile.techreborn.machineFrame.titanium.name=Titanium Machine Hull
|
tile.techreborn.machineFrame.titanium.name=Titanium Machine Hull
|
||||||
tile.techreborn.industrialsawmill.name=Saw Mill
|
tile.techreborn.industrialsawmill.name=Saw Mill
|
||||||
|
tile.techreborn.chargebench.name=Charge Bench
|
||||||
|
|
||||||
#Ores
|
#Ores
|
||||||
tile.techreborn.ore.Galena.name=Galena Ore
|
tile.techreborn.ore.Galena.name=Galena Ore
|
||||||
|
|
Loading…
Reference in a new issue