Extracts item comparison from Platform into their own helper. (#2555)
* Extracts item comparison from Platform into their own helper. Renamed methods to be more more fitting for the actual comparison. Added documentation about each methods behaviour.
This commit is contained in:
@@ -73,7 +73,7 @@ public class ItemDefinition implements IItemDefinition
|
||||
@Override
|
||||
public final boolean isSameAs( final ItemStack comparableStack )
|
||||
{
|
||||
return isEnabled() && Platform.isSameItemType( comparableStack, this.maybeStack( 1 ).get() );
|
||||
return isEnabled() && Platform.itemComparisons().isEqualItemType( comparableStack, this.maybeStack( 1 ).get() );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -125,7 +125,7 @@ public final class GrinderRecipeManager implements IGrinderRegistry, IOreListene
|
||||
{
|
||||
for( final IGrinderEntry gr : this.recipes )
|
||||
{
|
||||
if( Platform.isSameItemPrecise( gr.getInput(), appEngGrinderRecipe.getInput() ) )
|
||||
if( Platform.itemComparisons().isSameItem( gr.getInput(), appEngGrinderRecipe.getInput() ) )
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -151,7 +151,7 @@ public final class GrinderRecipeManager implements IGrinderRegistry, IOreListene
|
||||
{
|
||||
for( final IGrinderEntry r : this.recipes )
|
||||
{
|
||||
if( Platform.isSameItem( input, r.getInput() ) )
|
||||
if( Platform.itemComparisons().isEqualItem( input, r.getInput() ) )
|
||||
{
|
||||
this.log( "Recipe for " + input.getUnlocalizedName() + " found " + Platform.getItemDisplayName( r.getOutput() ) );
|
||||
return r;
|
||||
|
||||
@@ -52,7 +52,7 @@ public class MatterCannonAmmoRegistry implements IOreListener, IMatterCannonAmmo
|
||||
{
|
||||
for( final ItemStack o : this.DamageModifiers.keySet() )
|
||||
{
|
||||
if( Platform.isSameItem( o, is ) )
|
||||
if( Platform.itemComparisons().isEqualItem( o, is ) )
|
||||
{
|
||||
return this.DamageModifiers.get( o ).floatValue();
|
||||
}
|
||||
|
||||
@@ -146,7 +146,7 @@ public final class P2PTunnelRegistry implements IP2PTunnelRegistry
|
||||
return this.tunnels.get( is );
|
||||
}
|
||||
|
||||
if( Platform.isSameItem( is, trigger ) )
|
||||
if( Platform.itemComparisons().isEqualItem( is, trigger ) )
|
||||
{
|
||||
return this.tunnels.get( is );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user