Fixed fluid duplication

This commit is contained in:
aidancbrady 2016-03-05 18:48:49 -05:00
parent 13996faacb
commit b13d8ee1ab
6 changed files with 10 additions and 10 deletions

View file

@ -230,7 +230,7 @@ public class TileEntityChemicalWasher extends TileEntityNoisyElectricBlock imple
if(containerItem != null)
{
if(inventory[1] == null || (inventory[1].isItemEqual(containerItem) && inventory[1].stackSize+1 <= containerItem.getMaxStackSize()))
if(inventory[1] == null || (ItemStack.areItemStacksEqual(inventory[1], containerItem) && inventory[1].stackSize+1 <= containerItem.getMaxStackSize()))
{
inventory[0] = null;

View file

@ -190,7 +190,7 @@ public class TileEntityDynamicTank extends TileEntityMultiblock<SynchronizedTank
if(filled != null)
{
if(structure.inventory[1] == null || (structure.inventory[1].isItemEqual(filled) && structure.inventory[1].stackSize+1 <= filled.getMaxStackSize()))
if(structure.inventory[1] == null || (ItemStack.areItemStacksEqual(structure.inventory[1], filled) && structure.inventory[1].stackSize+1 <= filled.getMaxStackSize()))
{
structure.inventory[0].stackSize--;
@ -238,7 +238,7 @@ public class TileEntityDynamicTank extends TileEntityMultiblock<SynchronizedTank
if(containerItem != null)
{
if(structure.inventory[1] == null || (structure.inventory[1].isItemEqual(containerItem) && structure.inventory[1].stackSize+1 <= containerItem.getMaxStackSize()))
if(structure.inventory[1] == null || (ItemStack.areItemStacksEqual(structure.inventory[1], containerItem) && structure.inventory[1].stackSize+1 <= containerItem.getMaxStackSize()))
{
structure.inventory[0] = null;

View file

@ -210,7 +210,7 @@ public class TileEntityFluidTank extends TileEntityContainerBlock implements IAc
if(filled != null)
{
if(inventory[1] == null || (inventory[1].isItemEqual(filled) && inventory[1].stackSize+1 <= filled.getMaxStackSize()))
if(inventory[1] == null || (ItemStack.areItemStacksEqual(inventory[1], filled) && inventory[1].stackSize+1 <= filled.getMaxStackSize()))
{
inventory[0].stackSize--;
@ -250,7 +250,7 @@ public class TileEntityFluidTank extends TileEntityContainerBlock implements IAc
if(containerItem != null)
{
if(inventory[1] == null || (inventory[1].isItemEqual(containerItem) && inventory[1].stackSize+1 <= containerItem.getMaxStackSize()))
if(inventory[1] == null || (ItemStack.areItemStacksEqual(inventory[1], containerItem) && inventory[1].stackSize+1 <= containerItem.getMaxStackSize()))
{
inventory[0] = null;

View file

@ -117,7 +117,7 @@ public class TileEntityFluidicPlenisher extends TileEntityElectricBlock implemen
if(containerItem != null)
{
if(inventory[1] == null || (inventory[1].isItemEqual(containerItem) && inventory[1].stackSize+1 <= containerItem.getMaxStackSize()))
if(inventory[1] == null || (ItemStack.areItemStacksEqual(inventory[1], containerItem) && inventory[1].stackSize+1 <= containerItem.getMaxStackSize()))
{
inventory[0] = null;

View file

@ -149,7 +149,7 @@ public class TileEntityRotaryCondensentrator extends TileEntityElectricBlock imp
if(filled != null)
{
if(inventory[3] == null || (inventory[3].isItemEqual(filled) && inventory[3].stackSize+1 <= filled.getMaxStackSize()))
if(inventory[3] == null || (ItemStack.areItemStacksEqual(inventory[3], filled) && inventory[3].stackSize+1 <= filled.getMaxStackSize()))
{
inventory[2].stackSize--;
@ -249,7 +249,7 @@ public class TileEntityRotaryCondensentrator extends TileEntityElectricBlock imp
if(containerItem != null)
{
if(inventory[3] == null || (inventory[3].isItemEqual(containerItem) && inventory[3].stackSize+1 <= containerItem.getMaxStackSize()))
if(inventory[3] == null || (ItemStack.areItemStacksEqual(inventory[3], containerItem) && inventory[3].stackSize+1 <= containerItem.getMaxStackSize()))
{
inventory[2] = null;

View file

@ -249,7 +249,7 @@ public class TileEntityThermalEvaporationController extends TileEntityThermalEva
markDirty();
}
else if(tempStack.isItemEqual(inventory[3]) && tempStack.getMaxStackSize() > inventory[3].stackSize)
else if(ItemStack.areItemStacksEqual(tempStack, inventory[3]) && tempStack.getMaxStackSize() > inventory[3].stackSize)
{
outputTank.drain(FluidContainerRegistry.BUCKET_VOLUME, true);
@ -287,7 +287,7 @@ public class TileEntityThermalEvaporationController extends TileEntityThermalEva
if(containerItem != null)
{
if(inventory[1] == null || (inventory[1].isItemEqual(containerItem) && inventory[1].stackSize+1 <= containerItem.getMaxStackSize()))
if(inventory[1] == null || (ItemStack.areItemStacksEqual(inventory[1], containerItem) && inventory[1].stackSize+1 <= containerItem.getMaxStackSize()))
{
inventory[0] = null;