Fixes #1465 faulty item comparison
This commit is contained in:
@@ -85,7 +85,10 @@ public final class WrappedDamageItemDefinition implements ITileDefinition
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
return this.definition.isSameAs( comparableStack ) && comparableStack.getItemDamage() == this.damage;
|
final boolean sameItem = this.definition.isSameAs( new ItemStack( comparableStack.getItem() ) );
|
||||||
|
final boolean sameDamage = comparableStack.getItemDamage() == this.damage;
|
||||||
|
|
||||||
|
return sameItem && sameDamage;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -93,7 +93,7 @@ public final class DisassembleRecipe implements IRecipe
|
|||||||
{
|
{
|
||||||
// needs a single input in the recipe
|
// needs a single input in the recipe
|
||||||
itemCount++;
|
itemCount++;
|
||||||
if ( itemCount > 1 )
|
if( itemCount > 1 )
|
||||||
{
|
{
|
||||||
return MISMATCHED_STACK;
|
return MISMATCHED_STACK;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1858,15 +1858,15 @@ public class Platform
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean isSameItemType( ItemStack ol, ItemStack op )
|
public static boolean isSameItemType( ItemStack that, ItemStack other )
|
||||||
{
|
{
|
||||||
if( ol != null && op != null && ol.getItem() == op.getItem() )
|
if( that != null && other != null && that.getItem() == other.getItem() )
|
||||||
{
|
{
|
||||||
if( ol.isItemStackDamageable() )
|
if( that.isItemStackDamageable() )
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return ol.getItemDamage() == ol.getItemDamage();
|
return that.getItemDamage() == other.getItemDamage();
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user