#988 Crash with the Crafter when updating to RF branch from main branch

This commit is contained in:
CrazyPants committed 2014-09-08 14:20:03 +08:00
1 parent 0f6e1942a5
commit 5083180dae
1 file changed
+5 -5
@@ -28,8 +28,8 @@ public class TileCrafter extends AbstractMachineEntity {
public TileCrafter() {
super(new SlotDefinition(9, 1));
containerItems = new ArrayList<ItemStack>();
setCapacitor(Capacitors.BASIC_CAPACITOR);
containerItems = new ArrayList<ItemStack>();
setCapacitor(Capacitors.BASIC_CAPACITOR);
}
@Override
@@ -39,9 +39,9 @@ public class TileCrafter extends AbstractMachineEntity {
@Override
public void setCapacitor(Capacitors capacitorType) {
super.setCapacitor(capacitorType);
ICapacitor refCap = super.getCapacitor();
capacitor = new BasicCapacitor(refCap.getMaxEnergyReceived() * 2, refCap.getMaxEnergyStored(), refCap.getMaxEnergyExtracted());
ICapacitor refCap = capacitorType.capacitor;
capacitor = new BasicCapacitor(refCap.getMaxEnergyReceived() * 2, refCap.getMaxEnergyStored(), refCap.getMaxEnergyExtracted());
super.setCapacitor(capacitorType);
}
@Override