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:
@@ -87,6 +87,6 @@ public class Crusher implements ICraftHandler, IWebsiteSerializer
|
||||
@Override
|
||||
public boolean canCraft( final ItemStack output ) throws RegistrationError, MissingIngredientError
|
||||
{
|
||||
return Platform.isSameItemPrecise( this.pro_output[0].getItemStack(), output );
|
||||
return Platform.itemComparisons().isSameItem( this.pro_output[0].getItemStack(), output );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -73,6 +73,6 @@ public class Grind implements ICraftHandler, IWebsiteSerializer
|
||||
@Override
|
||||
public boolean canCraft( final ItemStack output ) throws RegistrationError, MissingIngredientError
|
||||
{
|
||||
return Platform.isSameItemPrecise( this.pro_output[0].getItemStack(), output );
|
||||
return Platform.itemComparisons().isSameItem( this.pro_output[0].getItemStack(), output );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -87,6 +87,6 @@ public class GrindFZ implements ICraftHandler, IWebsiteSerializer
|
||||
@Override
|
||||
public boolean canCraft( final ItemStack output ) throws RegistrationError, MissingIngredientError
|
||||
{
|
||||
return Platform.isSameItemPrecise( this.pro_output[0].getItemStack(), output );
|
||||
return Platform.itemComparisons().isSameItem( this.pro_output[0].getItemStack(), output );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -96,6 +96,6 @@ public class HCCrusher implements ICraftHandler, IWebsiteSerializer
|
||||
@Override
|
||||
public boolean canCraft( final ItemStack output ) throws RegistrationError, MissingIngredientError
|
||||
{
|
||||
return Platform.isSameItemPrecise( this.pro_output[0].getItemStack(), output );
|
||||
return Platform.itemComparisons().isSameItem( this.pro_output[0].getItemStack(), output );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -88,7 +88,7 @@ public abstract class InscriberProcess implements ICraftHandler, IWebsiteSeriali
|
||||
@Override
|
||||
public boolean canCraft( final ItemStack reqOutput ) throws RegistrationError, MissingIngredientError
|
||||
{
|
||||
return this.output != null && Platform.isSameItemPrecise( this.output.getItemStack(), reqOutput );
|
||||
return this.output != null && Platform.itemComparisons().isSameItem( this.output.getItemStack(), reqOutput );
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -87,6 +87,6 @@ public class Macerator implements ICraftHandler, IWebsiteSerializer
|
||||
@Override
|
||||
public boolean canCraft( final ItemStack output ) throws RegistrationError, MissingIngredientError
|
||||
{
|
||||
return Platform.isSameItemPrecise( this.pro_output[0].getItemStack(), output );
|
||||
return Platform.itemComparisons().isSameItem( this.pro_output[0].getItemStack(), output );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -88,6 +88,6 @@ public class MekCrusher implements ICraftHandler, IWebsiteSerializer
|
||||
@Override
|
||||
public boolean canCraft( final ItemStack output ) throws RegistrationError, MissingIngredientError
|
||||
{
|
||||
return Platform.isSameItemPrecise( this.pro_output[0].getItemStack(), output );
|
||||
return Platform.itemComparisons().isSameItem( this.pro_output[0].getItemStack(), output );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -87,6 +87,6 @@ public class MekEnrichment implements ICraftHandler, IWebsiteSerializer
|
||||
@Override
|
||||
public boolean canCraft( final ItemStack output ) throws RegistrationError, MissingIngredientError
|
||||
{
|
||||
return Platform.isSameItemPrecise( this.pro_output[0].getItemStack(), output );
|
||||
return Platform.itemComparisons().isSameItem( this.pro_output[0].getItemStack(), output );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -82,6 +82,6 @@ public class Pulverizer implements ICraftHandler, IWebsiteSerializer
|
||||
@Override
|
||||
public boolean canCraft( final ItemStack output ) throws RegistrationError, MissingIngredientError
|
||||
{
|
||||
return Platform.isSameItemPrecise( this.pro_output[0].getItemStack(), output );
|
||||
return Platform.itemComparisons().isSameItem( this.pro_output[0].getItemStack(), output );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -162,7 +162,7 @@ public class Shaped implements ICraftHandler, IWebsiteSerializer
|
||||
{
|
||||
for( final ItemStack r : i.getItemStackSet() )
|
||||
{
|
||||
if( Platform.isSameItemPrecise( r, reqOutput ) )
|
||||
if( Platform.itemComparisons().isSameItem( r, reqOutput ) )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@@ -171,6 +171,6 @@ public class Shaped implements ICraftHandler, IWebsiteSerializer
|
||||
}
|
||||
}
|
||||
|
||||
return Platform.isSameItemPrecise( this.output.getItemStack(), reqOutput );
|
||||
return Platform.itemComparisons().isSameItem( this.output.getItemStack(), reqOutput );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -128,7 +128,7 @@ public class Shapeless implements ICraftHandler, IWebsiteSerializer
|
||||
{
|
||||
for( final ItemStack r : i.getItemStackSet() )
|
||||
{
|
||||
if( Platform.isSameItemPrecise( r, reqOutput ) )
|
||||
if( Platform.itemComparisons().isSameItem( r, reqOutput ) )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@@ -136,6 +136,6 @@ public class Shapeless implements ICraftHandler, IWebsiteSerializer
|
||||
}
|
||||
}
|
||||
|
||||
return Platform.isSameItemPrecise( this.output.getItemStack(), reqOutput );
|
||||
return Platform.itemComparisons().isSameItem( this.output.getItemStack(), reqOutput );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -81,6 +81,6 @@ public class Smelt implements ICraftHandler, IWebsiteSerializer
|
||||
@Override
|
||||
public boolean canCraft( final ItemStack reqOutput ) throws RegistrationError, MissingIngredientError
|
||||
{
|
||||
return Platform.isSameItemPrecise( this.out.getItemStack(), reqOutput );
|
||||
return Platform.itemComparisons().isSameItem( this.out.getItemStack(), reqOutput );
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user