Fixed Portable Tank transfer issue, fixed inventories not being sustained, fixed Logistical Transporter crash

This commit is contained in:
Aidan C. Brady committed 2014-07-12 16:02:21 -04:00
1 parent 896dd4de3f
commit 369eb012af
4 files changed
+18 -4

No files matched your search

@@ -750,7 +750,7 @@ public class ItemBlockMachine extends ItemBlock implements IEnergizedItem, ISpec
{
itemStack.setTagCompound(new NBTTagCompound());
}
itemStack.stackTagCompound.setTag("Items", nbtTags);
}
}
@@ -767,7 +767,7 @@ public class ItemBlockMachine extends ItemBlock implements IEnergizedItem, ISpec
return null;
}
return itemStack.stackTagCompound.getTagList("Items", NBT.TAG_ANY_NUMERIC);
return itemStack.stackTagCompound.getTagList("Items", NBT.TAG_COMPOUND);
}
return null;
@@ -1,6 +1,7 @@
package mekanism.common.tile;
import mekanism.common.ISustainedInventory;
import mekanism.common.Mekanism;
import mekanism.common.util.InventoryUtils;
import mekanism.common.util.MekanismUtils;
import net.minecraft.entity.player.EntityPlayer;
@@ -544,13 +544,26 @@ public class TileEntityPortableTank extends TileEntityContainerBlock implements
}
}
return (from == ForgeDirection.UP || from == ForgeDirection.DOWN) && (fluidTank.getFluid() == null || fluidTank.getFluid().getFluid() == fluid);
return fluidTank.getFluid() == null || fluidTank.getFluid().getFluid() == fluid;
}
@Override
public boolean canDrain(ForgeDirection from, Fluid fluid)
{
return !isActive && from == ForgeDirection.DOWN && (fluid == null || (fluidTank != null && fluidTank.getFluid().getFluid() == fluid));
if(fluidTank != null)
{
if(fluid == null || fluidTank.getFluid().getFluid() == fluid)
{
if(isActive)
{
return from != ForgeDirection.DOWN;
}
return true;
}
}
return false;
}
@Override