Fixed #446 - Crate stacking non equal items
This commit is contained in:
parent
2fb0886c99
commit
772f6caedb
1 changed files with 4 additions and 4 deletions
|
@ -252,23 +252,23 @@ public class BlockCrate extends BlockTile
|
|||
|
||||
if (currentStack != null)
|
||||
{
|
||||
if (currentStack.getItem().itemID == this.blockID)
|
||||
if (currentStack.getItem().itemID == blockID)
|
||||
{
|
||||
ItemStack containedStack = ItemBlockCrate.getContainingItemStack(currentStack);
|
||||
ItemStack crateStack = tileEntity.getSampleStack();
|
||||
if (containedStack != null && (crateStack == null || (crateStack != null && containedStack.isItemEqual(crateStack))))
|
||||
|
||||
if (containedStack != null && (crateStack == null || ItemStack.areItemStacksEqual(containedStack, crateStack)))
|
||||
{
|
||||
ItemStack returned = BlockCrate.addStackToCrate(tileEntity, containedStack);
|
||||
ItemBlockCrate.setContainingItemStack(currentStack, returned);
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
if (tileEntity.getSampleStack() != null)
|
||||
{
|
||||
if (!(tileEntity.getSampleStack().isItemEqual(currentStack) || OreDictionary.getOreID(tileEntity.getSampleStack()) == OreDictionary.getOreID(currentStack)))
|
||||
if (!(tileEntity.getSampleStack().isItemEqual(currentStack) || (!OreDictionary.getOreName(OreDictionary.getOreID(tileEntity.getSampleStack())).equals("Unknown") && OreDictionary.getOreID(tileEntity.getSampleStack()) == OreDictionary.getOreID(currentStack))))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue