Merge branch 'master' into 1.6.4

This commit is contained in:
CrazyPants committed 2014-01-11 14:34:27 +08:00
commit 13eda39c6b
2 files changed
+12 -12

No files matched your search

@@ -17,7 +17,7 @@ public class PowerInterfaceRF implements IPowerInterface {
@Override
public boolean canConduitConnect(ForgeDirection direction) {
if(rfPower != null) {
if(rfPower != null && direction != null) {
return rfPower.canInterface(direction.getOpposite());
}
return false;
@@ -25,7 +25,7 @@ public class PowerInterfaceRF implements IPowerInterface {
@Override
public float getEnergyStored(ForgeDirection dir) {
if(rfPower != null) {
if(rfPower != null && dir != null) {
return rfPower.getEnergyStored(dir) / 10f;
}
return 0;
@@ -33,7 +33,7 @@ public class PowerInterfaceRF implements IPowerInterface {
@Override
public float getMaxEnergyStored(ForgeDirection dir) {
if(rfPower != null) {
if(rfPower != null && dir != null) {
return rfPower.getMaxEnergyStored(dir) / 10f;
}
return 0;
@@ -54,7 +54,7 @@ public class PowerInterfaceRF implements IPowerInterface {
@Override
public float recieveEnergy(ForgeDirection opposite, float canOffer) {
if(rfPower != null) {
if(rfPower != null && opposite != null) {
return rfPower.receiveEnergy(opposite, (int) (canOffer * 10), false) / 10f;
}
return 0;
+8 -8
View File
@@ -67,14 +67,14 @@ public class ItemUtil {
if(inserted > 0) {
numInserted += inserted;
numToInsert -= inserted;
sidedInv.setInventorySlotContents(slot, toInsert);
numToInsert -= inserted;
sidedInv.setInventorySlotContents(slot, toInsert);
}
}
}
}
if(numInserted > 0) {
sidedInv.onInventoryChanged();
if(numInserted > 0) {
sidedInv.onInventoryChanged();
}
return numInserted;
}
@@ -104,13 +104,13 @@ public class ItemUtil {
if(inserted > 0) {
numInserted += inserted;
numToInsert -= inserted;
inv.setInventorySlotContents(slot, toInsert);
numToInsert -= inserted;
inv.setInventorySlotContents(slot, toInsert);
}
}
}
if(numInserted > 0) {
inv.onInventoryChanged();
if(numInserted > 0) {
inv.onInventoryChanged();
}
return numInserted;
}