Rework AEItemStack (#3091)
* Use itemstack as itemdef * HIGH_TAG/LOW_TAG should be compared both directions * Remove getTagCompound * Make Itemlist implementation independent * Cache item id for performance reasons * Add preconditions to saveguard against external meddling * Chache itemDamage * Remove IAEStackSearchKey for now, rename getDisplayStack
This commit is contained in:
@@ -88,12 +88,14 @@ class GrinderRecipeCategory implements IRecipeCategory<GrinderRecipeWrapper>, IR
|
||||
itemStacks.set( ingredients );
|
||||
}
|
||||
|
||||
@Override public void addRecipeCategories( IRecipeCategory... recipeCategories )
|
||||
@Override
|
||||
public void addRecipeCategories( IRecipeCategory... recipeCategories )
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
@Override public IJeiHelpers getJeiHelpers()
|
||||
@Override
|
||||
public IJeiHelpers getJeiHelpers()
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -175,7 +175,8 @@ public class JEIPlugin implements IModPlugin
|
||||
if( !matterBall.isEmpty() || !singularity.isEmpty() )
|
||||
{
|
||||
registry.addRecipeCatalyst( condenser, CondenserCategory.UID );
|
||||
registry.handleRecipes( CondenserOutput.class, new CondenserOutputHandler( registry.getJeiHelpers().getGuiHelper(), matterBall, singularity) , CondenserCategory.UID );
|
||||
registry.handleRecipes( CondenserOutput.class, new CondenserOutputHandler( registry.getJeiHelpers().getGuiHelper(), matterBall, singularity ),
|
||||
CondenserCategory.UID );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+2
-1
@@ -48,10 +48,11 @@ public class StorageMonitorInfoProvider implements IPartProbInfoProvider
|
||||
final IAEStack<?> displayed = monitor.getDisplayed();
|
||||
final boolean isLocked = monitor.isLocked();
|
||||
|
||||
// TODO: generalize
|
||||
if( displayed instanceof IAEItemStack )
|
||||
{
|
||||
final IAEItemStack ais = (IAEItemStack) displayed;
|
||||
probeInfo.text( TheOneProbeText.SHOWING.getLocal() + ": " + ais.getItemStack().getDisplayName() );
|
||||
probeInfo.text( TheOneProbeText.SHOWING.getLocal() + ": " + ais.asItemStackRepresentation().getDisplayName() );
|
||||
}
|
||||
else if( displayed instanceof IAEFluidStack )
|
||||
{
|
||||
|
||||
+2
-1
@@ -48,7 +48,8 @@ public class CraftingMonitorInfoProvider implements ITileProbInfoProvider
|
||||
|
||||
if( displayStack != null )
|
||||
{
|
||||
final ItemStack itemStack = displayStack.getItemStack();
|
||||
// TODO: check if OK
|
||||
final ItemStack itemStack = displayStack.asItemStackRepresentation();
|
||||
final String itemName = itemStack.getDisplayName();
|
||||
final String formattedCrafting = String.format( TheOneProbeText.CRAFTING.getLocal(), itemName );
|
||||
|
||||
|
||||
+2
-1
@@ -62,10 +62,11 @@ public final class StorageMonitorWailaDataProvider extends BasePartWailaDataProv
|
||||
final IAEStack<?> displayed = monitor.getDisplayed();
|
||||
final boolean isLocked = monitor.isLocked();
|
||||
|
||||
// TODO: generalize
|
||||
if( displayed instanceof IAEItemStack )
|
||||
{
|
||||
final IAEItemStack ais = (IAEItemStack) displayed;
|
||||
currentToolTip.add( WailaText.Showing.getLocal() + ": " + ais.getItemStack().getDisplayName() );
|
||||
currentToolTip.add( WailaText.Showing.getLocal() + ": " + ais.asItemStackRepresentation().getDisplayName() );
|
||||
}
|
||||
else if( displayed instanceof IAEFluidStack )
|
||||
{
|
||||
|
||||
+1
-1
@@ -63,7 +63,7 @@ public final class CraftingMonitorWailaDataProvider extends BaseWailaDataProvide
|
||||
|
||||
if( displayStack != null )
|
||||
{
|
||||
final String currentCrafting = displayStack.getItemStack().getDisplayName();
|
||||
final String currentCrafting = displayStack.asItemStackRepresentation().getDisplayName();
|
||||
|
||||
currentToolTip.add( WailaText.Crafting.getLocal() + ": " + currentCrafting );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user