Merge branch 'master' into development
This commit is contained in:
commit
d432fc979c
3 changed files with 13 additions and 15 deletions
|
@ -68,26 +68,16 @@ public class ContainerGasTank extends Container
|
||||||
if(slotStack.getItem() instanceof IGasItem)
|
if(slotStack.getItem() instanceof IGasItem)
|
||||||
{
|
{
|
||||||
if(slotID != 0 && slotID != 1)
|
if(slotID != 0 && slotID != 1)
|
||||||
{
|
|
||||||
if(!mergeItemStack(slotStack, 1, 2, false))
|
|
||||||
{
|
|
||||||
if(!mergeItemStack(slotStack, 0, 1, false))
|
|
||||||
{
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if(slotID == 1)
|
|
||||||
{
|
{
|
||||||
if(!mergeItemStack(slotStack, 0, 1, false))
|
if(!mergeItemStack(slotStack, 0, 1, false))
|
||||||
{
|
{
|
||||||
if(!mergeItemStack(slotStack, 2, inventorySlots.size(), false))
|
if(!mergeItemStack(slotStack, 1, 2, false))
|
||||||
{
|
{
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if(slotID == 0)
|
else
|
||||||
{
|
{
|
||||||
if(!mergeItemStack(slotStack, 2, inventorySlots.size(), true))
|
if(!mergeItemStack(slotStack, 2, inventorySlots.size(), true))
|
||||||
{
|
{
|
||||||
|
|
|
@ -674,9 +674,16 @@ public final class MekanismUtils
|
||||||
{
|
{
|
||||||
Coord4D sideCoord = coord.getFromSide(side);
|
Coord4D sideCoord = coord.getFromSide(side);
|
||||||
|
|
||||||
if(sideCoord.exists(world))
|
if(sideCoord.exists(world) && sideCoord.getFromSide(side).exists(world))
|
||||||
{
|
{
|
||||||
if(world.getIndirectPowerLevelTo(sideCoord.xCoord, sideCoord.yCoord, sideCoord.zCoord, side.ordinal()) > 0)
|
if(sideCoord.getFromSide(side).exists(world))
|
||||||
|
{
|
||||||
|
if(world.getIndirectPowerLevelTo(sideCoord.xCoord, sideCoord.yCoord, sideCoord.zCoord, side.ordinal()) > 0)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if(world.isBlockProvidingPowerTo(sideCoord.xCoord, sideCoord.yCoord, sideCoord.zCoord, side.ordinal()) > 0)
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -267,7 +267,8 @@ public class TileEntityGasGenerator extends TileEntityGenerator implements IGasH
|
||||||
|
|
||||||
fuelTank.read(nbtTags.getCompoundTag("fuelTank"));
|
fuelTank.read(nbtTags.getCompoundTag("fuelTank"));
|
||||||
|
|
||||||
FuelGas fuel = FuelHandler.getFuel(fuelTank.getGas().getGas());
|
boolean isTankEmpty = (fuelTank.getGas() == null);
|
||||||
|
FuelGas fuel = (isTankEmpty) ? null : FuelHandler.getFuel(fuelTank.getGas().getGas());
|
||||||
|
|
||||||
if(fuel != null)
|
if(fuel != null)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue