Compare commits

...
10 Commits
17 changed files with 204 additions and 184 deletions

No files matched your search

@@ -1187,7 +1187,15 @@ public class BookmarkPanel extends PanelWidget<BookmarkGrid> {
}
if (!items.isEmpty()) {
containerHandler.pullBookmarkItemsFromContainer(guiContainer, items);
final int helmStackIndex = FastTransferManager.dropHeldItem(guiContainer);
if (guiContainer.mc.thePlayer.inventory.getItemStack() == null) {
containerHandler.pullBookmarkItemsFromContainer(guiContainer, items);
if (helmStackIndex != -1) {
FastTransferManager.clickSlot(guiContainer, helmStackIndex, 0, 0);
}
}
}
return true;
@@ -1,7 +1,7 @@
package codechicken.nei;
import java.util.ArrayList;
import java.util.LinkedList;
import java.util.List;
import net.minecraft.client.gui.inventory.GuiContainer;
import net.minecraft.item.ItemStack;
@@ -12,36 +12,19 @@ public class DefaultBookmarkContainerHandler implements IBookmarkContainerHandle
@Override
public void pullBookmarkItemsFromContainer(GuiContainer guiContainer, ArrayList<ItemStack> bookmarkItems) {
FastTransferManager manager = new FastTransferManager();
LinkedList<ItemStack> containerStacks = manager.saveContainer(guiContainer.inventorySlots);
final FastTransferManager manager = new FastTransferManager();
final List<ItemStack> containerStacks = getStorageStacks(guiContainer);
for (ItemStack bookmarkItem : bookmarkItems) {
int bookmarkSizeBackup = bookmarkItem.stackSize;
for (int i = 0; i < containerStacks.size() - 4 * 9; i++) { // Last 36 slots are player inventory
ItemStack containerItem = containerStacks.get(i);
if (containerItem == null) {
continue;
}
for (int i = 0; i < containerStacks.size() && bookmarkItem.stackSize > 0; i++) {
final ItemStack containerItem = containerStacks.get(i);
if (bookmarkItem.isItemEqual(containerItem)) {
if (bookmarkItem.stackSize <= 0) {
break;
}
int transferAmount = Math.min(bookmarkItem.stackSize, containerItem.stackSize);
final int transferAmount = Math.min(bookmarkItem.stackSize, containerItem.stackSize);
manager.transferItems(guiContainer, i, transferAmount);
bookmarkItem.stackSize -= transferAmount;
if (bookmarkItem.stackSize == 0) {
break;
}
}
}
bookmarkItem.stackSize = bookmarkSizeBackup;
}
}
}
@@ -9,7 +9,9 @@ import java.util.HashMap;
import java.util.HashSet;
import java.util.LinkedList;
import net.minecraft.client.entity.EntityPlayerSP;
import net.minecraft.client.gui.inventory.GuiContainer;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.inventory.Container;
import net.minecraft.inventory.Slot;
import net.minecraft.item.ItemStack;
@@ -281,6 +283,27 @@ public class FastTransferManager {
GuiContainerManager.getManager(window).handleSlotClick(slotIndex, button, modifier);
}
public static int dropHeldItem(GuiContainer window) {
final EntityPlayerSP player = window.mc.thePlayer;
final ItemStack held = player.inventory.getItemStack();
if (held == null) return -1;
for (int i = 0; held != null && i < window.inventorySlots.inventorySlots.size(); i++) {
final Slot slot = window.inventorySlots.inventorySlots.get(i);
if (slot.inventory instanceof InventoryPlayer && !slot.getHasStack() && slot.isItemValid(held)) {
clickSlot(window, i, 0, 0);
if (player.inventory.getItemStack() == null) {
return i;
}
}
}
return -1;
}
private boolean fillZoneWithHeldItem(GuiContainer window, int zoneIndex) {
for (int transferTo : slotZones.get(zoneIndex)) {
ItemStack held = NEIClientUtils.getHeldItem();
@@ -70,8 +70,8 @@ public class ItemsTooltipLineHandler implements ITooltipLineHandler {
}
public void setActiveStack(ItemStack activeStack) {
final ItemStack realStack = items.stream()
.filter(stack -> NEIClientUtils.areStacksSameTypeWithNBT(stack, activeStack)).findFirst().orElse(null);
final ItemStack realStack = items.stream().filter(stack -> NEIClientUtils.areStacksSameType(stack, activeStack))
.findFirst().orElse(null);
this.activeStackIndex = items.indexOf(realStack);
}
@@ -851,24 +851,27 @@ public class NEIClientConfig {
}
public static void loadWorld(String worldPath) {
final File specificDir = new File(CommonUtils.getMinecraftDir(), "saves/NEI/" + worldPath);
final boolean newWorld = !specificDir.exists();
unloadWorld();
setInternalEnabled(true);
if (!worldPath.equals(NEIClientConfig.worldPath)) {
if (!worldPath.equals(NEIClientConfig.worldPath) || newWorld) {
NEIClientConfig.worldPath = worldPath;
logger.debug("Loading " + (Minecraft.getMinecraft().isSingleplayer() ? "Local" : "Remote") + " World");
final File specificDir = new File(CommonUtils.getMinecraftDir(), "saves/NEI/" + worldPath);
final boolean newWorld = !specificDir.exists();
if (newWorld) {
specificDir.mkdirs();
}
world = new ConfigSet(new File(specificDir, "NEI.dat"), new ConfigFile(new File(specificDir, "NEI.cfg")));
if (newWorld && Minecraft.getMinecraft().isSingleplayer()) {
world.config.getTag("inventory.cheatmode")
.setIntValue(NEIClientUtils.mc().playerController.isInCreativeMode() ? 2 : 0);
}
bootNEI();
onWorldLoad(newWorld);
onWorldLoad();
}
}
@@ -876,7 +879,7 @@ public class NEIClientConfig {
return NEIClientConfig.worldPath;
}
private static void onWorldLoad(boolean newWorld) {
private static void onWorldLoad() {
world.config.setComment(
"World based configuration of NEI.\nMost of these options can be changed ingame.\nDeleting any element will restore it to it's default value");
@@ -884,12 +887,6 @@ public class NEIClientConfig {
creativeInv = new ItemStack[54];
LayoutManager.searchField.setText(getSearchExpression());
LayoutManager.quantity.setText(Integer.toString(getItemQuantity()));
if (newWorld && Minecraft.getMinecraft().isSingleplayer()) {
world.config.getTag("inventory.cheatmode")
.setIntValue(NEIClientUtils.mc().playerController.isInCreativeMode() ? 2 : 0);
}
NEIInfo.load(ClientUtils.getWorld());
}
@@ -914,12 +911,7 @@ public class NEIClientConfig {
SubsetWidget.saveHidden();
FavoriteRecipes.save();
CollapsibleItems.saveStates();
if (world != null) {
world.saveNBT();
NEIClientConfig.worldPath = null;
world = null;
}
world.saveNBT();
}
private static final Map<String, String> keySettings = new HashMap<>();
@@ -117,7 +117,7 @@ public class PositionedStack {
public int getPermutationIndex(ItemStack stack) {
for (int index = 0; index < this.items.length; index++) {
if (NEIServerUtils.areStacksSameTypeCraftingWithNBT(items[index], stack)) {
if (NEIServerUtils.areStacksSameType(items[index], stack)) {
return index;
}
}
+1 -1
View File
@@ -89,7 +89,7 @@ public abstract class TextField extends Widget {
onTextChange(oldText);
}
return handled;
return handled || keyID == Keyboard.KEY_SPACE;
}
public abstract void onTextChange(String oldText);
@@ -15,7 +15,7 @@ public interface IBookmarkContainerHandler {
for (int i = 0; i < slots.size() - 4 * 9; i++) {
if (slots.get(i).getHasStack()) {
stacks.add(slots.get(i).getStack());
stacks.add(slots.get(i).getStack().copy());
}
}
@@ -7,7 +7,6 @@ import java.io.IOException;
import java.nio.charset.StandardCharsets;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@@ -16,6 +15,7 @@ import net.minecraft.nbt.NBTTagCompound;
import org.apache.commons.io.IOUtils;
import com.google.common.io.Files;
import com.google.gson.JsonArray;
import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
@@ -137,6 +137,7 @@ public class BookmarkStorage {
NBTTagCompound navigation = new NBTTagCompound();
namespaces.add(new BookmarkGrid());
BookmarkGrid grid = namespaces.get(0);
boolean wasError = false;
if (NEIClientConfig.world.nbt.hasKey("bookmark")) {
navigation = NEIClientConfig.world.nbt.getCompoundTag("bookmark");
@@ -151,17 +152,19 @@ public class BookmarkStorage {
}
if (itemStr.startsWith("; ")) {
JsonObject settings = parser.parse(itemStr.substring(2)).getAsJsonObject();
if (grid.size() > 0) {
// do not create empty namespaces
grid = new BookmarkGrid();
if (navigation.hasKey("namespacePage." + namespaces.size())) {
grid.setPage(navigation.getInteger("namespacePage." + namespaces.size()));
}
namespaces.add(grid);
}
if (navigation.hasKey("namespacePage." + (namespaces.size() - 1))) {
grid.setPage(navigation.getInteger("namespacePage." + (namespaces.size() - 1)));;
}
final JsonObject settings = parser.parse(itemStr.substring(2)).getAsJsonObject();
if (settings.get("viewmode") != null) {
grid.groups.get(BookmarkGrid.DEFAULT_GROUP_ID).viewMode = BookmarkViewMode
@@ -196,17 +199,28 @@ public class BookmarkStorage {
}
if (!addItemToGrid(grid, parser.parse(itemStr).getAsJsonObject())) {
wasError = true;
NEIClientConfig.logger.warn(
"Failed to load bookmarked ItemStack from json string, the item no longer exists:\n{}",
itemStr);
}
} catch (IllegalArgumentException | JsonSyntaxException | IllegalStateException e) {
} catch (Exception e) {
wasError = true;
NEIClientConfig.logger.error("Failed to load bookmarked ItemStack from json string:\n{}", itemStr);
}
}
prepareOldRecipeFormat(namespaces);
if (wasError) {
try {
Files.copy(
bookmarkFile,
new File(bookmarkFile.getAbsolutePath() + ".backup-" + System.currentTimeMillis()));
NEIClientConfig.logger.info("Backed up invalid bookmark file to {}", bookmarkFile);
} catch (IOException e) {
NEIClientConfig.logger.error("Failed to backup invalid bookmark file to {}", bookmarkFile, e);
}
}
for (BookmarkGrid gr : namespaces) {
gr.onItemsChanged();
@@ -264,48 +278,6 @@ public class BookmarkStorage {
return itemStack != null;
}
private void prepareOldRecipeFormat(List<BookmarkGrid> namespaces) {
for (BookmarkGrid grid : namespaces) {
if (grid.bookmarkItems.stream()
.noneMatch(item -> item.recipeId != null && item.recipeId.getResult() == null)) {
continue;
}
final Map<String, RecipeId> recipes = new HashMap<>();
for (BookmarkItem item : grid.bookmarkItems) {
if (item.recipeId != null && item.type != BookmarkItemType.INGREDIENT
&& item.recipeId.getResult() == null) {
final JsonObject recipeJson = item.recipeId.toJsonObject();
final String recipeGUID = item.groupId + ":" + NBTJson.toJson(recipeJson);
if (!recipes.containsKey(recipeGUID)) {
recipeJson.add("result", NBTJson.toJsonObject(StackInfo.itemStackToNBT(item.itemStack)));
recipes.put(recipeGUID, item.recipeId = RecipeId.of(recipeJson));
}
}
}
for (BookmarkItem item : grid.bookmarkItems) {
if (item.recipeId != null && item.recipeId.getResult() == null) {
final JsonObject recipeJson = item.recipeId.toJsonObject();
final String recipeGUID = item.groupId + ":" + NBTJson.toJson(recipeJson);
if (recipes.containsKey(recipeGUID)) {
item.recipeId = recipes.get(recipeGUID).copy();
item.permutations = BookmarkItem.generatePermutations(
item.itemStack,
item.recipeId,
item.type == BookmarkItemType.INGREDIENT);
} else {
item.recipeId = null;
}
}
}
}
}
public void save() {
if (this.bookmarkFile == null) {
@@ -350,22 +350,20 @@ public class RecipeChainDetails {
private Set<RecipeId> getRecipeParents(RecipeChainMath math, RecipeId recipeId, Set<RecipeId> parents,
Set<RecipeId> visited) {
final Set<RecipeId> recipeIds = math.preferredItems.entrySet().stream()
.filter(
entry -> entry.getValue() != null && recipeId.equals(entry.getValue().recipeId)
&& !visited.contains(entry.getKey().recipeId))
.filter(entry -> entry.getValue() != null && recipeId.equals(entry.getValue().recipeId))
.map(entry -> entry.getKey().recipeId).collect(Collectors.toSet());
visited.addAll(recipeIds);
if (recipeIds.isEmpty()) {
parents.add(recipeId);
} else {
for (RecipeId ingrRecipeId : recipeIds) {
if (math.outputRecipes.containsKey(ingrRecipeId)) {
parents.add(ingrRecipeId);
} else {
getRecipeParents(math, ingrRecipeId, parents, visited);
if (visited.add(ingrRecipeId)) {
if (math.outputRecipes.containsKey(ingrRecipeId)) {
parents.add(ingrRecipeId);
} else {
getRecipeParents(math, ingrRecipeId, parents, visited);
}
}
}
@@ -6,10 +6,10 @@ import java.util.HashSet;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.Set;
import net.minecraft.client.entity.EntityClientPlayerMP;
import net.minecraft.client.gui.inventory.GuiContainer;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.inventory.Slot;
import net.minecraft.inventory.SlotCrafting;
@@ -50,17 +50,17 @@ public class DefaultOverlayHandler implements IOverlayHandler {
public Slot[] slots;
}
public DefaultOverlayHandler(int x, int y) {
offsetx = x;
offsety = y;
}
public int offsetx;
public int offsety;
public DefaultOverlayHandler() {
this(5, 11);
}
public int offsetx;
public int offsety;
public DefaultOverlayHandler(int x, int y) {
this.offsetx = x;
this.offsety = y;
}
@Override
public void overlayRecipe(GuiContainer gui, IRecipeHandler handler, int recipeIndex, boolean maxTransfer) {
@@ -72,7 +72,7 @@ public class DefaultOverlayHandler implements IOverlayHandler {
final List<PositionedStack> ingredients = handler.getIngredientStacks(recipeIndex);
final List<DistributedIngred> ingredStacks = getPermutationIngredients(ingredients);
if (!clearIngredients(gui)) return 0;
if (!clearIngredients(gui, handler)) return 0;
findInventoryQuantities(gui, ingredStacks);
@@ -99,12 +99,17 @@ public class DefaultOverlayHandler implements IOverlayHandler {
}
@Override
public boolean craft(GuiContainer firstGui, IRecipeHandler recipe, int recipeIndex, int multiplier) {
final EntityClientPlayerMP thePlayer = NEIClientUtils.mc().thePlayer;
boolean craft = false;
public boolean craft(GuiContainer firstGui, IRecipeHandler handler, int recipeIndex, int multiplier) {
final Slot craftingSlot = firstGui.inventorySlots.inventorySlots.stream()
.filter(slot -> slot instanceof SlotCrafting).findFirst().orElse(null);
if (craftingSlot == null) {
return false;
}
boolean craft = false;
while (multiplier > 0) {
final int transfer = transferRecipe(firstGui, recipe, recipeIndex, multiplier);
final int transfer = transferRecipe(firstGui, handler, recipeIndex, multiplier);
if (transfer <= 0) {
break;
@@ -112,43 +117,88 @@ public class DefaultOverlayHandler implements IOverlayHandler {
multiplier -= transfer;
for (Slot slot : firstGui.inventorySlots.inventorySlots) {
if (slot.getHasStack() && slot instanceof SlotCrafting && slot.canTakeStack(thePlayer)) {
FastTransferManager.clickSlot(firstGui, slot.slotNumber, 0, 1);
craft = true;
break;
}
if (craftingSlot.getHasStack() && craftingSlot.canTakeStack(firstGui.mc.thePlayer)) {
FastTransferManager.clickSlot(firstGui, craftingSlot.slotNumber, 0, 1);
craft = true;
}
}
clearIngredients(firstGui);
clearIngredients(firstGui, handler);
return craft;
}
private boolean clearIngredients(GuiContainer gui) {
final EntityClientPlayerMP thePlayer = NEIClientUtils.mc().thePlayer;
protected boolean clearIngredients(GuiContainer gui, IRecipeHandler handler) {
for (Slot slot : gui.inventorySlots.inventorySlots) {
if (slot.getHasStack() && !canMoveFrom(slot, gui)
&& !(slot instanceof SlotCrafting)
&& slot.canTakeStack(thePlayer)) {
for (Slot slot : getCraftMatrixSlots(gui, handler)) {
if (slot.canTakeStack(gui.mc.thePlayer)) {
FastTransferManager.clickSlot(gui, slot.slotNumber, 0, 1);
if (slot.getHasStack()) return false;
}
}
return dropOffMouseStack(thePlayer, gui);
FastTransferManager.dropHeldItem(gui);
return gui.mc.thePlayer.inventory.getItemStack() == null;
}
/**
* Gets the slots in the crafting matrix for the given GUI and recipe handler.
*
* @param gui
* @param handler
* @return
*/
protected Set<Slot> getCraftMatrixSlots(GuiContainer gui, IRecipeHandler handler) {
final PositionedStack firstIngr = handler.getIngredientStacks(0).get(0);
final Map<Integer, Slot> grid = new HashMap<>();
final Set<Slot> ingredSlots = new HashSet<>();
for (Slot slot : gui.inventorySlots.inventorySlots) {
final int key = (slot.xDisplayPosition - this.offsetx) * 10_000 + (slot.yDisplayPosition - this.offsety);
grid.put(key, slot);
}
int left = firstIngr.relx;
int top = firstIngr.rely;
int right = left;
int bottom = top;
while (grid.containsKey((left - 18) * 10_000 + firstIngr.rely)) {
left -= 18;
}
while (grid.containsKey((right + 18) * 10_000 + firstIngr.rely)) {
right += 18;
}
while (grid.containsKey(firstIngr.relx * 10_000 + (top - 18))) {
top -= 18;
}
while (grid.containsKey(firstIngr.relx * 10_000 + (bottom + 18))) {
bottom += 18;
}
for (int x = left; x <= right; x += 18) {
for (int y = top; y <= bottom; y += 18) {
final Slot slot = grid.get(x * 10_000 + y);
if (slot != null && !(slot.inventory instanceof InventoryPlayer)) {
ingredSlots.add(slot);
}
}
}
return ingredSlots;
}
private void moveIngredients(GuiContainer gui, List<IngredientDistribution> assignedIngredients, int multiplier) {
final EntityClientPlayerMP thePlayer = NEIClientUtils.mc().thePlayer;
for (Slot slot : gui.inventorySlots.inventorySlots) {
if (slot instanceof SlotCrafting || !slot.getHasStack()
|| !canMoveFrom(slot, gui)
|| !slot.canTakeStack(thePlayer))
|| !slot.canTakeStack(gui.mc.thePlayer))
continue;
ItemStack stack = slot.getStack();
int slotTransferCap = stack.getMaxStackSize();
@@ -186,7 +236,7 @@ public class DefaultOverlayHandler implements IOverlayHandler {
}
if (thePlayer.inventory.getItemStack() != null) {
if (gui.mc.thePlayer.inventory.getItemStack() != null) {
FastTransferManager.clickSlot(gui, slot.slotNumber);
}
}
@@ -194,33 +244,6 @@ public class DefaultOverlayHandler implements IOverlayHandler {
}
}
protected boolean dropOffMouseStack(EntityPlayer entityPlayer, GuiContainer gui) {
if (entityPlayer.inventory.getItemStack() == null) {
return true;
}
for (int i = 0; i < gui.inventorySlots.inventorySlots.size(); i++) {
Slot slot = gui.inventorySlots.inventorySlots.get(i);
if (slot.inventory == entityPlayer.inventory) {
ItemStack mouseItem = entityPlayer.inventory.getItemStack();
ItemStack slotStack = slot.getStack();
if (slotStack == null || NEIClientUtils.areStacksSameType(mouseItem, slotStack)) {
FastTransferManager.clickSlot(gui, i, 0, 0);
}
if (entityPlayer.inventory.getItemStack() == null) {
return true;
}
}
}
return entityPlayer.inventory.getItemStack() == null;
}
private int calculateRecipeQuantity(List<IngredientDistribution> assignedIngredients) {
int quantity = Integer.MAX_VALUE;
@@ -134,13 +134,6 @@ public class GuiRecipeCatalyst extends ScrollContainer {
int index = 0;
for (PositionedStack pStack : this.items) {
if (pStack.items.length > 1) {
final int stackIndex = (pStack.items.length + pStack.getPermutationIndex(pStack.item) + 1)
% pStack.items.length;
pStack.setPermutationToRender(stackIndex);
}
pStack.relx = visibleWidth - SLOT_SIZE - (index / rows) * SLOT_SIZE;
pStack.rely = (index % rows) * SLOT_SIZE;
index++;
@@ -27,8 +27,6 @@ public class HandlerInfo {
private int height = DEFAULT_HEIGHT;
private int width = DEFAULT_WIDTH;
@Deprecated
private int maxRecipesPerPage = DEFAULT_MAX_PER_PAGE;
private boolean multipleWidgetsAllowed = false;
private boolean showFavoritesButton = true;
private boolean showOverlayButton = true;
@@ -161,6 +159,10 @@ public class HandlerInfo {
this(handlerClazz.getName(), modName, modId);
}
public Builder setDisplayStack(String itemId, String nbtString) {
return setDisplayStack(NEIServerUtils.getModdedItem(itemId, nbtString));
}
public Builder setDisplayStack(ItemStack stack) {
this.info.image = null;
this.info.itemStack = stack;
@@ -200,6 +202,16 @@ public class HandlerInfo {
return this;
}
public Builder setShowOverlayButton(boolean showOverlayButton) {
this.info.showOverlayButton = showOverlayButton;
return this;
}
public Builder setShowFavoritesButton(boolean showFavoritesButton) {
this.info.showFavoritesButton = showFavoritesButton;
return this;
}
@Deprecated
public Builder setMaxRecipesPerPage(int maxRecipesPerPage) {
this.info.multipleWidgetsAllowed = maxRecipesPerPage > 1;
@@ -34,13 +34,12 @@ public class InformationHandler extends TemplateRecipeHandler {
@Override
public void drawExtras(int recipe) {
CachedInfoPage page = (CachedInfoPage) this.arecipes.get(recipe);
drawWrappedText(StatCollector.translateToLocal(page.getPage().info).replace("\\n", "\n"), 4, 24);
final CachedInfoPage page = (CachedInfoPage) this.arecipes.get(recipe);
drawWrappedText(page.getLines(), 4, 24);
}
private void drawWrappedText(String text, int x, int y) {
FontRenderer font = Minecraft.getMinecraft().fontRenderer;
List<String> lines = font.listFormattedStringToWidth(text, 156);
private void drawWrappedText(List<String> lines, int x, int y) {
final FontRenderer font = Minecraft.getMinecraft().fontRenderer;
for (String line : lines) {
font.drawString(line, x, y, 0);
y += 10;
@@ -82,14 +81,23 @@ public class InformationHandler extends TemplateRecipeHandler {
return "nei:textures/gui/recipebg.png";
}
@Override
public int getRecipeHeight(int recipe) {
final CachedInfoPage page = (CachedInfoPage) this.arecipes.get(recipe);
return 24 + page.getLines().size() * 10;
}
private class CachedInfoPage extends CachedRecipe {
private final InformationPage page;
private final PositionedStack stack;
private final List<String> lines;
public CachedInfoPage(InformationPage page) {
this.page = page;
stack = new PositionedStack(page.items, 75, 2);
final FontRenderer font = Minecraft.getMinecraft().fontRenderer;
final String info = StatCollector.translateToLocal(page.info).replace("\\n", "\n");
this.lines = font.listFormattedStringToWidth(info, 156);
this.stack = new PositionedStack(page.items, 75, 2);
}
@Override
@@ -102,8 +110,8 @@ public class InformationHandler extends TemplateRecipeHandler {
return Collections.singletonList(this.stack);
}
public InformationPage getPage() {
return page;
public List<String> getLines() {
return lines;
}
}
@@ -236,6 +236,12 @@ public class Recipe {
return false;
}
if (isShapedRecipe() && this.result != null
&& anRecipeId.result != null
&& !StackInfo.equalItemAndNBT(this.result, anRecipeId.result, true)) {
return false;
}
for (int idx = 0; idx < this.ingredients.size(); idx++) {
if (!StackInfo.equalItemAndNBT(this.ingredients.get(idx), anRecipeId.ingredients.get(idx), true)) {
return false;
@@ -112,7 +112,8 @@ public class GTFluidStackStringifyHandler implements IStackStringifyHandler {
public ItemStack normalizeRecipeQueryStack(ItemStack stack) {
if (stack.getItem() == GameRegistry.findItem("ae2fc", "fluid_drop")) {
if (stack.getItem() == GameRegistry.findItem("ae2fc", "fluid_drop")
|| stack.getItem() == GameRegistry.findItem("ae2fc", "fluid_packet")) {
final FluidStack fluidStack = getFluid(stack);
if (fluidStack != null) {
@@ -292,6 +292,7 @@ nei.options.inventory.guirecipe.cycledIngredientsTooltip=Cycled Ingredients Tool
nei.options.inventory.guirecipe.cycledIngredientsTooltip.true=Show
nei.options.inventory.guirecipe.cycledIngredientsTooltip.false=Hide
nei.options.inventory.guirecipe.handlerInfo=Handler Info Widget
nei.options.inventory.guirecipe.handlerInfo.tip=Use shift+d while in the Recipes GUI
nei.options.inventory.guirecipe.handlerInfo.true=Enabled
nei.options.inventory.guirecipe.handlerInfo.false=Disabled
nei.options.inventory.guirecipe.maxHeight=Max Height