mirror of
https://github.com/GTNewHorizons/NotEnoughItems.git
synced 2026-11-16 18:54:45 +00:00
Compare commits
13
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4562ecf087 | ||
|
|
d621d5d5bd | ||
|
|
3175b316af | ||
|
|
61930ac7a8 | ||
|
|
fcbf1dcade | ||
|
|
3fa69e826c | ||
|
|
31fff21a55 | ||
|
|
2e9ab88692 | ||
|
|
a02d293d44 | ||
|
|
1265113390 | ||
|
|
4ffd614017 | ||
|
|
41554f4c5b | ||
|
|
2104184077 |
No files matched your search
+2
-2
@@ -1,8 +1,8 @@
|
||||
// Add your dependencies here
|
||||
|
||||
dependencies {
|
||||
api('com.github.GTNewHorizons:CodeChickenCore:1.4.12:dev')
|
||||
devOnlyNonPublishable('com.github.GTNewHorizons:GTNHLib:0.9.47:dev')
|
||||
api('com.github.GTNewHorizons:CodeChickenCore:1.4.15:dev')
|
||||
devOnlyNonPublishable('com.github.GTNewHorizons:GTNHLib:0.11.15:dev')
|
||||
|
||||
shadowImplementation('org.apache.commons:commons-csv:1.10.0')
|
||||
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
#This file is generated by updateDaemonJvm
|
||||
toolchainUrl.FREE_BSD.AARCH64=https\://api.foojay.io/disco/v3.0/ids/1630f7ebef05444cb27a2709ea0249b3/redirect
|
||||
toolchainUrl.FREE_BSD.X86_64=https\://api.foojay.io/disco/v3.0/ids/cd495626d2ee49a75447e3fdc6afb287/redirect
|
||||
toolchainUrl.LINUX.AARCH64=https\://api.foojay.io/disco/v3.0/ids/1630f7ebef05444cb27a2709ea0249b3/redirect
|
||||
toolchainUrl.LINUX.X86_64=https\://api.foojay.io/disco/v3.0/ids/cd495626d2ee49a75447e3fdc6afb287/redirect
|
||||
toolchainUrl.MAC_OS.AARCH64=https\://api.foojay.io/disco/v3.0/ids/d4fd992c9557644e637ebe98263e0ae7/redirect
|
||||
toolchainUrl.MAC_OS.X86_64=https\://api.foojay.io/disco/v3.0/ids/faa12903720d410b387cc69ccafb1a74/redirect
|
||||
toolchainUrl.UNIX.AARCH64=https\://api.foojay.io/disco/v3.0/ids/1630f7ebef05444cb27a2709ea0249b3/redirect
|
||||
toolchainUrl.UNIX.X86_64=https\://api.foojay.io/disco/v3.0/ids/cd495626d2ee49a75447e3fdc6afb287/redirect
|
||||
toolchainUrl.WINDOWS.AARCH64=https\://api.foojay.io/disco/v3.0/ids/a4c09dd2e2d7079373d30e524bbc2829/redirect
|
||||
toolchainUrl.WINDOWS.X86_64=https\://api.foojay.io/disco/v3.0/ids/8e1d9ee5d0f13e442218f6884a306da1/redirect
|
||||
toolchainUrl.FREE_BSD.AARCH64=https\://api.foojay.io/disco/v3.0/ids/cf726b4a1c84b50457225f9bba6d7650/redirect
|
||||
toolchainUrl.FREE_BSD.X86_64=https\://api.foojay.io/disco/v3.0/ids/fa1e318c287360478e3c83a9a3ef1007/redirect
|
||||
toolchainUrl.LINUX.AARCH64=https\://api.foojay.io/disco/v3.0/ids/cf726b4a1c84b50457225f9bba6d7650/redirect
|
||||
toolchainUrl.LINUX.X86_64=https\://api.foojay.io/disco/v3.0/ids/fa1e318c287360478e3c83a9a3ef1007/redirect
|
||||
toolchainUrl.MAC_OS.AARCH64=https\://api.foojay.io/disco/v3.0/ids/c2dd35c9d0aaf0ba6ad0791320f99dfc/redirect
|
||||
toolchainUrl.MAC_OS.X86_64=https\://api.foojay.io/disco/v3.0/ids/e5810bd7fd1f8a586644409d395a7e55/redirect
|
||||
toolchainUrl.UNIX.AARCH64=https\://api.foojay.io/disco/v3.0/ids/cf726b4a1c84b50457225f9bba6d7650/redirect
|
||||
toolchainUrl.UNIX.X86_64=https\://api.foojay.io/disco/v3.0/ids/fa1e318c287360478e3c83a9a3ef1007/redirect
|
||||
toolchainUrl.WINDOWS.AARCH64=https\://api.foojay.io/disco/v3.0/ids/7b3c4877c0749019e6805bb61e421497/redirect
|
||||
toolchainUrl.WINDOWS.X86_64=https\://api.foojay.io/disco/v3.0/ids/d76df094a9cbbabd3b08251f9e61444a/redirect
|
||||
toolchainVersion=25
|
||||
+1
-1
@@ -17,7 +17,7 @@ pluginManagement {
|
||||
}
|
||||
|
||||
plugins {
|
||||
id 'com.gtnewhorizons.gtnhsettingsconvention' version '2.0.24'
|
||||
id 'com.gtnewhorizons.gtnhsettingsconvention' version '2.0.26'
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -189,14 +189,14 @@ public class BookmarkPanel extends PanelWidget<BookmarkGrid> {
|
||||
final BookmarkItem.Builder builder;
|
||||
|
||||
if (recipe != null) {
|
||||
builder = BookmarkItem.builder(groupId, itemStack, recipe, BookmarkItemType.RESULT);
|
||||
} else {
|
||||
builder = BookmarkItem.builder(groupId, itemStack, recipe, BookmarkItemType.RESULT).multiplier(1);
|
||||
} else if (recipeId != null) {
|
||||
builder = BookmarkItem.builder(groupId, itemStack).recipeId(recipeId)
|
||||
.factor(StackInfo.getAmount(itemStack));
|
||||
.factor(StackInfo.getAmount(itemStack)).multiplier(1);
|
||||
} else {
|
||||
builder = BookmarkItem.builder(groupId, itemStack).factor(1).multiplier(StackInfo.getAmount(itemStack));
|
||||
}
|
||||
|
||||
builder.multiplier(1);
|
||||
|
||||
if (existsRecipe) {
|
||||
builder.type(BookmarkItemType.RESULT);
|
||||
|
||||
|
||||
@@ -45,6 +45,7 @@ import codechicken.core.ClassDiscoverer;
|
||||
import codechicken.core.ClientUtils;
|
||||
import codechicken.lib.packet.PacketCustom;
|
||||
import codechicken.nei.api.API;
|
||||
import codechicken.nei.api.GuiInfo;
|
||||
import codechicken.nei.api.IConfigureNEI;
|
||||
import codechicken.nei.api.ItemInfo;
|
||||
import codechicken.nei.guihook.GuiContainerManager;
|
||||
@@ -374,6 +375,7 @@ public class ClientHandler {
|
||||
} else if (event.gui == null) {
|
||||
/* prevent WorldClient reference being held in the Gui */
|
||||
NEIController.manager = null;
|
||||
GuiInfo.clearGuiHandlers();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -15,6 +15,7 @@ import net.minecraft.client.shader.Framebuffer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
import org.lwjgl.opengl.GL30;
|
||||
|
||||
import codechicken.lib.vec.Rectangle4i;
|
||||
import codechicken.nei.api.GuiInfo;
|
||||
@@ -27,7 +28,7 @@ public abstract class ItemsGrid<T extends ItemsGrid.ItemsGridSlot, M extends Ite
|
||||
protected static class ScreenCapture {
|
||||
|
||||
private long nextCacheRefresh = 0;
|
||||
private Framebuffer framebuffer;
|
||||
private final Framebuffer framebuffer;
|
||||
|
||||
public ScreenCapture() {
|
||||
this.framebuffer = new Framebuffer(1, 1, true);
|
||||
@@ -51,7 +52,7 @@ public abstract class ItemsGrid<T extends ItemsGrid.ItemsGridSlot, M extends Ite
|
||||
}
|
||||
|
||||
public void captureScreen(Runnable callback, int mode) {
|
||||
GL11.glPushAttrib(GL11.GL_ENABLE_BIT | GL11.GL_COLOR_BUFFER_BIT | GL11.GL_LIGHTING_BIT);
|
||||
GL11.glPushAttrib(GL11.GL_ENABLE_BIT);
|
||||
|
||||
resetFramebuffer();
|
||||
this.framebuffer.bindFramebuffer(false);
|
||||
@@ -84,6 +85,21 @@ public abstract class ItemsGrid<T extends ItemsGrid.ItemsGridSlot, M extends Ite
|
||||
} else {
|
||||
this.framebuffer.framebufferClear();
|
||||
}
|
||||
|
||||
// Copy stencil values (required by mui2)
|
||||
OpenGlHelper.func_153171_g(GL30.GL_READ_FRAMEBUFFER, minecraft.getFramebuffer().framebufferObject);
|
||||
OpenGlHelper.func_153171_g(GL30.GL_DRAW_FRAMEBUFFER, this.framebuffer.framebufferObject);
|
||||
GL30.glBlitFramebuffer(
|
||||
0,
|
||||
0,
|
||||
minecraft.displayWidth,
|
||||
minecraft.displayHeight,
|
||||
0,
|
||||
0,
|
||||
minecraft.displayWidth,
|
||||
minecraft.displayHeight,
|
||||
GL11.GL_DEPTH_BUFFER_BIT | GL11.GL_STENCIL_BUFFER_BIT,
|
||||
GL11.GL_NEAREST);
|
||||
}
|
||||
|
||||
public void renderCapturedScreen() {
|
||||
|
||||
@@ -54,6 +54,7 @@ public class NEIActions {
|
||||
addAction("magnet", true);
|
||||
addAction("enchant", true);
|
||||
addAction("potion", true);
|
||||
addAction("autocraft");
|
||||
|
||||
canDisable.add("dawn");
|
||||
canDisable.add("noon");
|
||||
|
||||
@@ -263,6 +263,10 @@ public class NEIClientConfig {
|
||||
.setComment("Require holding shift to move items when overlaying recipe").getBooleanValue(true);
|
||||
API.addOption(new OptionToggleButton("inventory.guirecipe.shiftOverlayRecipe", true));
|
||||
|
||||
tag.getTag("inventory.guirecipe.scrollPages").setComment("Disable page scroll when overlaying recipe")
|
||||
.getBooleanValue(true);
|
||||
API.addOption(new OptionToggleButton("inventory.guirecipe.scrollPages", true));
|
||||
|
||||
tag.getTag("inventory.guirecipe.profile").getBooleanValue(false);
|
||||
API.addOption(new OptionToggleButton("inventory.guirecipe.profile", true));
|
||||
|
||||
@@ -1045,7 +1049,9 @@ public class NEIClientConfig {
|
||||
}
|
||||
|
||||
public static boolean autocraftingEnabled() {
|
||||
return getBooleanSetting("inventory.autocrafting");
|
||||
if (!getBooleanSetting("inventory.autocrafting")) return false;
|
||||
if (hasSMPCounterpart) return permissableActions.contains("autocraft");
|
||||
return true;
|
||||
}
|
||||
|
||||
public static boolean favoritesEnabled() {
|
||||
|
||||
@@ -108,6 +108,7 @@ public class NEIServerConfig {
|
||||
setDefaultFeature("save-state");
|
||||
setDefaultFeature("item");
|
||||
setDefaultFeature("delete");
|
||||
setDefaultFeature("autocraft", "ALL");
|
||||
setDefaultFeature("notify-item", "CONSOLE, OP");
|
||||
}
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@ import java.util.LinkedList;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import codechicken.nei.NEIClientConfig;
|
||||
import codechicken.nei.config.GuiOptionList;
|
||||
import codechicken.nei.config.OptionCycled;
|
||||
|
||||
public class NEIInfo {
|
||||
@@ -13,7 +14,8 @@ public class NEIInfo {
|
||||
|
||||
public static void load(World world) {
|
||||
OptionCycled modeOption = (OptionCycled) NEIClientConfig.getOptionList().getOption("inventory.cheatmode");
|
||||
modeOption.parent.synthesizeEnvironment(false);
|
||||
// kept alive so the WeakReference in Option.slotRef isn't GC'd before copyGlobals/cycle use it
|
||||
GuiOptionList env = modeOption.parent.synthesizeEnvironment(false);
|
||||
if (!modeOption.optionValid(modeOption.value())) {
|
||||
modeOption.copyGlobals();
|
||||
modeOption.cycle();
|
||||
|
||||
@@ -93,7 +93,7 @@ public abstract class DataDumper extends Option {
|
||||
|
||||
public Rectangle4i dumpButtonSize() {
|
||||
int width = 80;
|
||||
return new Rectangle4i(slot.slotWidth() - width, 0, width, 20);
|
||||
return new Rectangle4i(getSlot().slotWidth() - width, 0, width, 20);
|
||||
}
|
||||
|
||||
public Rectangle4i modeButtonSize() {
|
||||
|
||||
@@ -64,7 +64,7 @@ public class GuiHighlightTips extends GuiScreenWidget {
|
||||
@Override
|
||||
public void keyTyped(char c, int keycode) {
|
||||
if (keycode == Keyboard.KEY_ESCAPE || keycode == Keyboard.KEY_BACK) {
|
||||
Minecraft.getMinecraft().displayGuiScreen(opt.slot.getGui());
|
||||
Minecraft.getMinecraft().displayGuiScreen(opt.getSlot().getGui());
|
||||
return;
|
||||
}
|
||||
super.keyTyped(c, keycode);
|
||||
|
||||
@@ -62,7 +62,7 @@ public class GuiItemIconDumper extends GuiScreen {
|
||||
}
|
||||
|
||||
private void returnScreen(IChatComponent msg) {
|
||||
Minecraft.getMinecraft().displayGuiScreen(opt.slot.getGui());
|
||||
Minecraft.getMinecraft().displayGuiScreen(opt.getSlot().getGui());
|
||||
NEIClientUtils.printChatMessage(msg);
|
||||
}
|
||||
|
||||
|
||||
@@ -98,7 +98,7 @@ public class GuiItemSorter extends GuiOptionPane {
|
||||
|
||||
@Override
|
||||
public GuiScreen getParentScreen() {
|
||||
return opt.slot.getGui();
|
||||
return opt.getSlot().getGui();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -247,7 +247,7 @@ public class GuiPanelSettings extends GuiScreenWidget {
|
||||
public void keyTyped(char c, int keycode) {
|
||||
|
||||
if (keycode == Keyboard.KEY_ESCAPE || keycode == Keyboard.KEY_BACK) {
|
||||
Minecraft.getMinecraft().displayGuiScreen(opt.slot.getGui());
|
||||
Minecraft.getMinecraft().displayGuiScreen(opt.getSlot().getGui());
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package codechicken.nei.config;
|
||||
|
||||
import java.lang.ref.WeakReference;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
@@ -17,7 +18,11 @@ public abstract class Option {
|
||||
.playSound(PositionedSoundRecord.func_147674_a(new ResourceLocation("gui.button.press"), 1.0F));
|
||||
}
|
||||
|
||||
public OptionScrollSlot slot;
|
||||
private WeakReference<OptionScrollSlot> slotRef;
|
||||
|
||||
public OptionScrollSlot getSlot() {
|
||||
return slotRef != null ? slotRef.get() : null;
|
||||
}
|
||||
|
||||
public String namespace = null;
|
||||
public final String name;
|
||||
@@ -134,7 +139,7 @@ public abstract class Option {
|
||||
* @return true if the gui is in world config mode
|
||||
*/
|
||||
public boolean worldConfig() {
|
||||
return slot.getGui().worldConfig();
|
||||
return getSlot().getGui().worldConfig();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -189,7 +194,7 @@ public abstract class Option {
|
||||
}
|
||||
|
||||
public void onAdded(OptionScrollSlot slot) {
|
||||
this.slot = slot;
|
||||
this.slotRef = new WeakReference<>(slot);
|
||||
}
|
||||
|
||||
public void onAdded(OptionList list) {
|
||||
|
||||
@@ -57,10 +57,10 @@ public abstract class OptionButton extends Option {
|
||||
}
|
||||
|
||||
public Rectangle buttonSize() {
|
||||
if (getPrefix() == null) return new Rectangle(0, 0, slot.slotWidth(), 20);
|
||||
if (getPrefix() == null) return new Rectangle(0, 0, getSlot().slotWidth(), 20);
|
||||
|
||||
int width = Math.max(60, getStringWidth(getButtonText()) + 8);
|
||||
return new Rectangle(slot.slotWidth() - width, 0, width, 20);
|
||||
return new Rectangle(getSlot().slotWidth() - width, 0, width, 20);
|
||||
}
|
||||
|
||||
public String getPrefix() {
|
||||
|
||||
@@ -85,7 +85,7 @@ public class OptionKeyBind extends OptionButton {
|
||||
return false;
|
||||
}
|
||||
|
||||
for (Option o : slot.options) {
|
||||
for (Option o : getSlot().options) {
|
||||
if (o instanceof OptionKeyBind && o != this && ((OptionKeyBind) o).getValue() == keyboard) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -131,13 +131,15 @@ public class OptionList extends OptionButton {
|
||||
/**
|
||||
* Adds this option to a temporary slot and gui for internal setting manipulation.
|
||||
*/
|
||||
public void synthesizeEnvironment(boolean world) {
|
||||
getGui(null, this, world).addWidgets();
|
||||
public GuiOptionList synthesizeEnvironment(boolean world) {
|
||||
GuiOptionList gui = getGui(null, this, world);
|
||||
gui.addWidgets();
|
||||
return gui;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onClick(int button) {
|
||||
openGui(slot.getGui(), slot.getGui().worldConfig());
|
||||
openGui(getSlot().getGui(), getSlot().getGui().worldConfig());
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -131,6 +131,6 @@ public abstract class OptionStringSet extends Option {
|
||||
}
|
||||
|
||||
public int buttonX() {
|
||||
return slot.slotWidth() - (24 * options.size() - 4);
|
||||
return getSlot().slotWidth() - (24 * options.size() - 4);
|
||||
}
|
||||
}
|
||||
@@ -53,7 +53,7 @@ public class OptionTextField extends Option {
|
||||
}
|
||||
|
||||
protected int getMaxInputWidth() {
|
||||
return slot.slotWidth();
|
||||
return getSlot().slotWidth();
|
||||
}
|
||||
|
||||
public boolean isEnabled() {
|
||||
@@ -64,9 +64,10 @@ public class OptionTextField extends Option {
|
||||
public void draw(int mousex, int mousey, float frame) {
|
||||
GuiDraw.drawString(getPrefix(), 10, 6, -1);
|
||||
|
||||
textField.w = Math
|
||||
.max(60, Math.min(getMaxInputWidth(), slot.slotWidth() - GuiDraw.getStringWidth(getPrefix())) - 16);
|
||||
textField.x = slot.slotWidth() - textField.w;
|
||||
textField.w = Math.max(
|
||||
60,
|
||||
Math.min(getMaxInputWidth(), getSlot().slotWidth() - GuiDraw.getStringWidth(getPrefix())) - 16);
|
||||
textField.x = getSlot().slotWidth() - textField.w;
|
||||
textField.draw(mousex, mousey);
|
||||
}
|
||||
|
||||
|
||||
@@ -253,7 +253,7 @@ public class GuiPresetList extends GuiOptionPane {
|
||||
|
||||
@Override
|
||||
public GuiScreen getParentScreen() {
|
||||
return opt.slot.getGui();
|
||||
return opt.getSlot().getGui();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -197,7 +197,7 @@ public class DefaultOverlayHandler implements IOverlayHandler {
|
||||
return ingredSlots;
|
||||
}
|
||||
|
||||
private void moveIngredients(GuiContainer gui, List<IngredientDistribution> assignedIngredients, int multiplier) {
|
||||
protected void moveIngredients(GuiContainer gui, List<IngredientDistribution> assignedIngredients, int multiplier) {
|
||||
final Slot craftingSlot = getCraftingResultSlot(gui);
|
||||
|
||||
for (Slot slot : gui.inventorySlots.inventorySlots) {
|
||||
@@ -249,7 +249,7 @@ public class DefaultOverlayHandler implements IOverlayHandler {
|
||||
}
|
||||
}
|
||||
|
||||
private int calculateRecipeQuantity(List<IngredientDistribution> assignedIngredients) {
|
||||
protected int calculateRecipeQuantity(List<IngredientDistribution> assignedIngredients) {
|
||||
int quantity = Integer.MAX_VALUE;
|
||||
|
||||
for (IngredientDistribution distrib : assignedIngredients) {
|
||||
@@ -275,7 +275,7 @@ public class DefaultOverlayHandler implements IOverlayHandler {
|
||||
return quantity;
|
||||
}
|
||||
|
||||
private Slot[][] assignIngredSlots(GuiContainer gui, List<PositionedStack> ingredients,
|
||||
protected Slot[][] assignIngredSlots(GuiContainer gui, List<PositionedStack> ingredients,
|
||||
List<IngredientDistribution> assignedIngredients) {
|
||||
Slot[][] recipeSlots = mapIngredSlots(gui, ingredients); // setup the slot map
|
||||
|
||||
@@ -320,7 +320,7 @@ public class DefaultOverlayHandler implements IOverlayHandler {
|
||||
return recipeSlots;
|
||||
}
|
||||
|
||||
private List<IngredientDistribution> assignIngredients(List<PositionedStack> ingredients,
|
||||
protected List<IngredientDistribution> assignIngredients(List<PositionedStack> ingredients,
|
||||
List<DistributedIngred> ingredStacks) {
|
||||
ArrayList<IngredientDistribution> assignedIngredients = new ArrayList<>();
|
||||
for (PositionedStack posstack : ingredients) // assign what we need and have
|
||||
@@ -358,7 +358,7 @@ public class DefaultOverlayHandler implements IOverlayHandler {
|
||||
return assignedIngredients;
|
||||
}
|
||||
|
||||
private void findInventoryQuantities(GuiContainer gui, List<DistributedIngred> ingredStacks) {
|
||||
protected void findInventoryQuantities(GuiContainer gui, List<DistributedIngred> ingredStacks) {
|
||||
for (Slot slot : gui.inventorySlots.inventorySlots) /* work out how much we have to go round */ {
|
||||
if (slot.getHasStack() && canMoveFrom(slot, gui)) {
|
||||
final ItemStack pstack = slot.getStack();
|
||||
@@ -390,7 +390,7 @@ public class DefaultOverlayHandler implements IOverlayHandler {
|
||||
}
|
||||
}
|
||||
|
||||
private List<DistributedIngred> getPermutationIngredients(List<PositionedStack> ingredients) {
|
||||
protected List<DistributedIngred> getPermutationIngredients(List<PositionedStack> ingredients) {
|
||||
ArrayList<DistributedIngred> ingredStacks = new ArrayList<>();
|
||||
for (PositionedStack posstack : ingredients) /* work out what we need */ {
|
||||
for (ItemStack pstack : posstack.items) {
|
||||
|
||||
@@ -92,6 +92,9 @@ public abstract class GuiRecipe<H extends IRecipeHandler> extends GuiContainer i
|
||||
private GuiButton prevtype;
|
||||
private GuiButton nexttype;
|
||||
|
||||
private Rectangle typeArea = new Rectangle();
|
||||
private Rectangle pageArea = new Rectangle();
|
||||
|
||||
private int lastPage = -1;
|
||||
private final GuiRecipeTabs recipeTabs;
|
||||
private final GuiRecipeCatalyst recipeCatalyst;
|
||||
@@ -358,8 +361,18 @@ public abstract class GuiRecipe<H extends IRecipeHandler> extends GuiContainer i
|
||||
GuiRecipe.searchField.w = this.xSize - (BORDER_PADDING + BUTTON_WIDTH) * 2 + 1 - GuiRecipe.toggleSearch.w - 45;
|
||||
GuiRecipe.searchField.h = 14;
|
||||
|
||||
this.buttonList.addAll(Arrays.asList(this.prevtype, this.nexttype, this.prevpage, this.nextpage));
|
||||
this.typeArea.setBounds(
|
||||
this.prevtype.xPosition + BUTTON_WIDTH,
|
||||
this.prevtype.yPosition,
|
||||
this.nexttype.xPosition - this.prevtype.xPosition - BUTTON_WIDTH - 1,
|
||||
BUTTON_HEIGHT);
|
||||
this.pageArea.setBounds(
|
||||
this.prevpage.xPosition + BUTTON_WIDTH,
|
||||
this.prevpage.yPosition,
|
||||
this.nextpage.xPosition - this.prevpage.xPosition - BUTTON_WIDTH - 1,
|
||||
BUTTON_HEIGHT);
|
||||
|
||||
this.buttonList.addAll(Arrays.asList(this.prevtype, this.nexttype, this.prevpage, this.nextpage));
|
||||
if (this.currenthandlers.size() == 1) {
|
||||
this.prevtype.visible = false;
|
||||
this.nexttype.visible = false;
|
||||
@@ -377,8 +390,10 @@ public abstract class GuiRecipe<H extends IRecipeHandler> extends GuiContainer i
|
||||
this.container.setWidgets(this.handlerPages.getCurrentPageWidgets());
|
||||
|
||||
if (!this.handlerInfo.isAllowOverflowX() && this.handlerInfo.getWidth() > this.xSize - 6) {
|
||||
this.container.setPaddingInline(0, 2);
|
||||
this.container.setHorizontalScroll(ScrollBar.defaultHorizontalBar().setTrackPadding(1, 0, 1, 0));
|
||||
} else {
|
||||
this.container.setPaddingInline(0, 0);
|
||||
this.container.setHorizontalScroll(null);
|
||||
}
|
||||
|
||||
@@ -691,7 +706,7 @@ public abstract class GuiRecipe<H extends IRecipeHandler> extends GuiContainer i
|
||||
// If shift is held, try switching to the next recipe handler. Replicates the
|
||||
// GuiRecipeTabs.mouseScrolled()
|
||||
// without the checking for the cursor being inside the tabbar.
|
||||
if (NEIClientUtils.shiftKey()) {
|
||||
if (NEIClientUtils.shiftKey() || this.typeArea.contains(mouse)) {
|
||||
if (scroll < 0) {
|
||||
nextType();
|
||||
} else {
|
||||
@@ -703,7 +718,12 @@ public abstract class GuiRecipe<H extends IRecipeHandler> extends GuiContainer i
|
||||
|
||||
// Finally, if nothing else has handled scrolling, try changing to the next
|
||||
// recipe page.
|
||||
if (new Rectangle(this.guiLeft, this.guiTop, this.xSize, this.ySize).contains(mouse)) {
|
||||
if (NEIClientConfig.getBooleanSetting("inventory.guirecipe.scrollPages")
|
||||
&& this.container.boundsInside().contains(mouse.x, mouse.y)
|
||||
|| this.pageArea.contains(mouse)
|
||||
&& (!this.handler.searchingAvailable() || !GuiRecipe.toggleSearch.contains(mouse.x, mouse.y))
|
||||
&& (!GuiRecipe.searchField.isVisible() || !GuiRecipe.searchField.contains(mouse.x, mouse.y))) {
|
||||
|
||||
if (scroll > 0) {
|
||||
prevPage();
|
||||
} else {
|
||||
@@ -845,16 +865,16 @@ public abstract class GuiRecipe<H extends IRecipeHandler> extends GuiContainer i
|
||||
final int textMiddle = (BUTTON_WIDTH - this.fontRendererObj.FONT_HEIGHT) / 2;
|
||||
|
||||
drawRect(
|
||||
this.prevtype.xPosition + BUTTON_WIDTH - 1,
|
||||
this.prevtype.yPosition,
|
||||
this.nexttype.xPosition,
|
||||
this.prevtype.yPosition + BUTTON_HEIGHT,
|
||||
this.typeArea.x,
|
||||
this.typeArea.y,
|
||||
this.typeArea.x + this.typeArea.width,
|
||||
this.typeArea.y + this.typeArea.height,
|
||||
0x30000000);
|
||||
drawRect(
|
||||
this.prevpage.xPosition + BUTTON_WIDTH - 1,
|
||||
this.prevpage.yPosition,
|
||||
this.nextpage.xPosition,
|
||||
this.prevpage.yPosition + BUTTON_HEIGHT,
|
||||
this.pageArea.x,
|
||||
this.pageArea.y,
|
||||
this.pageArea.x + this.pageArea.width,
|
||||
this.pageArea.y + this.pageArea.height,
|
||||
0x30000000);
|
||||
|
||||
final String handlerTitle = this.handler.original.getRecipeName().trim();
|
||||
@@ -863,7 +883,7 @@ public abstract class GuiRecipe<H extends IRecipeHandler> extends GuiContainer i
|
||||
this.fontRendererObj,
|
||||
titleColorCode + handlerTitle + EnumChatFormatting.RESET,
|
||||
this.guiLeft + this.xSize / 2,
|
||||
this.prevtype.yPosition + textMiddle,
|
||||
this.typeArea.y + textMiddle,
|
||||
0xffffff);
|
||||
|
||||
if (this.handler.searchingAvailable()) {
|
||||
@@ -886,7 +906,7 @@ public abstract class GuiRecipe<H extends IRecipeHandler> extends GuiContainer i
|
||||
this.fontRendererObj,
|
||||
recipePage,
|
||||
GuiRecipe.searchField.x + GuiRecipe.searchField.w + 22,
|
||||
this.prevpage.yPosition + textMiddle,
|
||||
this.pageArea.y + textMiddle,
|
||||
0xffffff);
|
||||
} else {
|
||||
final String recipePage = NEIClientUtils.translate(
|
||||
@@ -897,7 +917,7 @@ public abstract class GuiRecipe<H extends IRecipeHandler> extends GuiContainer i
|
||||
this.fontRendererObj,
|
||||
recipePage,
|
||||
this.guiLeft + this.xSize / 2,
|
||||
this.prevpage.yPosition + textMiddle,
|
||||
this.pageArea.y + textMiddle,
|
||||
0xffffff);
|
||||
}
|
||||
|
||||
|
||||
@@ -77,9 +77,24 @@ public class RecipeHandlerRef {
|
||||
return this.handler.getOverlayHandler(firstGui, this.recipeIndex);
|
||||
}
|
||||
|
||||
if (firstGui != null && canUseSmartOverlay(firstGui)) {
|
||||
return SmartOverlayHandler.INSTANCE;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
private boolean canUseSmartOverlay(GuiContainer gui) {
|
||||
if (!(this.handler instanceof TemplateRecipeHandler templateHandler)
|
||||
|| templateHandler.getOverlayIdentifier() == null
|
||||
|| templateHandler.getGuiClass() == null
|
||||
|| !templateHandler.getGuiClass().isAssignableFrom(gui.getClass())) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return SmartOverlayHandler.canHandle(gui, this.handler, this.recipeIndex);
|
||||
}
|
||||
|
||||
public boolean canFillCraftingGrid(GuiContainer gui) {
|
||||
final IOverlayHandler overlayHandler = getOverlayHandler(gui);
|
||||
|
||||
|
||||
@@ -0,0 +1,232 @@
|
||||
package codechicken.nei.recipe;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import net.minecraft.client.gui.inventory.GuiContainer;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.inventory.Slot;
|
||||
import net.minecraft.inventory.SlotCrafting;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
import codechicken.nei.FastTransferManager;
|
||||
import codechicken.nei.PositionedStack;
|
||||
|
||||
public class SmartOverlayHandler extends DefaultOverlayHandler {
|
||||
|
||||
public static final SmartOverlayHandler INSTANCE = new SmartOverlayHandler();
|
||||
|
||||
private static final int MAX_RECIPE_SLOTS = 12;
|
||||
private static final int MAX_COST_DELTA = 16 * 16;
|
||||
|
||||
private SmartOverlayHandler() {}
|
||||
|
||||
public static boolean canHandle(GuiContainer gui, IRecipeHandler handler, int recipeIndex) {
|
||||
return INSTANCE.resolveSlots(gui, handler.getIngredientStacks(recipeIndex)) != null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int transferRecipe(GuiContainer gui, IRecipeHandler handler, int recipeIndex, int multiplier) {
|
||||
final List<PositionedStack> ingredients = handler.getIngredientStacks(recipeIndex);
|
||||
final List<DistributedIngred> ingredStacks = getPermutationIngredients(ingredients);
|
||||
final Slot[][] recipeSlots = resolveSlots(gui, ingredients);
|
||||
|
||||
if (recipeSlots == null || !clearMappedSlots(gui, recipeSlots)) return 0;
|
||||
|
||||
findInventoryQuantities(gui, ingredStacks);
|
||||
|
||||
final List<IngredientDistribution> assignedIngredients = assignIngredients(ingredients, ingredStacks);
|
||||
if (assignedIngredients == null) return 0;
|
||||
|
||||
assignIngredSlots(gui, ingredients, assignedIngredients);
|
||||
multiplier = Math.min(multiplier == 0 ? 64 : multiplier, calculateRecipeQuantity(assignedIngredients));
|
||||
|
||||
moveIngredients(gui, assignedIngredients, Math.max(1, multiplier));
|
||||
|
||||
return assignedIngredients.stream().anyMatch(distrib -> distrib.distrib.distributed == 0) ? 0 : multiplier;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canFillCraftingGrid(GuiContainer firstGui, IRecipeHandler handler, int recipeIndex) {
|
||||
return canHandle(firstGui, handler, recipeIndex);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Set<Slot> getCraftMatrixSlots(GuiContainer gui, IRecipeHandler handler) {
|
||||
return Collections.emptySet();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Slot[][] mapIngredSlots(GuiContainer gui, List<PositionedStack> ingredients) {
|
||||
Slot[][] exactSlots = super.mapIngredSlots(gui, ingredients);
|
||||
if (!hasEmptyMappings(exactSlots)) {
|
||||
return exactSlots;
|
||||
}
|
||||
|
||||
Slot[][] smartSlots = resolveSlots(gui, ingredients);
|
||||
return smartSlots == null ? exactSlots : smartSlots;
|
||||
}
|
||||
|
||||
private boolean clearMappedSlots(GuiContainer gui, Slot[][] recipeSlots) {
|
||||
Set<Slot> cleared = new HashSet<>();
|
||||
|
||||
for (Slot[] slots : recipeSlots) {
|
||||
for (Slot slot : slots) {
|
||||
if (cleared.add(slot) && slot.getHasStack() && slot.canTakeStack(gui.mc.thePlayer)) {
|
||||
FastTransferManager.clickSlot(gui, slot.slotNumber, 0, 1);
|
||||
if (slot.getHasStack()) return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
FastTransferManager.dropHeldItem(gui);
|
||||
return gui.mc.thePlayer.inventory.getItemStack() == null;
|
||||
}
|
||||
|
||||
private Slot[][] resolveSlots(GuiContainer gui, List<PositionedStack> ingredients) {
|
||||
if (ingredients == null || ingredients.isEmpty() || ingredients.size() > MAX_RECIPE_SLOTS) {
|
||||
return null;
|
||||
}
|
||||
|
||||
List<Slot> candidates = new ArrayList<>();
|
||||
for (Slot slot : gui.inventorySlots.inventorySlots) {
|
||||
if (isDestinationCandidate(slot)) {
|
||||
candidates.add(slot);
|
||||
}
|
||||
}
|
||||
|
||||
if (candidates.size() < ingredients.size()) {
|
||||
return null;
|
||||
}
|
||||
|
||||
Assignment best = new Assignment();
|
||||
Assignment secondBest = new Assignment();
|
||||
searchAssignments(
|
||||
ingredients,
|
||||
candidates,
|
||||
new boolean[candidates.size()],
|
||||
new Slot[ingredients.size()],
|
||||
0,
|
||||
0,
|
||||
best,
|
||||
secondBest);
|
||||
|
||||
if (best.slots == null || secondBest.cost - best.cost <= MAX_COST_DELTA) {
|
||||
return null;
|
||||
}
|
||||
|
||||
Slot[][] resolved = new Slot[ingredients.size()][];
|
||||
for (int i = 0; i < ingredients.size(); i++) {
|
||||
resolved[i] = new Slot[] { best.slots[i] };
|
||||
}
|
||||
return resolved;
|
||||
}
|
||||
|
||||
private void searchAssignments(List<PositionedStack> ingredients, List<Slot> candidates, boolean[] used,
|
||||
Slot[] assigned, int ingredientIndex, int cost, Assignment best, Assignment secondBest) {
|
||||
if (cost >= secondBest.cost) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (ingredientIndex == ingredients.size()) {
|
||||
if (cost < best.cost) {
|
||||
secondBest.copyFrom(best);
|
||||
best.set(cost, assigned);
|
||||
} else if (cost < secondBest.cost) {
|
||||
secondBest.set(cost, assigned);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
PositionedStack ingredient = ingredients.get(ingredientIndex);
|
||||
for (int i = 0; i < candidates.size(); i++) {
|
||||
if (used[i]) continue;
|
||||
|
||||
Slot slot = candidates.get(i);
|
||||
int slotCost = getSlotCost(ingredient, slot);
|
||||
if (slotCost < 0) continue;
|
||||
|
||||
used[i] = true;
|
||||
assigned[ingredientIndex] = slot;
|
||||
searchAssignments(
|
||||
ingredients,
|
||||
candidates,
|
||||
used,
|
||||
assigned,
|
||||
ingredientIndex + 1,
|
||||
cost + slotCost,
|
||||
best,
|
||||
secondBest);
|
||||
assigned[ingredientIndex] = null;
|
||||
used[i] = false;
|
||||
}
|
||||
}
|
||||
|
||||
private int getSlotCost(PositionedStack ingredient, Slot slot) {
|
||||
boolean acceptsAnyPermutation = false;
|
||||
for (ItemStack permutation : ingredient.items) {
|
||||
if (canUseSlot(slot, permutation)) {
|
||||
acceptsAnyPermutation = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!acceptsAnyPermutation) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
int dx = slot.xDisplayPosition - (ingredient.relx + offsetx);
|
||||
int dy = slot.yDisplayPosition - (ingredient.rely + offsety);
|
||||
int cost = dx * dx + dy * dy;
|
||||
|
||||
if (slot.getHasStack()) {
|
||||
cost += 10_000;
|
||||
}
|
||||
|
||||
return cost;
|
||||
}
|
||||
|
||||
private boolean canUseSlot(Slot slot, ItemStack stack) {
|
||||
if (stack == null || stack.stackSize <= 0 || !slot.isItemValid(stack)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!slot.inventory.isItemValidForSlot(slot.getSlotIndex(), stack)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return !slot.getHasStack() || canStack(slot.getStack(), stack);
|
||||
}
|
||||
|
||||
private boolean isDestinationCandidate(Slot slot) {
|
||||
return slot != null && !(slot.inventory instanceof InventoryPlayer) && !(slot instanceof SlotCrafting);
|
||||
}
|
||||
|
||||
private boolean hasEmptyMappings(Slot[][] recipeSlots) {
|
||||
for (Slot[] recipeSlot : recipeSlots) {
|
||||
if (recipeSlot.length == 0) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private static class Assignment {
|
||||
|
||||
int cost = Integer.MAX_VALUE;
|
||||
Slot[] slots;
|
||||
|
||||
void set(int cost, Slot[] slots) {
|
||||
this.cost = cost;
|
||||
this.slots = slots.clone();
|
||||
}
|
||||
|
||||
void copyFrom(Assignment other) {
|
||||
this.cost = other.cost;
|
||||
this.slots = other.slots == null ? null : other.slots.clone();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -381,8 +381,13 @@ public abstract class TemplateRecipeHandler implements ICraftingHandler, IUsageH
|
||||
public LinkedList<RecipeTransferRect> transferRects = new LinkedList<>();
|
||||
|
||||
public TemplateRecipeHandler() {
|
||||
loadTransferRects();
|
||||
RecipeTransferRectHandler.registerRectsToGuis(getRecipeTransferRectGuis(), transferRects);
|
||||
try {
|
||||
loadTransferRects();
|
||||
RecipeTransferRectHandler.registerRectsToGuis(getRecipeTransferRectGuis(), transferRects);
|
||||
} catch (Exception e) {
|
||||
NEIClientConfig.logger
|
||||
.error("NEI: Failed to load transfer rects for {}: {}", getClass().getName(), e.toString());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -12,6 +12,7 @@ import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.function.BiConsumer;
|
||||
import java.util.function.Consumer;
|
||||
import java.util.function.IntPredicate;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@@ -187,12 +188,12 @@ public class DebugHandlerWidget extends Widget {
|
||||
y = addTextFieldWidget("Order", 0, (field, oldText) -> {
|
||||
record.order = field.getInteger();
|
||||
saveHandlerInfoPatch();
|
||||
}, y);
|
||||
}, null, y);
|
||||
|
||||
y = addTextFieldWidget("yShift", 0, (field, oldText) -> {
|
||||
record.yShift = field.getInteger();
|
||||
saveHandlerInfoPatch();
|
||||
}, y);
|
||||
}, null, y);
|
||||
|
||||
y = addCheckboxWidget("MultiWidgets", button -> {
|
||||
record.multiWidgets = button.value;
|
||||
@@ -209,12 +210,12 @@ public class DebugHandlerWidget extends Widget {
|
||||
y = addTextFieldWidget("Height", HandlerInfo.DEFAULT_HEIGHT, (field, oldText) -> {
|
||||
record.height = field.getInteger();
|
||||
saveHandlerInfoPatch();
|
||||
}, y);
|
||||
}, newValue -> newValue > 0, y);
|
||||
|
||||
y = addTextFieldWidget("Width", HandlerInfo.DEFAULT_WIDTH, (field, oldText) -> {
|
||||
record.width = field.getInteger();
|
||||
saveHandlerInfoPatch();
|
||||
}, y);
|
||||
}, newValue -> newValue >= HandlerInfo.DEFAULT_WIDTH, y);
|
||||
|
||||
y = addCheckboxWidget("AllowOverflowX", button -> {
|
||||
record.allowOverflowX = button.value;
|
||||
@@ -263,9 +264,10 @@ public class DebugHandlerWidget extends Widget {
|
||||
return y + value.h + 1;
|
||||
}
|
||||
|
||||
private int addTextFieldWidget(String key, int defaultValue, BiConsumer<IntegerField, String> onChange, int y) {
|
||||
private int addTextFieldWidget(String key, int defaultValue, BiConsumer<IntegerField, String> onChange,
|
||||
IntPredicate validator, int y) {
|
||||
final LabelWidget label = new LabelWidget(0x888888, false);
|
||||
final IntegerField value = new IntegerField(key, onChange, defaultValue);
|
||||
final IntegerField value = new IntegerField(key, onChange, validator, defaultValue);
|
||||
|
||||
label.y = value.y = y;
|
||||
value.w = 60;
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package codechicken.nei.recipe.debug;
|
||||
|
||||
import java.util.function.BiConsumer;
|
||||
import java.util.function.IntPredicate;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
|
||||
@@ -13,10 +14,13 @@ public class IntegerField extends TextField implements IUpdatableWidget {
|
||||
|
||||
protected int defaultValue = 0;
|
||||
protected BiConsumer<IntegerField, String> onChange;
|
||||
protected IntPredicate validator;
|
||||
|
||||
public IntegerField(String ident, BiConsumer<IntegerField, String> onChange, int defaultValue) {
|
||||
public IntegerField(String ident, BiConsumer<IntegerField, String> onChange, IntPredicate validator,
|
||||
int defaultValue) {
|
||||
super(ident);
|
||||
this.onChange = onChange;
|
||||
this.validator = validator;
|
||||
this.defaultValue = defaultValue;
|
||||
this.h = 16;
|
||||
this.z = 2;
|
||||
@@ -68,8 +72,12 @@ public class IntegerField extends TextField implements IUpdatableWidget {
|
||||
}
|
||||
|
||||
protected int getInteger() {
|
||||
return getInteger(text());
|
||||
}
|
||||
|
||||
protected int getInteger(String text) {
|
||||
try {
|
||||
return Integer.parseInt(text());
|
||||
return Integer.parseInt(text);
|
||||
} catch (NumberFormatException nfe) {
|
||||
return this.defaultValue;
|
||||
}
|
||||
@@ -82,6 +90,13 @@ public class IntegerField extends TextField implements IUpdatableWidget {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setText(String newValue) {
|
||||
if (validator == null || validator.test(getInteger(newValue))) {
|
||||
super.setText(newValue);
|
||||
}
|
||||
}
|
||||
|
||||
public void updateValue(String newValue) {
|
||||
setText(newValue);
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@ public class DefaultStackStringifyHandler implements IStackStringifyHandler {
|
||||
final NBTTagCompound nbTag = new NBTTagCompound();
|
||||
nbTag.setString("strId", strId);
|
||||
nbTag.setInteger("Count", saveStackSize ? stack.stackSize : 1);
|
||||
nbTag.setShort("Damage", (short) stack.getItemDamage());
|
||||
nbTag.setInteger("Damage", stack.getItemDamage());
|
||||
|
||||
if (stack.hasTagCompound() && !stack.getTagCompound().hasNoTags()) {
|
||||
nbTag.setTag("tag", stack.getTagCompound().copy());
|
||||
@@ -35,7 +35,7 @@ public class DefaultStackStringifyHandler implements IStackStringifyHandler {
|
||||
final String strId = nbtTag.getString("strId");
|
||||
|
||||
nbtTag = (NBTTagCompound) nbtTag.copy();
|
||||
nbtTag.setShort("id", (short) GameData.getItemRegistry().getId(strId)); // getObject
|
||||
nbtTag.setInteger("id", GameData.getItemRegistry().getId(strId)); // getObject
|
||||
|
||||
final ItemStack stack = ItemStack.loadItemStackFromNBT(nbtTag);
|
||||
|
||||
|
||||
@@ -179,11 +179,15 @@ public class ItemUntranslator {
|
||||
}
|
||||
|
||||
private void collectDisplayNameForStack(ItemStack stack, Map<String, String> items) {
|
||||
final String displayName = stripFormatting(stack.getDisplayName());
|
||||
final String guidKey = determineGUIDForGeneration(stack, displayName, items);
|
||||
try {
|
||||
final String displayName = stripFormatting(stack.getDisplayName());
|
||||
final String guidKey = determineGUIDForGeneration(stack, displayName, items);
|
||||
|
||||
if (!items.containsKey(guidKey)) {
|
||||
items.put(guidKey, displayName);
|
||||
if (!items.containsKey(guidKey)) {
|
||||
items.put(guidKey, displayName);
|
||||
}
|
||||
} catch (Throwable e) {
|
||||
NEIClientConfig.logger.warn("Failed to get display name for itemstack {}", stack, e);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -301,6 +301,11 @@ 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.scrollPages=Scroll Pages
|
||||
nei.options.inventory.guirecipe.scrollPages.true=Enabled
|
||||
nei.options.inventory.guirecipe.scrollPages.false=Disabled
|
||||
|
||||
nei.options.inventory.guirecipe.maxHeight=Max Height
|
||||
nei.options.inventory.showItemQuantityWidget=Show Item Quantity Widget
|
||||
nei.options.inventory.showItemQuantityWidget.true=Yes
|
||||
|
||||
Reference in new issue
Block a user