Compare commits

..
Author SHA1 Message Date
Martin Robertz 23ea7e7d04 update
(cherry picked from commit 7ac3e32635)
2024-12-17 20:37:22 +01:00
Martin Robertz 6a8da78476 update
(cherry picked from commit 088d37a11a)
2024-12-17 20:37:15 +01:00
slprime 36c80863c6 Clear Search Filter Cache after Change Settings (#569)
(cherry picked from commit 6a787dd5b7)
2024-12-17 20:37:09 +01:00
42 changed files with 903 additions and 1686 deletions

No files matched your search

+1 -3
View File
@@ -1,8 +1,6 @@
// Add your dependencies here
dependencies {
api('com.github.GTNewHorizons:CodeChickenCore:1.4.1:dev')
implementation('com.github.GTNewHorizons:GTNHLib:0.6.3:dev')
api('com.github.GTNewHorizons:CodeChickenCore:1.3.10:dev')
shadowImplementation('org.apache.commons:commons-csv:1.10.0')
}
+1 -1
View File
@@ -17,7 +17,7 @@ pluginManagement {
}
plugins {
id 'com.gtnewhorizons.gtnhsettingsconvention' version '1.0.31'
id 'com.gtnewhorizons.gtnhsettingsconvention' version '1.0.30'
}
@@ -957,7 +957,7 @@ public class BookmarkPanel extends PanelWidget {
this.realItems.add(stackA);
this.metadata.add(meta);
if (animate && NEIClientConfig.getGridRenderingCacheMode() == 0 && NEIClientConfig.areBookmarksAnimated()) {
if (animate && !NEIClientConfig.shouldCacheItemRendering() && NEIClientConfig.areBookmarksAnimated()) {
this.animation.put(stackA, 0f);
}
@@ -1040,9 +1040,8 @@ public class BookmarkPanel extends PanelWidget {
}
}
@Override
protected int getGridRenderingCacheMode() {
return this.focusedGroupId == -1 ? NEIClientConfig.getGridRenderingCacheMode() : 0;
protected boolean shouldCacheItemRendering() {
return NEIClientConfig.shouldCacheItemRendering() && this.focusedGroupId == -1;
}
@Override
@@ -2060,7 +2059,7 @@ public class BookmarkPanel extends PanelWidget {
public void setVisible() {
super.setVisible();
if (grid.getPerPage() > 0 && getNamespaceSize() > 1) {
if (grid.getPerPage() > 0) {
LayoutManager.addWidget(namespacePrev);
LayoutManager.addWidget(namespaceNext);
LayoutManager.addWidget(namespaceLabel);
@@ -2585,21 +2584,6 @@ public class BookmarkPanel extends PanelWidget {
return currenttip;
}
@Override
public boolean contains(int px, int py) {
if (new Rectangle4i(pagePrev.x + pagePrev.w, pagePrev.y, pageNext.x - (pagePrev.x + pagePrev.w), pagePrev.h)
.contains(px, py)) {
return true;
}
if (((BookmarkGrid) grid).getHoveredRowIndex(true) != -1) {
return true;
}
return super.contains(px, py);
}
@Override
public List<String> handleItemTooltip(GuiContainer gui, ItemStack itemstack, int mousex, int mousey,
List<String> currenttip) {
@@ -325,8 +325,9 @@ public class ClientHandler {
if (!Minecraft.getMinecraft().isSingleplayer()) // wait for server to initiate in singleplayer
NEIClientConfig.loadWorld("remote/" + ClientUtils.getServerIP().replace(':', '~'));
ItemMobSpawner.clearEntityReferences(world);
}
ItemMobSpawner.clearEntityReferences(world);
lastworld = world;
}
@@ -145,16 +145,24 @@ public class CollapsibleItems {
return filter;
}
public static void clearCache() {
public static void updateCache(final List<ItemStack> items) {
CollapsibleItems.cache.clear();
}
public static void putItem(ItemStack stack) {
final GroupItem group = CollapsibleItems.groups.stream().filter(g -> g.matches(stack)).findFirst().orElse(null);
try {
if (group != null) {
CollapsibleItems.cache.put(stack, CollapsibleItems.groups.indexOf(group));
ItemList.forkJoinPool.submit(() -> items.parallelStream().forEach(stack -> {
GroupItem group = CollapsibleItems.groups.stream().filter(g -> g.matches(stack)).findFirst()
.orElse(null);
if (group != null) {
CollapsibleItems.cache.put(stack, CollapsibleItems.groups.indexOf(group));
}
})).get();
} catch (Exception e) {
NEIClientConfig.logger.error("Error create collapsible items groups", e);
}
}
public static int getGroupIndex(ItemStack stack) {
@@ -1,11 +1,12 @@
package codechicken.nei;
import static codechicken.lib.gui.GuiDraw.drawRect;
import net.minecraft.client.gui.inventory.GuiContainer;
import net.minecraft.item.ItemStack;
import org.lwjgl.opengl.GL11;
import codechicken.lib.gui.GuiDraw;
import codechicken.nei.ItemPanel.ItemPanelSlot;
import codechicken.nei.recipe.GuiCraftingRecipe;
import codechicken.nei.recipe.GuiRecipe;
@@ -21,14 +22,10 @@ public class ItemHistoryPanel extends Widget {
grid = new ItemsGrid();
}
public boolean isEmpty() {
return grid.isEmpty();
}
public void draw(int mousex, int mousey) {
if (NEIClientConfig.getIntSetting("inventory.history.splittingMode") == 0) {
GuiDraw.drawRect(x, y, w, h, NEIClientConfig.getSetting("inventory.history.historyColor").getHexValue());
drawRect(x, y, w, h, NEIClientConfig.getSetting("inventory.history.historyColor").getHexValue());
} else {
drawSplittingArea(x, y, w, h, NEIClientConfig.getSetting("inventory.history.historyColor").getHexValue());
}
@@ -47,8 +44,8 @@ public class ItemHistoryPanel extends Widget {
grid.realItems.removeIf(historyStack -> StackInfo.equalItemAndNBT(historyStack, stack, true));
grid.realItems.add(0, is);
if (grid.realItems.size() > Math.max(50, grid.rows * grid.columns)) {
grid.realItems.remove(grid.realItems.size() - 1);
if (grid.realItems.size() > (grid.rows * grid.columns)) {
grid.realItems.remove(grid.rows * grid.columns);
}
grid.onItemsChanged();
+38 -83
View File
@@ -2,7 +2,6 @@ package codechicken.nei;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Comparator;
import java.util.HashMap;
import java.util.HashSet;
import java.util.LinkedList;
@@ -12,7 +11,6 @@ import java.util.concurrent.ForkJoinPool;
import java.util.concurrent.ForkJoinWorkerThread;
import java.util.regex.Pattern;
import java.util.stream.Collectors;
import java.util.stream.StreamSupport;
import net.minecraft.client.Minecraft;
import net.minecraft.item.Item;
@@ -27,7 +25,6 @@ import codechicken.nei.ThreadOperationTimer.TimeoutException;
import codechicken.nei.api.ItemFilter;
import codechicken.nei.api.ItemFilter.ItemFilterProvider;
import codechicken.nei.api.ItemInfo;
import codechicken.nei.search.TooltipFilter;
public class ItemList {
@@ -47,7 +44,7 @@ public class ItemList {
private static final HashSet<Item> erroredItems = new HashSet<>();
private static final HashSet<String> stackTraces = new HashSet<>();
private static HashMap<ItemStack, Integer> ordering = new HashMap<>();
private static final HashMap<ItemStack, Integer> ordering = new HashMap<>();
/**
* Unlike {@link LayoutManager#itemsLoaded}, this indicates whether item loading is actually finished or not.
*/
@@ -237,9 +234,9 @@ public class ItemList {
}
private void updateOrdering(List<ItemStack> items) {
ItemSorter.sort(items);
ItemList.ordering.clear();
HashMap<ItemStack, Integer> newOrdering = new HashMap<>();
ItemSorter.sort(items);
if (!CollapsibleItems.isEmpty()) {
HashMap<Integer, Integer> groups = new HashMap<>();
@@ -249,105 +246,69 @@ public class ItemList {
final int groupIndex = CollapsibleItems.getGroupIndex(stack);
if (groupIndex == -1) {
newOrdering.put(stack, orderIndex++);
ItemList.ordering.put(stack, orderIndex++);
} else {
if (!groups.containsKey(groupIndex)) {
groups.put(groupIndex, orderIndex++);
}
newOrdering.put(stack, groups.get(groupIndex));
ItemList.ordering.put(stack, groups.get(groupIndex));
}
}
} else {
int orderIndex = 0;
for (ItemStack stack : items) {
newOrdering.put(stack, orderIndex++);
ItemList.ordering.put(stack, orderIndex++);
}
}
ItemList.ordering = newOrdering;
}
private List<ItemStack> getPermutations(Item item) {
final List<ItemStack> permutations = new LinkedList<>(ItemInfo.itemOverrides.get(item));
if (permutations.isEmpty()) {
item.getSubItems(item, null, permutations);
}
if (permutations.isEmpty()) {
damageSearch(item, permutations);
}
permutations.addAll(ItemInfo.itemVariants.get(item));
return permutations.stream()
.filter(
stack -> stack.getItem() != null && stack.getItem().delegate.name() != null
&& !ItemInfo.isHidden(stack))
.collect(Collectors.toCollection(ArrayList::new));
}
// For optimization it generate itemslist, permutations, orders & collapsibleitems
@Override
@SuppressWarnings("unchecked")
public void execute() {
if (!NEIClientConfig.isEnabled()) return;
ThreadOperationTimer timer = getTimer(NEIClientConfig.getItemLoadingTimeout());
LayoutManager.itemsLoaded = true;
loadFinished = false;
SearchField.searchParser.clearCache();
ItemSorter.instance.ordering.clear();
CollapsibleItems.clearCache();
TooltipFilter.clearCache();
List<ItemStack> items = new ArrayList<>();
List<ItemStack> items = new LinkedList<>();
List<ItemStack> permutations = new LinkedList<>();
ListMultimap<Item, ItemStack> itemMap = ArrayListMultimap.create();
ItemStackSet unique = new ItemStackSet();
timer.setLimit(NEIClientConfig.getItemLoadingTimeout());
StreamSupport.stream(((Iterable<Item>) Item.itemRegistry).spliterator(), true).forEach(item -> {
if (item == null || item.delegate.name() == null || erroredItems.contains(item)) return;
for (Item item : (Iterable<Item>) Item.itemRegistry) {
if (interrupted()) return;
if (item == null || erroredItems.contains(item)) continue;
try {
timer.reset(item);
List<ItemStack> permutations = getPermutations(item);
permutations.clear();
permutations.addAll(ItemInfo.itemOverrides.get(item));
if (permutations.isEmpty()) {
item.getSubItems(item, null, permutations);
}
if (permutations.isEmpty()) {
damageSearch(item, permutations);
}
permutations.addAll(ItemInfo.itemVariants.get(item));
timer.reset();
for (ItemStack stack : permutations) {
if (!unique.contains(stack)) {
permutations = permutations.stream().filter(stack -> !ItemInfo.isHidden(stack))
.collect(Collectors.toCollection(ArrayList::new));
synchronized (unique) {
unique.add(stack);
}
synchronized (items) {
items.add(stack);
}
CollapsibleItems.putItem(stack);
}
}
synchronized (itemMap) {
itemMap.putAll(item, permutations);
}
items.addAll(permutations);
itemMap.putAll(item, permutations);
} catch (Throwable t) {
NEIServerConfig.logger.error("Removing item: {} from list.", item, t);
NEIServerConfig.logger.error("Removing item: " + item + " from list.", t);
erroredItems.add(item);
}
});
int index = 0;
for (Item item : (Iterable<Item>) Item.itemRegistry) {
for (ItemStack stack : itemMap.get(item)) {
ItemSorter.instance.ordering.put(stack, index++);
}
}
if (interrupted()) return;
@@ -356,15 +317,10 @@ public class ItemList {
for (ItemsLoadedCallback callback : loadCallbacks) callback.itemsLoaded();
if (interrupted()) return;
updateOrdering(ItemList.items);
new Thread(
() -> ItemList.items.parallelStream().forEach(TooltipFilter::getSearchTooltip),
"NEI Tooltip Filter Loader").start();
CollapsibleItems.updateCache(items);
updateOrdering(items);
loadFinished = true;
SubsetWidget.updateHiddenItems();
updateFilter.restart();
}
};
@@ -390,9 +346,12 @@ public class ItemList {
public static final RestartableTask updateFilter = new RestartableTask("NEI Item Filtering") {
private int compare(ItemStack o1, ItemStack o2) {
return Integer.compare(ItemList.ordering.get(o1), ItemList.ordering.get(o2));
}
@Override
public void execute() {
if (!loadFinished) return;
ItemFilter filter = getItemListFilter();
ArrayList<ItemStack> filtered;
@@ -409,12 +368,8 @@ public class ItemList {
}
if (interrupted()) return;
Comparator<ItemStack> comparator = Comparator.comparingInt(ItemList.ordering::get);
filtered.sort(comparator::compare);
filtered.sort(this::compare);
if (interrupted()) return;
ItemPanel.updateItemList(filtered);
}
};
+73 -5
View File
@@ -41,6 +41,9 @@ public class ItemPanel extends PanelWidget {
return super.getStackMouseOver(mousex, mousey);
}
public Button more;
public Button less;
public ItemQuantityField quantity;
public ItemHistoryPanel historyPanel;
public Button toggleGroups;
@@ -342,6 +345,42 @@ public class ItemPanel extends PanelWidget {
}
};
more = new Button("+") {
@Override
public boolean onButtonPress(boolean rightclick) {
if (rightclick) return false;
int modifier = NEIClientUtils.controlKey() ? 64 : NEIClientUtils.shiftKey() ? 10 : 1;
int quantity = NEIClientConfig.getItemQuantity() + modifier;
if (quantity < 0) {
quantity = 0;
}
ItemPanels.itemPanel.quantity.setText(Integer.toString(quantity));
return true;
}
};
less = new Button("-") {
@Override
public boolean onButtonPress(boolean rightclick) {
if (rightclick) return false;
int modifier = NEIClientUtils.controlKey() ? -64 : NEIClientUtils.shiftKey() ? -10 : -1;
int quantity = NEIClientConfig.getItemQuantity() + modifier;
if (quantity < 0) {
quantity = 0;
}
ItemPanels.itemPanel.quantity.setText(Integer.toString(quantity));
return true;
}
};
quantity = new ItemQuantityField("quantity");
historyPanel = new ItemHistoryPanel();
}
@@ -392,21 +431,44 @@ public class ItemPanel extends PanelWidget {
return 0;
}
final int BUTTON_SIZE = 20;
more.w = less.w = BUTTON_SIZE;
quantity.h = BUTTON_SIZE;
if (NEIClientConfig.isSearchWidgetCentered()) {
more.h = less.h = BUTTON_SIZE;
more.x = x + w - BUTTON_SIZE;
more.y = less.y = quantity.y = y + h - BUTTON_SIZE;
less.x = x;
quantity.x = x + BUTTON_SIZE + 2;
quantity.w = more.x - quantity.x - 2;
} else {
quantity.x = (int) (x + (w * 0.7)) + 3;
quantity.y = y + h - BUTTON_SIZE;
quantity.w = (int) ((w * 0.3) - BUTTON_SIZE - 1);
more.h = less.h = BUTTON_SIZE / 2;
more.y = y + h - (more.h * 2);
less.x = more.x = quantity.x + quantity.w;
less.y = more.y + more.h;
}
if (NEIClientConfig.showHistoryPanelWidget()) {
historyPanel.x = x;
historyPanel.w = w;
historyPanel.h = ItemsGrid.SLOT_SIZE * NEIClientConfig.getIntSetting("inventory.history.useRows");
if (NEIClientConfig.showItemQuantityWidget() || !NEIClientConfig.isSearchWidgetCentered()) {
historyPanel.y = LayoutManager.quantity.y - historyPanel.h - PanelWidget.PADDING;
return LayoutManager.quantity.h + historyPanel.h + PanelWidget.PADDING * 2;
historyPanel.y = quantity.y - historyPanel.h - PanelWidget.PADDING;
return quantity.h + historyPanel.h + PanelWidget.PADDING * 2;
} else {
historyPanel.y = y + h - historyPanel.h;
return historyPanel.h + PanelWidget.PADDING;
}
}
return LayoutManager.quantity.h + PanelWidget.PADDING;
return quantity.h + PanelWidget.PADDING;
}
@Override
@@ -414,11 +476,17 @@ public class ItemPanel extends PanelWidget {
super.setVisible();
if (grid.getPerPage() > 0) {
if (!CollapsibleItems.isEmpty() && !grid.isEmpty()) {
if (NEIClientConfig.showItemQuantityWidget()) {
LayoutManager.addWidget(more);
LayoutManager.addWidget(less);
LayoutManager.addWidget(quantity);
}
if (!CollapsibleItems.isEmpty()) {
LayoutManager.addWidget(toggleGroups);
}
if (NEIClientConfig.showHistoryPanelWidget() && (!grid.isEmpty() || !historyPanel.isEmpty())) {
if (NEIClientConfig.showHistoryPanelWidget()) {
LayoutManager.addWidget(historyPanel);
}
}
+14 -3
View File
@@ -4,19 +4,19 @@ import java.util.ArrayList;
import java.util.Comparator;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.StatCollector;
import codechicken.lib.config.ConfigTagParent;
import codechicken.nei.ItemList.ItemsLoadedCallback;
import codechicken.nei.api.API;
import codechicken.nei.api.ItemInfo;
import codechicken.nei.config.GuiItemSorter;
import codechicken.nei.config.OptionOpenGui;
public class ItemSorter implements Comparator<ItemStack> {
public class ItemSorter implements Comparator<ItemStack>, ItemsLoadedCallback {
public static class SortEntry {
@@ -44,10 +44,12 @@ public class ItemSorter implements Comparator<ItemStack> {
public static final ItemSorter instance = new ItemSorter();
// optimisations
public Map<ItemStack, Integer> ordering = new HashMap<>();
public HashMap<ItemStack, Integer> ordering = null;
public static void sort(List<ItemStack> items) {
try {
// items = (ArrayList<ItemStack>)
// items.parallelStream().sorted(instance).collect(Collectors.toList());
items.sort(instance);
} catch (Exception e) {
NEIClientConfig.logger.error("Exception sorting item list", e);
@@ -63,6 +65,14 @@ public class ItemSorter implements Comparator<ItemStack> {
return 0;
}
@Override
public void itemsLoaded() {
HashMap<ItemStack, Integer> newMap = new HashMap<>();
int i = 0;
for (ItemStack stack : ItemList.items) newMap.put(stack, i++);
ordering = newMap;
}
public static SortEntry find(String name) {
for (SortEntry e : entries) if (e.name.equals(name)) return e;
@@ -126,6 +136,7 @@ public class ItemSorter implements Comparator<ItemStack> {
list = fromSaveString(activeTag().getValue());
}
});
ItemList.loadCallbacks.add(instance);
}
public static String getSaveString(List<SortEntry> list) {
@@ -5,7 +5,6 @@ import static codechicken.lib.inventory.InventoryUtils.newItemStack;
import static net.minecraftforge.oredict.OreDictionary.WILDCARD_VALUE;
import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
@@ -25,13 +24,8 @@ public class ItemStackMap<T> {
public final int damage;
public final NBTTagCompound tag;
private final int hashCode;
public StackMetaKey(int damage, NBTTagCompound tag) {
if (tag != null && tag.hasNoTags()) {
tag = null;
}
this.hashCode = Objects.hashCode(damage, tag);
this.damage = damage;
this.tag = tag;
}
@@ -41,7 +35,7 @@ public class ItemStackMap<T> {
}
public int hashCode() {
return this.hashCode;
return Objects.hashCode(damage, tag);
}
public boolean equals(Object o) {
@@ -197,7 +191,7 @@ public class ItemStackMap<T> {
WILDCARD_TAG.setBoolean("*", true);
}
private final Map<Item, DetailMap> itemMap = new LinkedHashMap<>();
private final HashMap<Item, DetailMap> itemMap = new HashMap<>();
private int size;
public T get(ItemStack key) {
@@ -224,7 +218,6 @@ public class ItemStackMap<T> {
public void clear() {
itemMap.clear();
size = 0;
}
public T remove(ItemStack key) {
@@ -32,11 +32,6 @@ public class ItemStackSet extends ItemStackMap<ItemStack> implements ItemFilter
return this;
}
public ItemStackSet removeAll(Iterable<ItemStack> items) {
for (ItemStack item : items) remove(item);
return this;
}
public boolean contains(ItemStack item) {
return get(item) != null;
}
+63 -138
View File
@@ -17,7 +17,6 @@ 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.ItemPanel.ItemPanelSlot;
@@ -27,119 +26,6 @@ import codechicken.nei.recipe.StackInfo;
public class ItemsGrid {
private static class ScreenCapture {
private long nextCacheRefresh = 0;
private Framebuffer framebuffer;
public ScreenCapture() {
this.framebuffer = new Framebuffer(1, 1, true);
this.framebuffer.setFramebufferColor(0.0F, 0.0F, 0.0F, 0.0F);
Minecraft.getMinecraft().getFramebuffer().bindFramebuffer(false);
}
protected int getGridRenderingCacheFPS(int mode) {
return mode == 1 ? NEIClientConfig.getIntSetting("inventory.gridRenderingCacheFPS") : 0;
}
public boolean needRefresh(int mode) {
final Minecraft minecraft = Minecraft.getMinecraft();
return this.nextCacheRefresh == 0 || this.framebuffer.framebufferWidth != minecraft.displayWidth
|| framebuffer.framebufferHeight != minecraft.displayHeight
|| getGridRenderingCacheFPS(mode) > 0 && this.nextCacheRefresh < System.currentTimeMillis();
}
public void refreshBuffer() {
this.nextCacheRefresh = 0;
}
public void captureScreen(Runnable callback, int mode) {
GL11.glPushAttrib(GL11.GL_ALL_ATTRIB_BITS);
resetFramebuffer();
this.framebuffer.bindFramebuffer(false);
/* Set up some rendering state needed for items to work correctly */
GL11.glDisable(GL11.GL_BLEND);
GL11.glDepthMask(true);
OpenGlHelper.glBlendFunc(
GL11.GL_SRC_ALPHA,
GL11.GL_ONE_MINUS_SRC_ALPHA,
GL11.GL_SRC_ALPHA,
GL11.GL_ONE_MINUS_SRC_ALPHA);
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
callback.run();
GL11.glPopAttrib();
Minecraft.getMinecraft().getFramebuffer().bindFramebuffer(false);
this.nextCacheRefresh = System.currentTimeMillis() + (1000 / Math.max(1, getGridRenderingCacheFPS(mode)));
}
private void resetFramebuffer() {
final Minecraft minecraft = Minecraft.getMinecraft();
if (this.framebuffer.framebufferWidth != minecraft.displayWidth
|| framebuffer.framebufferHeight != minecraft.displayHeight) {
this.framebuffer.createBindFramebuffer(minecraft.displayWidth, minecraft.displayHeight);
this.framebuffer.setFramebufferFilter(GL11.GL_NEAREST);
} else {
this.framebuffer.framebufferClear();
}
// copy depth buffer from MC (fix Angelica)
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() {
this.framebuffer.bindFramebufferTexture();
final Tessellator tessellator = Tessellator.instance;
final Minecraft minecraft = Minecraft.getMinecraft();
final ScaledResolution scaledresolution = new ScaledResolution(
minecraft,
minecraft.displayWidth,
minecraft.displayHeight);
/* Set up some rendering state needed for items to work correctly */
GL11.glEnable(GL11.GL_BLEND);
OpenGlHelper
.glBlendFunc(GL11.GL_ONE, GL11.GL_ONE_MINUS_SRC_ALPHA, GL11.GL_ONE, GL11.GL_ONE_MINUS_SRC_ALPHA);
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
GL11.glEnable(GL11.GL_TEXTURE_2D);
tessellator.startDrawingQuads();
tessellator.addVertexWithUV(0, scaledresolution.getScaledHeight_double(), 0.0, 0, 0);
tessellator.addVertexWithUV(
scaledresolution.getScaledWidth_double(),
scaledresolution.getScaledHeight_double(),
0.0,
1,
0);
tessellator.addVertexWithUV(scaledresolution.getScaledWidth_double(), 0, 0.0, 1, 1);
tessellator.addVertexWithUV(0, 0, 0, 0, 1);
tessellator.draw();
this.framebuffer.unbindFramebufferTexture();
}
}
public static final int SLOT_SIZE = 18;
protected int width;
@@ -163,7 +49,10 @@ public class ItemsGrid {
protected Label messageLabel = new Label(getMessageOnEmpty(), true);
protected ScreenCapture screenCapture = null;
@Nullable
private Framebuffer framebuffer = null;
protected boolean refreshBuffer = true;
public ArrayList<ItemStack> getItems() {
return realItems;
@@ -177,10 +66,6 @@ public class ItemsGrid {
return realItems.size();
}
public boolean isEmpty() {
return realItems.isEmpty();
}
public int indexOf(ItemStack stackA, boolean useNBT) {
for (int idx = 0; idx < realItems.size(); idx++) {
@@ -267,9 +152,7 @@ public class ItemsGrid {
}
protected void onGridChanged() {
if (this.screenCapture != null) {
this.screenCapture.refreshBuffer();
}
refreshBuffer = true;
this.gridMask = null;
}
@@ -397,6 +280,34 @@ public class ItemsGrid {
protected void afterDrawSlot(@Nullable ItemPanelSlot focused, int slotIdx, Rectangle4i rect) {}
private void blitExistingBuffer() {
Minecraft minecraft = Minecraft.getMinecraft();
GL11.glEnable(GL11.GL_BLEND);
OpenGlHelper.glBlendFunc(GL11.GL_ONE, GL11.GL_ONE_MINUS_SRC_ALPHA, GL11.GL_ONE, GL11.GL_ONE_MINUS_SRC_ALPHA);
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
getFrameBuffer().bindFramebufferTexture();
GL11.glEnable(GL11.GL_TEXTURE_2D);
ScaledResolution res = new ScaledResolution(minecraft, minecraft.displayWidth, minecraft.displayHeight);
Tessellator tessellator = Tessellator.instance;
tessellator.startDrawingQuads();
tessellator.addVertexWithUV(0, res.getScaledHeight_double(), 0.0, 0, 0);
tessellator.addVertexWithUV(res.getScaledWidth_double(), res.getScaledHeight_double(), 0.0, 1, 0);
tessellator.addVertexWithUV(res.getScaledWidth_double(), 0, 0.0, 1, 1);
tessellator.addVertexWithUV(0, 0, 0, 0, 1);
tessellator.draw();
OpenGlHelper.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA, GL11.GL_ONE, GL11.GL_ZERO);
}
private Framebuffer getFrameBuffer() {
if (framebuffer == null) {
framebuffer = new Framebuffer(1, 1, true);
framebuffer.setFramebufferColor(0.0F, 0.0F, 0.0F, 0.0F);
}
return framebuffer;
}
private void drawItems() {
GuiContainerManager.enableMatrixStackLogging();
@@ -410,8 +321,8 @@ public class ItemsGrid {
GuiContainerManager.disableMatrixStackLogging();
}
protected int getGridRenderingCacheMode() {
return NEIClientConfig.getGridRenderingCacheMode();
protected boolean shouldCacheItemRendering() {
return NEIClientConfig.shouldCacheItemRendering();
}
public void draw(int mousex, int mousey) {
@@ -420,22 +331,36 @@ public class ItemsGrid {
}
final ItemPanelSlot focused = getSlotMouseOver(mousex, mousey);
final int gridRenderingCacheMode = getGridRenderingCacheMode();
beforeDrawItems(mousex, mousey, focused);
if (shouldCacheItemRendering()) {
if (gridRenderingCacheMode > 0) {
if (refreshBuffer) {
Minecraft minecraft = Minecraft.getMinecraft();
Framebuffer framebuffer = getFrameBuffer();
framebuffer.createBindFramebuffer(minecraft.displayWidth, minecraft.displayHeight);
framebuffer.framebufferClear();
framebuffer.bindFramebuffer(false);
if (this.screenCapture == null) {
this.screenCapture = new ScreenCapture();
/* Set up some rendering state needed for items to work correctly */
GL11.glDisable(GL11.GL_BLEND);
GL11.glDepthMask(true);
OpenGlHelper.glBlendFunc(
GL11.GL_SRC_ALPHA,
GL11.GL_ONE_MINUS_SRC_ALPHA,
GL11.GL_SRC_ALPHA,
GL11.GL_ONE_MINUS_SRC_ALPHA);
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
drawItems();
Minecraft.getMinecraft().getFramebuffer().bindFramebuffer(false);
refreshBuffer = false;
}
if (this.screenCapture.needRefresh(gridRenderingCacheMode)) {
this.screenCapture.captureScreen(this::drawItems, gridRenderingCacheMode);
}
this.screenCapture.renderCapturedScreen();
beforeDrawItems(mousex, mousey, focused);
blitExistingBuffer();
} else {
beforeDrawItems(mousex, mousey, focused);
drawItems();
}
@@ -457,8 +382,8 @@ public class ItemsGrid {
return null;
}
final int overRow = (mousey - marginTop) / SLOT_SIZE;
final int overColumn = (mousex - marginLeft - paddingLeft) / SLOT_SIZE;
final int overRow = (int) ((mousey - marginTop) / SLOT_SIZE);
final int overColumn = (int) ((mousex - marginLeft - paddingLeft) / SLOT_SIZE);
final int slt = columns * overRow + overColumn;
if (overRow >= rows || overColumn >= columns) {
@@ -487,8 +412,8 @@ public class ItemsGrid {
return false;
}
final int r = (py - marginTop) / SLOT_SIZE;
final int c = (px - marginLeft - paddingLeft) / SLOT_SIZE;
final int r = (int) ((py - marginTop) / SLOT_SIZE);
final int c = (int) ((px - marginLeft - paddingLeft) / SLOT_SIZE);
return !isInvalidSlot(columns * r + c);
}
@@ -123,8 +123,6 @@ public class ItemsTooltipLineHandler implements ITooltipLineHandler {
for (ItemStack stack : items) {
final NBTTagCompound nbTag = StackInfo.itemStackToNBT(stack, true);
if (nbTag == null) continue;
final String GUID = StackInfo.getItemStackGUID(stack);
if (!unique.containsKey(GUID)) {
+53 -123
View File
@@ -12,6 +12,7 @@ import static codechicken.nei.NEIClientConfig.invCreativeMode;
import static codechicken.nei.NEIClientConfig.isBookmarkPanelHidden;
import static codechicken.nei.NEIClientConfig.isEnabled;
import static codechicken.nei.NEIClientConfig.isHidden;
import static codechicken.nei.NEIClientConfig.isLoaded;
import static codechicken.nei.NEIClientConfig.showIDs;
import static codechicken.nei.NEIClientConfig.toggleBooleanSetting;
import static codechicken.nei.NEIClientUtils.cycleGamemode;
@@ -31,11 +32,10 @@ import static codechicken.nei.NEIClientUtils.toggleMagnetMode;
import static codechicken.nei.NEIClientUtils.toggleRaining;
import static codechicken.nei.NEIClientUtils.translate;
import java.awt.Point;
import java.util.HashMap;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.TreeSet;
import net.minecraft.client.Minecraft;
@@ -79,11 +79,13 @@ public class LayoutManager implements IContainerInputHandler, IContainerTooltipH
/**
* Sorted bottom first
*/
private static Set<Widget> drawWidgets = new TreeSet<>(new WidgetZOrder(false));
private static TreeSet<Widget> drawWidgets = new TreeSet<>(new WidgetZOrder(false));
/**
* Sorted top first
*/
private static Set<Widget> controlWidgets = new TreeSet<>(new WidgetZOrder(true));
private static TreeSet<Widget> controlWidgets = new TreeSet<>(new WidgetZOrder(true));
private static List<IContainerTooltipHandler> tooltipWidgets = new LinkedList<>();
public static ItemPanel itemPanel;
public static BookmarkPanel bookmarkPanel;
@@ -94,8 +96,13 @@ public class LayoutManager implements IContainerInputHandler, IContainerTooltipH
public static ButtonCycled options;
public static ButtonCycled bookmarksButton;
@Deprecated
public static Button more;
@Deprecated
public static Button less;
@Deprecated
public static ItemQuantityField quantity;
public static Button delete;
@@ -143,8 +150,8 @@ public class LayoutManager implements IContainerInputHandler, IContainerTooltipH
gui.guiTop = (gui.height - gui.ySize) / 2;
if (gui instanceof GuiContainerCreative && gui.buttonList.size() >= 2) {
GuiButton button1 = gui.buttonList.get(0);
GuiButton button2 = gui.buttonList.get(1);
GuiButton button1 = (GuiButton) gui.buttonList.get(0);
GuiButton button2 = (GuiButton) gui.buttonList.get(1);
button1.xPosition = gui.guiLeft;
button2.xPosition = gui.guiLeft + gui.xSize - 20;
}
@@ -165,18 +172,14 @@ public class LayoutManager implements IContainerInputHandler, IContainerTooltipH
public void onMouseClicked(GuiContainer gui, int mousex, int mousey, int button) {
if (isHidden()) return;
for (Widget widget : controlWidgets) {
widget.onGuiClick(mousex, mousey);
}
for (Widget widget : controlWidgets) widget.onGuiClick(mousex, mousey);
}
@Override
public boolean mouseClicked(GuiContainer gui, int mousex, int mousey, int button) {
if (isHidden()) return false;
if (!isEnabled()) {
return options.contains(mousex, mousey) && options.handleClick(mousex, mousey, button);
}
if (!isEnabled()) return options.contains(mousex, mousey) && options.handleClick(mousex, mousey, button);
for (Widget widget : controlWidgets) {
widget.onGuiClick(mousex, mousey);
@@ -190,22 +193,10 @@ public class LayoutManager implements IContainerInputHandler, IContainerTooltipH
@Override
public boolean objectUnderMouse(GuiContainer gui, int mousex, int mousey) {
return getWidgetUnderMouse(mousex, mousey) != null;
}
if (!isHidden() && isEnabled())
for (Widget widget : drawWidgets) if (widget.contains(mousex, mousey)) return true;
public Widget getWidgetUnderMouse(int mousex, int mousey) {
if (isHidden() || !isEnabled()) {
return null;
}
for (Widget widget : controlWidgets) {
if (widget.contains(mousex, mousey)) {
return widget;
}
}
return null;
return false;
}
public boolean keyTyped(GuiContainer gui, char keyChar, int keyID) {
@@ -261,12 +252,12 @@ public class LayoutManager implements IContainerInputHandler, IContainerTooltipH
@Override
public ItemStack getStackUnderMouse(GuiContainer gui, int mousex, int mousey) {
final Widget focused = getWidgetUnderMouse(mousex, mousey);
if (focused != null) {
return focused.getStackMouseOver(mousex, mousey);
if (!isHidden() && isEnabled()) {
for (Widget widget : drawWidgets) {
ItemStack stack = widget.getStackMouseOver(mousex, mousey);
if (stack != null) return stack;
}
}
return null;
}
@@ -295,32 +286,18 @@ public class LayoutManager implements IContainerInputHandler, IContainerTooltipH
@Override
public void postRenderTooltips(GuiContainer gui, int mousex, int mousey, List<String> tooltip) {
if (!isHidden() && isEnabled() && GuiContainerManager.shouldShowTooltip(gui)) {
final Widget focused = getWidgetUnderMouse(mousex, mousey);
if (focused != null) {
focused.postDrawTooltips(mousex, mousey, tooltip);
}
for (Widget widget : drawWidgets) widget.postDrawTooltips(mousex, mousey, tooltip);
}
}
@Override
public List<String> handleTooltip(GuiContainer gui, int mousex, int mousey, List<String> currenttip) {
if (!isHidden() && isEnabled() && GuiContainerManager.shouldShowTooltip(gui)) {
final Widget focused = getWidgetUnderMouse(mousex, mousey);
if (focused != null) {
currenttip = focused.handleTooltip(mousex, mousey, currenttip);
if (focused instanceof IContainerTooltipHandler tip) {
currenttip = tip.handleTooltip(gui, mousex, mousey, currenttip);
}
}
for (Widget widget : drawWidgets) currenttip = widget.handleTooltip(mousex, mousey, currenttip);
for (IContainerTooltipHandler tip : tooltipWidgets)
currenttip = tip.handleTooltip(gui, mousex, mousey, currenttip);
}
return currenttip;
}
@@ -338,12 +315,8 @@ public class LayoutManager implements IContainerInputHandler, IContainerTooltipH
}
if (!isHidden() && isEnabled() && GuiContainerManager.shouldShowTooltip(gui)) {
final Point mouse = GuiDraw.getMousePosition();
final Widget focused = getWidgetUnderMouse(mouse.x, mouse.y);
if (focused instanceof IContainerTooltipHandler tip) {
for (IContainerTooltipHandler tip : tooltipWidgets)
currenttip = tip.handleItemDisplayName(gui, stack, currenttip);
}
}
return currenttip;
@@ -354,11 +327,8 @@ public class LayoutManager implements IContainerInputHandler, IContainerTooltipH
List<String> currenttip) {
if (!isHidden() && isEnabled() && GuiContainerManager.shouldShowTooltip(gui)) {
final Widget focused = getWidgetUnderMouse(mousex, mousey);
if (focused instanceof IContainerTooltipHandler tip) {
for (IContainerTooltipHandler tip : tooltipWidgets)
currenttip = tip.handleItemTooltip(gui, itemstack, mousex, mousey, currenttip);
}
}
return currenttip;
@@ -368,11 +338,8 @@ public class LayoutManager implements IContainerInputHandler, IContainerTooltipH
public Map<String, String> handleHotkeys(GuiContainer gui, int mousex, int mousey, Map<String, String> hotkeys) {
if (!isHidden() && isEnabled() && GuiContainerManager.shouldShowTooltip(gui)) {
final Widget focused = getWidgetUnderMouse(mousex, mousey);
if (focused instanceof IContainerTooltipHandler tip) {
for (IContainerTooltipHandler tip : tooltipWidgets)
hotkeys = tip.handleHotkeys(gui, mousex, mousey, hotkeys);
}
}
return hotkeys;
@@ -380,12 +347,17 @@ public class LayoutManager implements IContainerInputHandler, IContainerTooltipH
public static void layout(GuiContainer gui) {
VisiblityData visiblity = new VisiblityData();
visiblity.showNEI = !isHidden();
visiblity.showBookmarkPanel = !isBookmarkPanelHidden();
visiblity.showSearchSection = !(gui.height - gui.ySize <= 40 && NEIClientConfig.isSearchWidgetCentered());
visiblity.showSubsetDropdown = NEIClientConfig.showSubsetWidget()
&& (gui.guiTop > 20 || visiblity.showSearchSection && !NEIClientConfig.subsetWidgetOnTop());
visiblity.showWidgets = gui.guiLeft - 4 > 76;
if (isHidden()) visiblity.showNEI = false;
if (isBookmarkPanelHidden()) visiblity.showBookmarkPanel = false;
if (gui.height - gui.ySize <= 40 && NEIClientConfig.isSearchWidgetCentered())
visiblity.showSearchSection = false;
if (visiblity.showBookmarkPanel || gui.guiTop <= 20) visiblity.showSubsetDropdown = false;
if (gui.guiLeft - 4 < 76) visiblity.showWidgets = false;
try {
GuiInfo.readLock.lock();
@@ -495,43 +467,9 @@ public class LayoutManager implements IContainerInputHandler, IContainerTooltipH
}
};
more = new Button("+") {
@Override
public boolean onButtonPress(boolean rightclick) {
if (rightclick) return false;
int modifier = NEIClientUtils.controlKey() ? 64 : NEIClientUtils.shiftKey() ? 10 : 1;
int quantity = NEIClientConfig.getItemQuantity() + modifier;
if (quantity < 0) {
quantity = 0;
}
LayoutManager.quantity.setText(Integer.toString(quantity));
return true;
}
};
less = new Button("-") {
@Override
public boolean onButtonPress(boolean rightclick) {
if (rightclick) return false;
int modifier = NEIClientUtils.controlKey() ? -64 : NEIClientUtils.shiftKey() ? -10 : -1;
int quantity = NEIClientConfig.getItemQuantity() + modifier;
if (quantity < 0) {
quantity = 0;
}
LayoutManager.quantity.setText(Integer.toString(quantity));
return true;
}
};
quantity = new ItemQuantityField("quantity");
more = ItemPanels.itemPanel.more;
less = ItemPanels.itemPanel.less;
quantity = ItemPanels.itemPanel.quantity;
delete = new Button() {
@Override
@@ -705,7 +643,7 @@ public class LayoutManager implements IContainerInputHandler, IContainerTooltipH
if (isEnabled()) {
setInputFocused(null);
if (!itemsLoaded) {
if (!itemsLoaded && isLoaded()) {
ItemList.loadItems.restart();
}
@@ -739,18 +677,12 @@ public class LayoutManager implements IContainerInputHandler, IContainerTooltipH
public static void updateWidgetVisiblities(GuiContainer gui, VisiblityData visiblity) {
drawWidgets = new TreeSet<>(new WidgetZOrder(false));
controlWidgets = new TreeSet<>(new WidgetZOrder(true));
tooltipWidgets.clear();
if (!visiblity.showNEI) return;
addWidget(options);
addWidget(bookmarksButton);
if (visiblity.showItemPanel && NEIClientConfig.showItemQuantityWidget()) {
addWidget(quantity);
addWidget(more);
addWidget(less);
}
if (visiblity.showItemPanel) {
addWidget(itemPanel);
itemPanel.setVisible();
@@ -761,13 +693,9 @@ public class LayoutManager implements IContainerInputHandler, IContainerTooltipH
bookmarkPanel.setVisible();
}
if (visiblity.showSearchSection && NEIClientConfig.isSearchWidgetCentered()
|| visiblity.showItemPanel && !NEIClientConfig.isSearchWidgetCentered()) {
searchField.setVisible(true);
searchField.setVisible(visiblity.showSearchSection);
if (visiblity.showSearchSection) {
addWidget(searchField);
} else {
searchField.setVisible(false);
searchField.setFocus(false);
}
if (visiblity.showUtilityButtons) {
@@ -803,6 +731,10 @@ public class LayoutManager implements IContainerInputHandler, IContainerTooltipH
public static void addWidget(Widget widget) {
drawWidgets.add(widget);
controlWidgets.add(widget);
if (widget instanceof IContainerTooltipHandler) {
tooltipWidgets.add((IContainerTooltipHandler) widget);
}
}
@Override
@@ -818,9 +750,7 @@ public class LayoutManager implements IContainerInputHandler, IContainerTooltipH
public boolean mouseScrolled(GuiContainer gui, int mousex, int mousey, int scrolled) {
if (isHidden() || !isEnabled()) return false;
for (Widget widget : controlWidgets) {
if (widget.onMouseWheel(scrolled, mousex, mousey)) return true;
}
for (Widget widget : drawWidgets) if (widget.onMouseWheel(scrolled, mousex, mousey)) return true;
return false;
}
@@ -1,20 +1,34 @@
package codechicken.nei;
import static codechicken.lib.gui.GuiDraw.drawStringC;
import static codechicken.nei.LayoutManager.bookmarkPanel;
import static codechicken.nei.LayoutManager.bookmarksButton;
import static codechicken.nei.LayoutManager.delete;
import static codechicken.nei.LayoutManager.dropDown;
import static codechicken.nei.LayoutManager.gamemode;
import static codechicken.nei.LayoutManager.heal;
import static codechicken.nei.LayoutManager.itemPanel;
import static codechicken.nei.LayoutManager.itemPresenceOverlays;
import static codechicken.nei.LayoutManager.itemZoom;
import static codechicken.nei.LayoutManager.magnet;
import static codechicken.nei.LayoutManager.options;
import static codechicken.nei.LayoutManager.rain;
import static codechicken.nei.LayoutManager.searchField;
import static codechicken.nei.LayoutManager.timeButtons;
import static codechicken.nei.NEIClientConfig.canPerformAction;
import static codechicken.nei.NEIClientConfig.disabledActions;
import static codechicken.nei.NEIClientConfig.getMagnetMode;
import static codechicken.nei.NEIClientConfig.isEnabled;
import net.minecraft.client.gui.inventory.GuiContainer;
import org.lwjgl.opengl.GL11;
import codechicken.lib.vec.Rectangle4i;
import codechicken.nei.api.LayoutStyle;
import codechicken.nei.drawable.DrawableBuilder;
public class LayoutStyleMinecraft extends LayoutStyle {
protected static final int BUTTON_SIZE = 20;
protected static final int MARGIN = 2;
public int buttonCount;
public int leftSize;
public int numButtons;
@@ -26,21 +40,19 @@ public class LayoutStyleMinecraft extends LayoutStyle {
@Override
public void init() {
LayoutManager.delete.icon = new Image(144, 12, 12, 12);
LayoutManager.rain.icon = new Image(120, 12, 12, 12);
LayoutManager.gamemode.icons[0] = new Image(132, 12, 12, 12);
LayoutManager.gamemode.icons[1] = new Image(156, 12, 12, 12);
LayoutManager.gamemode.icons[2] = new Image(168, 12, 12, 12);
LayoutManager.magnet.icon = new Image(180, 24, 12, 12);
LayoutManager.timeButtons[0].icon = new Image(132, 24, 12, 12);
LayoutManager.timeButtons[1].icon = new Image(120, 24, 12, 12);
LayoutManager.timeButtons[2].icon = new Image(144, 24, 12, 12);
LayoutManager.timeButtons[3].icon = new Image(156, 24, 12, 12);
LayoutManager.heal.icon = new Image(168, 24, 12, 12);
LayoutManager.itemPresenceOverlays[0] = new DrawableBuilder("nei:textures/nei_tabbed_sprites.png", 0, 40, 8, 8)
.build();
LayoutManager.itemPresenceOverlays[1] = new DrawableBuilder("nei:textures/nei_tabbed_sprites.png", 8, 40, 8, 8)
.build();
delete.icon = new Image(144, 12, 12, 12);
rain.icon = new Image(120, 12, 12, 12);
gamemode.icons[0] = new Image(132, 12, 12, 12);
gamemode.icons[1] = new Image(156, 12, 12, 12);
gamemode.icons[2] = new Image(168, 12, 12, 12);
magnet.icon = new Image(180, 24, 12, 12);
timeButtons[0].icon = new Image(132, 24, 12, 12);
timeButtons[1].icon = new Image(120, 24, 12, 12);
timeButtons[2].icon = new Image(144, 24, 12, 12);
timeButtons[3].icon = new Image(156, 24, 12, 12);
heal.icon = new Image(168, 24, 12, 12);
itemPresenceOverlays[0] = new DrawableBuilder("nei:textures/nei_tabbed_sprites.png", 0, 40, 8, 8).build();
itemPresenceOverlays[1] = new DrawableBuilder("nei:textures/nei_tabbed_sprites.png", 8, 40, 8, 8).build();
}
@Override
@@ -53,177 +65,85 @@ public class LayoutStyleMinecraft extends LayoutStyle {
reset();
leftSize = ItemPanels.bookmarkPanel.getWidth(gui);
numButtons = Math.max(leftSize / 20, 1);
numButtons = Math.max(leftSize / 18, 1);
LayoutManager.delete.state = 0x4;
if (NEIController.getDeleteMode()) {
LayoutManager.delete.state |= 1;
} else if (!visiblity.enableDeleteMode) {
LayoutManager.delete.state |= 2;
}
delete.state = 0x4;
if (NEIController.getDeleteMode()) delete.state |= 1;
else if (!visiblity.enableDeleteMode) delete.state |= 2;
LayoutManager.rain.state = 0x4;
if (NEIClientConfig.disabledActions.contains("rain")) {
LayoutManager.rain.state |= 2;
} else if (NEIClientUtils.isRaining()) {
LayoutManager.rain.state |= 1;
}
rain.state = 0x4;
if (disabledActions.contains("rain")) rain.state |= 2;
else if (NEIClientUtils.isRaining()) rain.state |= 1;
LayoutManager.gamemode.state = 0x4;
gamemode.state = 0x4;
if (NEIClientUtils.getGamemode() != 0) {
LayoutManager.gamemode.state |= 0x1;
LayoutManager.gamemode.index = NEIClientUtils.getGamemode() - 1;
gamemode.state |= 0x1;
gamemode.index = NEIClientUtils.getGamemode() - 1;
} else {
if (NEIClientUtils.isValidGamemode("creative")) {
LayoutManager.gamemode.index = 0;
} else if (NEIClientUtils.isValidGamemode("creative+")) {
LayoutManager.gamemode.index = 1;
} else if (NEIClientUtils.isValidGamemode("adventure")) {
LayoutManager.gamemode.index = 2;
}
if (NEIClientUtils.isValidGamemode("creative")) gamemode.index = 0;
else if (NEIClientUtils.isValidGamemode("creative+")) gamemode.index = 1;
else if (NEIClientUtils.isValidGamemode("adventure")) gamemode.index = 2;
}
LayoutManager.bookmarksButton.index = NEIClientConfig.isBookmarkPanelHidden() ? 0 : 1;
LayoutManager.options.index = NEIClientConfig.getCheatMode();
bookmarksButton.index = NEIClientConfig.isBookmarkPanelHidden() ? 0 : 1;
options.index = NEIClientConfig.getCheatMode();
LayoutManager.magnet.state = 0x4 | (NEIClientConfig.getMagnetMode() ? 1 : 0);
if (NEIClientConfig.canPerformAction("delete")) {
layoutButton(LayoutManager.delete);
}
if (NEIClientConfig.canPerformAction("rain")) {
layoutButton(LayoutManager.rain);
}
magnet.state = 0x4 | (getMagnetMode() ? 1 : 0);
if (canPerformAction("delete")) layoutButton(delete);
if (canPerformAction("rain")) layoutButton(rain);
if (NEIClientUtils.isValidGamemode("creative") || NEIClientUtils.isValidGamemode("creative+")
|| NEIClientUtils.isValidGamemode("adventure")) {
layoutButton(LayoutManager.gamemode);
}
if (NEIClientConfig.canPerformAction("magnet")) {
layoutButton(LayoutManager.magnet);
}
if (NEIClientConfig.canPerformAction("time")) {
|| NEIClientUtils.isValidGamemode("adventure"))
layoutButton(gamemode);
if (canPerformAction("magnet")) layoutButton(magnet);
if (canPerformAction("time")) {
for (int i = 0; i < 4; i++) {
LayoutManager.timeButtons[i].state = NEIClientConfig.disabledActions.contains(NEIActions.timeZones[i])
? 2
: 0;
layoutButton(LayoutManager.timeButtons[i]);
timeButtons[i].state = disabledActions.contains(NEIActions.timeZones[i]) ? 2 : 0;
layoutButton(timeButtons[i]);
}
}
if (canPerformAction("heal")) layoutButton(heal);
if (NEIClientConfig.canPerformAction("heal")) {
layoutButton(LayoutManager.heal);
}
itemPanel.resize(gui);
bookmarkPanel.resize(gui);
itemZoom.resize(gui);
layoutFooter(gui, visiblity);
options.x = isEnabled() ? 0 : 6;
options.y = isEnabled() ? gui.height - 22 : gui.height - 28;
options.w = 22;
options.h = 22;
LayoutManager.itemPanel.resize(gui);
LayoutManager.bookmarkPanel.resize(gui);
LayoutManager.itemZoom.resize(gui);
}
bookmarksButton.x = 24 + (isEnabled() ? 0 : 6);
bookmarksButton.y = isEnabled() ? gui.height - 22 : gui.height - 28;
bookmarksButton.w = 22;
bookmarksButton.h = 22;
protected void layoutFooter(GuiContainer gui, VisiblityData visiblity) {
LayoutManager.options.x = MARGIN;
LayoutManager.options.y = gui.height - BUTTON_SIZE - MARGIN;
LayoutManager.options.w = LayoutManager.options.h = BUTTON_SIZE;
LayoutManager.bookmarksButton.x = LayoutManager.options.x + LayoutManager.options.w + MARGIN;
LayoutManager.bookmarksButton.y = gui.height - BUTTON_SIZE - MARGIN;
LayoutManager.bookmarksButton.w = LayoutManager.bookmarksButton.h = BUTTON_SIZE;
final Rectangle4i searchArea = getSearchFieldArea(gui);
final Rectangle4i quantityArea = getQuantityFieldArea(visiblity);
LayoutManager.searchField.x = searchArea.x;
LayoutManager.searchField.y = searchArea.y;
LayoutManager.searchField.w = searchArea.w;
LayoutManager.searchField.h = searchArea.h;
if (!NEIClientConfig.subsetWidgetOnTop() && visiblity.showSubsetDropdown) {
LayoutManager.dropDown.x = searchArea.x;
LayoutManager.dropDown.y = searchArea.y;
LayoutManager.dropDown.h = LayoutManager.dropDown.w = BUTTON_SIZE;
LayoutManager.searchField.x += BUTTON_SIZE;
LayoutManager.searchField.w -= BUTTON_SIZE;
} else {
LayoutManager.dropDown.h = 16;
LayoutManager.dropDown.w = 150;
LayoutManager.dropDown.y = MARGIN;
LayoutManager.dropDown.x = (gui.width - LayoutManager.dropDown.w) / 2;
}
if (quantityArea.w == ItemPanels.itemPanel.w) {
LayoutManager.more.w = LayoutManager.less.w = BUTTON_SIZE;
LayoutManager.more.h = LayoutManager.less.h = LayoutManager.quantity.h = quantityArea.h;
LayoutManager.more.y = LayoutManager.less.y = LayoutManager.quantity.y = quantityArea.y;
LayoutManager.less.x = quantityArea.x;
LayoutManager.more.x = quantityArea.x2() - BUTTON_SIZE;
LayoutManager.quantity.x = LayoutManager.less.x + LayoutManager.less.w + 1;
LayoutManager.quantity.w = LayoutManager.more.x - LayoutManager.quantity.x - 1;
} else {
LayoutManager.quantity.x = quantityArea.x;
LayoutManager.quantity.w = quantityArea.w - 18;
LayoutManager.quantity.y = LayoutManager.more.y = quantityArea.y;
LayoutManager.quantity.h = quantityArea.h;
LayoutManager.more.w = LayoutManager.less.w = 18;
LayoutManager.more.x = LayoutManager.less.x = LayoutManager.quantity.x + LayoutManager.quantity.w;
LayoutManager.more.h = LayoutManager.less.h = LayoutManager.quantity.h / 2;
LayoutManager.less.y = LayoutManager.more.y + LayoutManager.more.h;
}
}
private Rectangle4i getSearchFieldArea(GuiContainer gui) {
final Rectangle4i area = new Rectangle4i(0, 0, 0, BUTTON_SIZE);
dropDown.h = 18;
dropDown.w = 150;
dropDown.y = 0;
dropDown.x = (gui.width - gui.xSize) / 2 + gui.xSize - dropDown.w;
searchField.h = 20;
if (NEIClientConfig.isSearchWidgetCentered()) {
area.w = gui.xSize - MARGIN * 2;
area.x = (gui.width - area.w) / 2;
area.y = gui.height - BUTTON_SIZE - MARGIN;
} else if (NEIClientConfig.showItemQuantityWidget()) {
area.w = ItemPanels.itemPanel.w - (int) Math.max(BUTTON_SIZE * 2.5f, ItemPanels.itemPanel.w * 0.3f) - 1;
area.x = ItemPanels.itemPanel.x;
area.y = ItemPanels.itemPanel.y + ItemPanels.itemPanel.h - BUTTON_SIZE;
searchField.w = 150;
searchField.x = (gui.width - searchField.w) / 2;
} else {
area.w = ItemPanels.itemPanel.w;
area.x = ItemPanels.itemPanel.x;
area.y = ItemPanels.itemPanel.y + ItemPanels.itemPanel.h - BUTTON_SIZE;
searchField.w = (int) (itemPanel.w * (NEIClientConfig.showItemQuantityWidget() ? 0.7 : 1));
searchField.x = itemPanel.x;
}
searchField.y = gui.height - searchField.h - 2;
return area;
}
private Rectangle4i getQuantityFieldArea(VisiblityData visiblity) {
final Rectangle4i area = new Rectangle4i(0, 0, 0, BUTTON_SIZE);
if (!visiblity.showSearchSection || NEIClientConfig.isSearchWidgetCentered()) {
area.w = ItemPanels.itemPanel.w;
area.x = ItemPanels.itemPanel.x;
} else {
area.w = (int) Math.max(BUTTON_SIZE * 2.5f, ItemPanels.itemPanel.w * 0.3f);
area.x = ItemPanels.itemPanel.x + ItemPanels.itemPanel.w - area.w;
if (!visiblity.showItemSection) {
searchField.setFocus(false);
}
area.y = ItemPanels.itemPanel.y + ItemPanels.itemPanel.h - BUTTON_SIZE;
return area;
}
public void layoutButton(Button button) {
button.x = 2 + (buttonCount % numButtons) * 19;
button.y = 2 + (buttonCount / numButtons) * 18;
button.h = 17;
button.w = button.contentWidth() + 6;
button.x = MARGIN + (buttonCount % numButtons) * (button.w + MARGIN);
button.y = MARGIN + (buttonCount / numButtons) * (button.h + MARGIN);
buttonCount++;
}
@@ -257,16 +177,9 @@ public class LayoutStyleMinecraft extends LayoutStyle {
@Override
public void drawSubsetTag(String text, int x, int y, int w, int h, int state, boolean mouseover) {
if (state == 1) {
GL11.glColor4f(0.65F, 0.65F, 0.65F, 1.0F);
} else {
GL11.glColor4f(1, 1, 1, 1);
}
if (state == 1) GL11.glColor4f(0.65F, 0.65F, 0.65F, 1.0F);
else GL11.glColor4f(1, 1, 1, 1);
LayoutManager.drawButtonBackground(x, y, w, h, false, state == 0 ? 0 : 1);
if (text != null) {
drawStringC(text, x, y, w, h, mouseover ? 0xFFFFFFA0 : (state == 2 ? 0xFFE0E0E0 : 0xFFA0A0A0));
}
if (text != null) drawStringC(text, x, y, w, h, state == 2 ? 0xFFE0E0E0 : 0xFFA0A0A0);
}
}
@@ -233,12 +233,6 @@ 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.subsets.enabled").setComment("Enable/disable Subsets Dropdown").getBooleanValue(true);
API.addOption(new OptionToggleButton("inventory.subsets.enabled", true));
tag.getTag("inventory.subsets.widgetPosition").setComment("Subsets Widget Position").getBooleanValue(true);
API.addOption(new OptionToggleButton("inventory.subsets.widgetPosition", true));
tag.getTag("inventory.guirecipe.profile").getBooleanValue(false);
API.addOption(new OptionToggleButton("inventory.guirecipe.profile", true));
@@ -247,7 +241,7 @@ public class NEIClientConfig {
tag.getTag("inventory.history.historyColor").setComment("Color of the history area display")
.getHexValue(0xee555555);
API.addOption(new OptionIntegerField("inventory.history.historyColor", 0, OptionIntegerField.UNSIGNED_INT_MAX));
API.addOption(new OptionIntegerField("inventory.history.historyColor"));
tag.getTag("inventory.history.useRows").setComment("Rows used in historical areas").getIntValue(2);
API.addOption(new OptionIntegerField("inventory.history.useRows", 1, 5));
@@ -273,19 +267,11 @@ public class NEIClientConfig {
tag.getTag("inventory.collapsibleItems.expandedColor")
.setComment("Color of the collapsible item expanded state").getHexValue(0x335555EE);
API.addOption(
new OptionIntegerField(
"inventory.collapsibleItems.expandedColor",
0,
OptionIntegerField.UNSIGNED_INT_MAX));
API.addOption(new OptionIntegerField("inventory.collapsibleItems.expandedColor"));
tag.getTag("inventory.collapsibleItems.collapsedColor")
.setComment("Color of the collapsible item collapsed state").getHexValue(0x335555EE);
API.addOption(
new OptionIntegerField(
"inventory.collapsibleItems.collapsedColor",
0,
OptionIntegerField.UNSIGNED_INT_MAX));
API.addOption(new OptionIntegerField("inventory.collapsibleItems.collapsedColor"));
API.addOption(
new OptionButton(
@@ -323,7 +309,7 @@ public class NEIClientConfig {
API.addOption(new OptionToggleButton("inventory.itemzoom.showName", true));
tag.getTag("inventory.itemzoom.nameColor").getHexValue(0xFFFFFFFF);
API.addOption(new OptionIntegerField("inventory.itemzoom.nameColor", 0, OptionIntegerField.UNSIGNED_INT_MAX));
API.addOption(new OptionIntegerField("inventory.itemzoom.nameColor"));
tag.getTag("inventory.itemIDs").getIntValue(1);
API.addOption(new OptionCycled("inventory.itemIDs", 3, true));
@@ -359,10 +345,8 @@ public class NEIClientConfig {
}
});
tag.getTag("inventory.gridRenderingCacheFPS").getIntValue(8);
tag.getTag("inventory.gridRenderingCacheMode").getIntValue(0);
API.addOption(new OptionCycled("inventory.gridRenderingCacheMode", 3, true));
tag.getTag("inventory.cacheItemRendering").getBooleanValue(false);
API.addOption(new OptionToggleButton("inventory.cacheItemRendering", true));
tag.getTag("itemLoadingTimeout").getIntValue(500);
@@ -441,18 +425,6 @@ public class NEIClientConfig {
tag.getTag("inventory.search.widgetPosition").setComment("Widget Position").getBooleanValue(true);
API.addOption(new OptionToggleButton("inventory.search.widgetPosition", true));
tag.getTag("inventory.search.hideUntilSearching").setComment("Hide Items Until Searching")
.getBooleanValue(false);
API.addOption(new OptionToggleButton("inventory.search.hideUntilSearching", true) {
@Override
public boolean onClick(int button) {
super.onClick(button);
ItemList.updateFilter.restart();
return true;
}
});
tag.getTag("inventory.search.widgetAutofocus")
.setComment(
"Focus Search Widget on Open, blurs/unfocuses on mouse move unless typing has started first")
@@ -485,7 +457,6 @@ public class NEIClientConfig {
}
if (state()) {
NEIClientConfig.setIntSetting("inventory.search.spaceMode", 1);
NEIClientConfig.setIntSetting("inventory.search.modNameSearchMode", 0);
NEIClientConfig.setIntSetting("inventory.search.tooltipSearchMode", 0);
NEIClientConfig.setIntSetting("inventory.search.identifierSearchMode", 0);
@@ -497,7 +468,6 @@ public class NEIClientConfig {
SearchField.searchParser.prefixRedefinitions.put('@', '%');
SearchField.searchParser.clearCache();
} else {
NEIClientConfig.setIntSetting("inventory.search.spaceMode", 0);
NEIClientConfig.setIntSetting("inventory.search.modNameSearchMode", 1);
NEIClientConfig.setIntSetting("inventory.search.tooltipSearchMode", 0);
NEIClientConfig.setIntSetting("inventory.search.identifierSearchMode", 0);
@@ -513,22 +483,6 @@ public class NEIClientConfig {
});
tag.getTag("inventory.search.spaceMode").setComment("Search Space Rules").getIntValue(0);
API.addOption(new OptionCycled("inventory.search.spaceMode", 3, true) {
@Override
public boolean onClick(int button) {
// SearchField.searchParser.clearCache();
return super.onClick(button);
}
@Override
public boolean isEnabled() {
return !tag.getTag("inventory.search.format").getBooleanValue();
}
});
tag.getTag("inventory.search.modNameSearchMode").setComment("Search mode for Mod Names (prefix: @)")
.getIntValue(1);
API.addOption(new OptionCycled("inventory.search.modNameSearchMode", 3, true) {
@@ -723,24 +677,23 @@ public class NEIClientConfig {
public static void loadWorld(String worldPath) {
unloadWorld();
NEIClientConfig.worldPath = worldPath;
setInternalEnabled(true);
logger.debug("Loading " + (Minecraft.getMinecraft().isSingleplayer() ? "Local" : "Remote") + " World");
if (!worldPath.equals(NEIClientConfig.worldPath)) {
NEIClientConfig.worldPath = worldPath;
final File specificDir = new File(CommonUtils.getMinecraftDir(), "saves/NEI/" + worldPath);
final boolean newWorld = !specificDir.exists();
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")));
bootNEI(ClientUtils.getWorld());
onWorldLoad(newWorld);
if (newWorld) {
specificDir.mkdirs();
}
world = new ConfigSet(new File(specificDir, "NEI.dat"), new ConfigFile(new File(specificDir, "NEI.cfg")));
bootNEI(ClientUtils.getWorld());
CollapsibleItems.load();
ItemPanels.bookmarkPanel.load();
onWorldLoad(newWorld);
}
public static String getWorldPath() {
@@ -754,12 +707,11 @@ public class NEIClientConfig {
setWorldDefaults();
creativeInv = new ItemStack[54];
LayoutManager.searchField.setText(getSearchExpression());
LayoutManager.quantity.setText(Integer.toString(getItemQuantity()));
ItemPanels.itemPanel.quantity.setText(Integer.toString(getItemQuantity()));
SubsetWidget.loadHidden();
if (newWorld && Minecraft.getMinecraft().isSingleplayer()) {
world.config.getTag("inventory.cheatmode")
.setIntValue(NEIClientUtils.mc().playerController.isInCreativeMode() ? 2 : 0);
}
if (newWorld && Minecraft.getMinecraft().isSingleplayer()) world.config.getTag("inventory.cheatmode")
.setIntValue(NEIClientUtils.mc().playerController.isInCreativeMode() ? 2 : 0);
NEIInfo.load(ClientUtils.getWorld());
}
@@ -778,7 +730,6 @@ public class NEIClientConfig {
ItemPanels.bookmarkPanel.saveBookmarks();
}
SubsetWidget.saveHidden();
CollapsibleItems.saveStates();
if (world != null) {
@@ -841,9 +792,6 @@ public class NEIClientConfig {
});
RecipeCatalysts.loadCatalystInfo();
ItemPanels.bookmarkPanel.load();
SubsetWidget.loadHidden();
CollapsibleItems.load();
ItemSorter.loadConfig();
// Set pluginNEIConfigLoaded here before posting the NEIConfigsLoadedEvent. This used to be the
@@ -858,8 +806,6 @@ public class NEIClientConfig {
}
}.start();
} else {
ItemPanels.bookmarkPanel.load();
SubsetWidget.loadHidden();
ItemList.loadItems.restart();
}
}
@@ -902,22 +848,10 @@ public class NEIClientConfig {
return getBooleanSetting("inventory.showItemQuantityWidget");
}
public static boolean hideItemsUntilSearching() {
return getBooleanSetting("inventory.search.hideUntilSearching");
}
public static boolean isSearchWidgetCentered() {
return getBooleanSetting("inventory.search.widgetPosition");
}
public static boolean showSubsetWidget() {
return getBooleanSetting("inventory.subsets.enabled");
}
public static boolean subsetWidgetOnTop() {
return getBooleanSetting("inventory.subsets.widgetPosition");
}
public static int searchWidgetAutofocus() {
return getIntSetting("inventory.search.widgetAutofocus");
}
@@ -1066,8 +1000,8 @@ public class NEIClientConfig {
return getBooleanSetting("inventory.history.enabled");
}
public static int getGridRenderingCacheMode() {
return OpenGlHelper.framebufferSupported ? getIntSetting("inventory.gridRenderingCacheMode") : 0;
public static boolean shouldCacheItemRendering() {
return getBooleanSetting("inventory.cacheItemRendering") && OpenGlHelper.framebufferSupported;
}
public static boolean enableCollapsibleItems() {
@@ -322,7 +322,7 @@ public class NEIClientUtils extends NEIServerUtils {
}
public static void sendCommand(String command, Object... args) {
if (command.isEmpty()) return;
if (command.length() == 0) return;
NumberFormat numberformat = NumberFormat.getIntegerInstance();
numberformat.setGroupingUsed(false);
@@ -1,7 +1,6 @@
package codechicken.nei;
import java.io.File;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashSet;
import java.util.LinkedList;
@@ -39,7 +38,6 @@ public class NEIModContainer extends DummyModContainer {
public static LinkedList<IConfigureNEI> plugins = new LinkedList<>();
private static boolean gregTech5Loaded;
private static boolean gtnhLibLoaded;
public NEIModContainer() {
super(getModMetadata());
@@ -61,23 +59,16 @@ public class NEIModContainer extends DummyModContainer {
return gregTech5Loaded;
}
public static boolean isGTNHLibLoaded() {
return gtnhLibLoaded;
}
@Override
public Set<ArtifactVersion> getRequirements() {
Set<ArtifactVersion> deps = new HashSet<>();
deps.add(VersionParser.parseVersionReference("CodeChickenCore@[" + codechicken.core.asm.Tags.VERSION + ",)"));
deps.add(VersionParser.parseVersionReference("CodeChickenCore@[" + CodeChickenCorePlugin.version + ",)"));
return deps;
}
@Override
public List<ArtifactVersion> getDependencies() {
List<ArtifactVersion> deps = new ArrayList<>();
deps.add(VersionParser.parseVersionReference("CodeChickenCore@[" + codechicken.core.asm.Tags.VERSION + ",)"));
deps.add(VersionParser.parseVersionReference("gtnhlib@[0.6.0,)"));
return deps;
return new LinkedList<>(getRequirements());
}
private String description;
@@ -115,7 +106,6 @@ public class NEIModContainer extends DummyModContainer {
@Subscribe
public void preInit(FMLPreInitializationEvent event) {
gregTech5Loaded = Loader.isModLoaded("gregtech") && !Loader.isModLoaded("gregapi_post");
gtnhLibLoaded = Loader.isModLoaded("gtnhlib");
if (CommonUtils.isClient()) ClientHandler.preInit();
}
@@ -197,7 +197,7 @@ public class NEIServerConfig {
FileReader r = new FileReader(file);
int line = 0;
for (String s : IOUtils.readLines(r)) {
if (s.charAt(0) == '#' || s.trim().isEmpty()) continue;
if (s.charAt(0) == '#' || s.trim().length() == 0) continue;
int delim = s.lastIndexOf('=');
if (delim < 0) {
logger.error("line " + line + ": Missing =");
@@ -171,7 +171,7 @@ public abstract class PanelWidget extends Widget implements IContainerTooltipHan
protected abstract int resizeFooter(GuiContainer gui);
public void setVisible() {
if (grid.getPerPage() > 0 && !grid.isEmpty()) {
if (grid.getPerPage() > 0) {
LayoutManager.addWidget(pagePrev);
LayoutManager.addWidget(pageNext);
LayoutManager.addWidget(pageLabel);
@@ -144,8 +144,7 @@ public class SearchField extends TextField implements ItemFilterProvider {
@Override
public int getTextColour() {
if (ItemPanels.itemPanel.getItems().isEmpty()
&& (!this.field.getText().isEmpty() || !NEIClientConfig.hideItemsUntilSearching())) {
if (ItemPanels.itemPanel.getItems().isEmpty()) {
return focused() ? 0xFFcc3300 : 0xFF993300;
} else {
return focused() ? 0xFFE0E0E0 : 0xFF909090;
@@ -316,11 +315,6 @@ public class SearchField extends TextField implements ItemFilterProvider {
@Override
public ItemFilter getFilter() {
if (field.getText().isEmpty() && NEIClientConfig.hideItemsUntilSearching()) {
return new NothingItemFilter();
}
return ((GuiSearchField) field).getFilter();
}
@@ -1,12 +1,12 @@
package codechicken.nei;
import java.util.List;
import java.util.StringJoiner;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import net.minecraft.util.EnumChatFormatting;
import codechicken.nei.FormattedTextField.TextFormatter;
import codechicken.nei.SearchTokenParser.SearchToken;
public class SearchTextFormatter implements TextFormatter {
@@ -17,50 +17,63 @@ public class SearchTextFormatter implements TextFormatter {
}
public String format(String text) {
final String[] parts = (text + "| ").split("\\|");
final String[] parts = text.split("\\|");
final Pattern splitPattern = searchParser.getSplitPattern();
StringJoiner formattedText = new StringJoiner(EnumChatFormatting.GRAY + "|");
for (int i = 0; i < parts.length - 1; i++) {
final String filterText = parts[i];
final List<SearchToken> tokens = searchParser.splitSearchText(filterText);
for (String filterText : parts) {
Matcher filterMatcher = splitPattern.matcher(filterText);
StringBuilder formattedPart = new StringBuilder();
int startIndex = 0;
for (SearchToken token : tokens) {
formattedPart.append(filterText.substring(startIndex, token.start));
EnumChatFormatting tokenColor = EnumChatFormatting.RESET;
while (filterMatcher.find()) {
boolean ignore = "-".equals(filterMatcher.group(2));
String firstChar = filterMatcher.group(3);
String token = filterMatcher.group(4);
boolean quotes = token.length() > 1 && token.startsWith("\"") && token.endsWith("\"");
if (token.firstChar != null) {
tokenColor = searchParser.getProvider(token.firstChar).getHighlightedColor();
if (quotes) {
token = token.substring(1, token.length() - 1);
}
if (token.ignore) {
formattedPart.append(filterText.substring(startIndex, filterMatcher.start()));
EnumChatFormatting tokenColor = EnumChatFormatting.RESET;
if (!firstChar.isEmpty()) {
tokenColor = searchParser.getProvider(firstChar.charAt(0)).getHighlightedColor();
}
if (ignore) {
formattedPart.append(EnumChatFormatting.BLUE + "-");
}
if (token.firstChar != null) {
formattedPart.append(tokenColor + String.valueOf(token.firstChar));
if (!firstChar.isEmpty()) {
formattedPart.append(tokenColor + firstChar);
}
if (token.quotes) {
if (quotes) {
formattedPart.append(EnumChatFormatting.GOLD + "\"");
}
if (!token.rawText.isEmpty()) {
formattedPart.append(tokenColor + token.rawText);
if (!token.isEmpty()) {
formattedPart.append(tokenColor + token);
}
if (token.quotes) {
if (quotes) {
formattedPart.append(EnumChatFormatting.GOLD + "\"");
}
startIndex = token.end;
startIndex = filterMatcher.end();
}
formattedPart.append(filterText.substring(startIndex, filterText.length()));
formattedText.add(formattedPart);
}
if (text.endsWith("|")) {
formattedText.add("");
}
return formattedText.toString();
}
}
@@ -2,7 +2,6 @@ package codechicken.nei;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.List;
@@ -22,6 +21,8 @@ import codechicken.nei.ItemList.EverythingItemFilter;
import codechicken.nei.ItemList.NegatedItemFilter;
import codechicken.nei.ItemList.NothingItemFilter;
import codechicken.nei.api.ItemFilter;
import gnu.trove.map.TCharCharMap;
import gnu.trove.map.hash.TCharCharHashMap;
public class SearchTokenParser {
@@ -40,20 +41,6 @@ public class SearchTokenParser {
}
}
public static class SearchToken {
public boolean ignore = false;
public boolean quotes = false;
public Character firstChar = null;
public String[] words;
public String rawText = "";
public int start = 0;
public int end = 0;
}
public static interface ISearchParserProvider {
public ItemFilter getFilter(String searchText);
@@ -112,7 +99,7 @@ public class SearchTokenParser {
protected final List<ISearchParserProvider> searchProviders;
protected final ProvidersCache providersCache = new ProvidersCache();
protected final Map<Character, Character> prefixRedefinitions = new HashMap<>();
protected final TCharCharMap prefixRedefinitions = new TCharCharHashMap();
public SearchTokenParser(List<ISearchParserProvider> searchProviders) {
this.searchProviders = searchProviders;
@@ -182,64 +169,7 @@ public class SearchTokenParser {
}
public List<SearchToken> splitSearchText(String filterText) {
if (filterText.isEmpty()) {
return Collections.emptyList();
}
final List<SearchToken> tokens = new ArrayList<>();
final String prefixes = getPrefixes();
final int spaceMode = NEIClientConfig.getIntSetting("inventory.search.spaceMode");
// The regular expression first tries to match a string that starts with a space or the beginning of the string,
// followed by a sequence of characters that do not contain special characters -"@#$%&, and ends with a space
// and the characters -"@#$%& or the end of the string.
final String patternPart1 = "(?<tokenA>(^|\\s+)(?:[^" + Pattern.quote(" -\"" + prefixes)
+ "]).+?(?=\\s+["
+ Pattern.quote("-\"" + prefixes)
+ "]|$))";
// If the first condition is not met, it tries to match a sequence of - characters, followed by @#$%&
// characters, then either a quoted string or non-space characters.
final String patternPart2 = "((?<ignore>-*)(?<firstChar>[" + Pattern.quote(prefixes)
+ "]*)(?<tokenB>\\\".*?(?:\\\"|$)|\\S+\\s*))";
final Pattern pattern = Pattern.compile(spaceMode == 0 ? patternPart2 : (patternPart1 + "|" + patternPart2));
final Matcher filterMatcher = pattern.matcher(filterText);
while (filterMatcher.find()) {
String firstChar = filterMatcher.group("firstChar");
SearchToken token = new SearchToken();
token.start = filterMatcher.start();
token.end = filterMatcher.end();
token.ignore = "-".equals(filterMatcher.group("ignore"));
token.rawText = spaceMode == 0 ? null : filterMatcher.group("tokenA");
if (firstChar != null && !firstChar.isEmpty()) {
token.firstChar = firstChar.charAt(0);
}
if (token.rawText == null) { // spaceMode == 0
token.rawText = filterMatcher.group("tokenB");
token.quotes = token.rawText.length() > 1 && token.rawText.startsWith("\"")
&& token.rawText.endsWith("\"");
if (token.quotes) {
token.rawText = token.rawText.substring(1, token.rawText.length() - 1);
}
token.words = new String[] { token.rawText.trim() };
} else if (spaceMode == 2) {
token.words = token.rawText.trim().split("\\s+");
} else {
token.words = new String[] { token.rawText.trim() };
}
tokens.add(token);
}
return tokens;
}
private String getPrefixes() {
public Pattern getSplitPattern() {
StringBuilder prefixes = new StringBuilder().append('\0');
for (ISearchParserProvider provider : getProviders()) {
@@ -248,11 +178,14 @@ public class SearchTokenParser {
}
}
return prefixes.toString();
return Pattern.compile("((-*)([" + Pattern.quote(prefixes.toString()) + "]*)(\\\".*?(?:\\\"|$)|\\S+))");
}
public char getRedefinedPrefix(char prefix) {
return this.prefixRedefinitions.getOrDefault(prefix, prefix);
if (this.prefixRedefinitions.containsKey(prefix)) {
return this.prefixRedefinitions.get(prefix);
}
return prefix;
}
private ItemFilter parseSearchText(String filterText) {
@@ -261,19 +194,28 @@ public class SearchTokenParser {
return null;
}
final Matcher filterMatcher = getSplitPattern().matcher(filterText);
final AllMultiItemFilter searchTokens = new AllMultiItemFilter();
final List<SearchToken> tokens = splitSearchText(filterText);
for (SearchToken token : tokens) {
if (!token.rawText.isEmpty()) {
ItemFilter result = parseToken(token);
while (filterMatcher.find()) {
boolean ignore = "-".equals(filterMatcher.group(2));
String firstChar = filterMatcher.group(3);
String token = filterMatcher.group(4);
boolean quotes = token.length() > 1 && token.startsWith("\"") && token.endsWith("\"");
if (token.ignore) {
if (quotes) {
token = token.substring(1, token.length() - 1);
}
if (!token.isEmpty()) {
ItemFilter result = parseToken(firstChar, token);
if (ignore) {
searchTokens.filters.add(new NegatedItemFilter(result));
} else {
searchTokens.filters.add(result);
}
} else if (!token.ignore) {
} else if (!ignore) {
searchTokens.filters.add(new NothingItemFilter());
}
}
@@ -281,17 +223,17 @@ public class SearchTokenParser {
return searchTokens;
}
private ItemFilter parseToken(SearchToken token) {
final ISearchParserProvider provider = token.firstChar == null ? null : this.getProvider(token.firstChar);
private ItemFilter parseToken(String firstChar, String token) {
final ISearchParserProvider provider = firstChar.isEmpty() ? null : this.getProvider(firstChar.charAt(0));
if (provider == null || provider.getSearchMode() == SearchMode.NEVER) {
final List<ItemFilter> filters = new ArrayList<>();
for (ISearchParserProvider _provider : getProviders()) {
if (_provider.getSearchMode() == SearchMode.ALWAYS) {
AllMultiItemFilter filter = generateFilters(_provider, token.words);
ItemFilter filter = _provider.getFilter(token);
if (!filter.filters.isEmpty()) {
if (filter != null) {
filters.add(filter);
}
}
@@ -299,21 +241,7 @@ public class SearchTokenParser {
return filters.isEmpty() ? new NothingItemFilter() : new AnyMultiItemFilter(filters);
} else {
return generateFilters(provider, token.words);
return provider.getFilter(token);
}
}
private AllMultiItemFilter generateFilters(ISearchParserProvider provider, String[] words) {
final AllMultiItemFilter filters = new AllMultiItemFilter();
for (String work : words) {
final ItemFilter filter = provider.getFilter(work);
if (filter != null) {
filters.filters.add(filter);
}
}
return filters;
}
}
File diff suppressed because it is too large. Load diff
@@ -11,6 +11,6 @@ public class WidgetZOrder implements Comparator<Widget> {
}
public int compare(Widget w1, Widget w2) {
return w1.z != w2.z ? ((topfirst ? w1.z < w2.z : w1.z > w2.z) ? 1 : -1) : 1;
return w1.z != w2.z ? ((topfirst ? w1.z > w2.z : w1.z < w2.z) ? 1 : -1) : 1;
}
}
@@ -43,6 +43,7 @@ import com.google.common.collect.ArrayListMultimap;
import codechicken.core.featurehack.GameDataManipulator;
import codechicken.nei.InfiniteStackSizeHandler;
import codechicken.nei.InfiniteToolHandler;
import codechicken.nei.ItemList;
import codechicken.nei.ItemList.AnyMultiItemFilter;
import codechicken.nei.ItemList.PatternItemFilter;
import codechicken.nei.ItemMobSpawner;
@@ -135,6 +136,7 @@ public class ItemInfo {
addIDDumps();
addSearchProviders();
PresetsList.load();
ItemList.loadCallbacks.add(TooltipFilter::populateSearchMap);
}
private static void addSearchProviders() {
@@ -75,25 +75,26 @@ public abstract class OptionButton extends Option {
}
public String getTooltip() {
String tip = null;
if (tooltip != null) {
String s = translateN(tooltip);
if (!s.equals(namespaced(tooltip))) {
return s;
tip = s;
}
}
if (getPrefix() != null) {
if (tip == null && getPrefix() != null) {
final int width = getStringWidth(getPrefix());
final Rectangle b = buttonSize();
if (width >= b.x) {
return translateN(name);
tip = translateN(name);
}
}
return null;
return tip;
}
public void drawPrefix() {
@@ -29,18 +29,6 @@ public class OptionCycled extends OptionButton {
return prefixed ? translateN(name) : null;
}
@Override
public String getTooltip() {
String tooltip = name + "." + value() + ".tip";
String s = translateN(tooltip);
if (!s.equals(namespaced(tooltip))) {
return s;
}
return super.getTooltip();
}
@Override
public boolean onClick(int button) {
return cycle();
@@ -1,15 +1,11 @@
package codechicken.nei.config;
import codechicken.lib.gui.GuiDraw;
public class OptionIntegerField extends OptionTextField {
public static final long UNSIGNED_INT_MAX = 0xFFFFFFFFL;
public final int min;
public final int max;
public final long min;
public final long max;
public OptionIntegerField(String name, long min, long max) {
public OptionIntegerField(String name, int min, int max) {
super(name);
this.min = min;
this.max = max;
@@ -19,23 +15,13 @@ public class OptionIntegerField extends OptionTextField {
this(name, Integer.MIN_VALUE, Integer.MAX_VALUE);
}
@Override
protected int getMaxInputWidth() {
if (renderTag().getValue().startsWith("0x")) {
return GuiDraw.getStringWidth("0x" + Long.toHexString(this.max).toUpperCase()) + 32;
}
return GuiDraw.getStringWidth(String.valueOf(this.max)) + 32;
}
@Override
public boolean isValidInput(String s) {
if (s.isEmpty()) return true;
if (s.length() == 0) return true;
try {
if (s.startsWith("0x")) {
Long.parseUnsignedLong(s.substring(2), 16);
Long.parseLong(s.substring(2), 16);
} else {
Integer.parseInt(s);
}
@@ -47,15 +33,15 @@ public class OptionIntegerField extends OptionTextField {
@Override
public boolean isValidValue(String s) {
if (s.isEmpty() || !isValidInput(s)) return false;
long i = 0;
if (s.length() == 0 || !isValidInput(s)) return false;
int i = 0;
if (s.startsWith("0x")) {
i = Long.parseUnsignedLong(s.substring(2), 16);
i = (int) Long.parseLong(s.substring(2), 16);
} else {
i = Integer.parseInt(s);
}
return i >= this.min && i <= this.max;
return i >= min && i <= max;
}
}
@@ -1,10 +1,13 @@
package codechicken.nei.config;
import static codechicken.lib.gui.GuiDraw.drawString;
import static codechicken.lib.gui.GuiDraw.getStringWidth;
import java.util.List;
import codechicken.lib.gui.GuiDraw;
import codechicken.lib.vec.Rectangle4i;
import codechicken.nei.TextField;
import codechicken.nei.config.GuiOptionList.OptionScrollSlot;
public class OptionTextField extends Option {
@@ -33,6 +36,11 @@ public class OptionTextField extends Option {
super(name);
}
@Override
public void onAdded(OptionScrollSlot slot) {
super.onAdded(slot);
}
@Override
public void update() {
textField.update();
@@ -43,16 +51,11 @@ public class OptionTextField extends Option {
return translateN(name);
}
protected int getMaxInputWidth() {
return slot.slotWidth();
}
@Override
public void draw(int mousex, int mousey, float frame) {
GuiDraw.drawString(getPrefix(), 10, 6, -1);
drawString(getPrefix(), 10, 6, -1);
textField.w = Math
.max(60, Math.min(getMaxInputWidth(), slot.slotWidth() - GuiDraw.getStringWidth(getPrefix())) - 16);
textField.w = slot.slotWidth() - getStringWidth(getPrefix()) - 16;
textField.x = slot.slotWidth() - textField.w;
textField.draw(mousex, mousey);
}
@@ -17,7 +17,6 @@ public class OptionToggleButton extends OptionButton {
return renderTag().getBooleanValue();
}
@Override
public String getButtonText() {
return translateN(name + (state() ? ".true" : ".false"));
}
@@ -16,7 +16,6 @@ import java.util.List;
import java.util.Map;
import java.util.StringJoiner;
import java.util.concurrent.CopyOnWriteArrayList;
import java.util.function.Consumer;
import java.util.regex.Pattern;
import javax.annotation.Nullable;
@@ -25,7 +24,6 @@ import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.FontRenderer;
import net.minecraft.client.gui.GuiScreen;
import net.minecraft.client.gui.inventory.GuiContainer;
import net.minecraft.client.renderer.RenderHelper;
import net.minecraft.client.renderer.Tessellator;
import net.minecraft.client.renderer.entity.RenderItem;
import net.minecraft.client.resources.IResourceManager;
@@ -40,17 +38,15 @@ import net.minecraftforge.fluids.FluidStack;
import org.lwjgl.input.Keyboard;
import org.lwjgl.input.Mouse;
import org.lwjgl.opengl.GL11;
import org.lwjgl.opengl.GL12;
import codechicken.lib.gui.GuiDraw;
import codechicken.nei.ItemList;
import codechicken.nei.ItemStackSet;
import codechicken.nei.NEIClientConfig;
import codechicken.nei.NEIClientUtils;
import codechicken.nei.NEIModContainer;
import codechicken.nei.SearchField;
import codechicken.nei.recipe.StackInfo;
import codechicken.nei.search.TooltipFilter;
import codechicken.nei.util.ReadableNumberConverter;
import codechicken.nei.util.RenderTooltipEventHelper;
public class GuiContainerManager {
@@ -59,7 +55,8 @@ public class GuiContainerManager {
@Override
public void onResourceManagerReload(IResourceManager p_110549_1_) {
renderingErrorItems.clear();
ItemList.loadItems.restart();
TooltipFilter.populateSearchMap();
SearchField.searchParser.clearCache();
}
}
@@ -420,9 +417,9 @@ public class GuiContainerManager {
public GuiContainerManager(GuiContainer screen) {
window = screen;
if (screen instanceof IContainerTooltipHandler tooltipHandler) {
if (screen instanceof IContainerTooltipHandler) {
instanceTooltipHandlers = Collections.synchronizedList(new LinkedList<>());
instanceTooltipHandlers.add(tooltipHandler);
instanceTooltipHandlers.add((IContainerTooltipHandler) screen);
instanceTooltipHandlers.addAll(tooltipHandlers);
} else instanceTooltipHandlers = tooltipHandlers;
}
@@ -555,8 +552,8 @@ public class GuiContainerManager {
tooltip = handler.handleTooltip(window, mousex, mousey, tooltip);
}
ItemStack stack = getStackMouseOver(window);
if (tooltip.isEmpty() && shouldShowTooltip(window)) { // mouseover tip, not holding an item
ItemStack stack = getStackMouseOver(window);
font = getFontRenderer(stack);
if (stack != null) {
tooltip = itemDisplayNameMultiline(stack, window, true);
@@ -603,32 +600,7 @@ public class GuiContainerManager {
}
}
if (NEIModContainer.isGTNHLibLoaded() && !tooltip.isEmpty()) {
if (RenderTooltipEventHelper.post(stack, this.window, mousex, mousey, font)) {
return;
}
Consumer<List<String>> alternativeRenderer = RenderTooltipEventHelper.getAlternativeRenderer();
if (alternativeRenderer == null) {
drawPagedTooltip(
RenderTooltipEventHelper.getFont(),
RenderTooltipEventHelper.getX() + 12,
RenderTooltipEventHelper.getY() - 12,
tooltip);
} else {
GL11.glDisable(GL12.GL_RESCALE_NORMAL);
RenderHelper.disableStandardItemLighting();
GL11.glDisable(GL11.GL_DEPTH_TEST);
GuiDraw.gui.incZLevel(300.0f);
alternativeRenderer.accept(tooltip);
GuiDraw.gui.incZLevel(-300.0f);
GL11.glEnable(GL11.GL_DEPTH_TEST);
RenderHelper.enableStandardItemLighting();
GL11.glEnable(GL12.GL_RESCALE_NORMAL);
}
RenderTooltipEventHelper.flush();
} else {
drawPagedTooltip(font, mousex + 12, mousey - 12, tooltip);
}
drawPagedTooltip(font, mousex + 12, mousey - 12, tooltip);
for (IContainerDrawHandler drawHandler : drawHandlers) {
drawHandler.postRenderTooltips(window, mousex, mousey, tooltip);
@@ -653,18 +625,6 @@ public class GuiContainerManager {
tooltips.size(),
NEIClientConfig.getKeyName("gui.next_tooltip")));
}
if (NEIModContainer.isGTNHLibLoaded()) {
drawMultilineTip(
font,
x,
y,
tooltips.get(tooltipPage),
RenderTooltipEventHelper.getBackgroundStart(),
RenderTooltipEventHelper.getBackgroundEnd(),
RenderTooltipEventHelper.getBorderStart(),
RenderTooltipEventHelper.getBorderEnd());
return;
}
drawMultilineTip(font, x, y, tooltips.get(tooltipPage));
}
@@ -753,7 +713,7 @@ public class GuiContainerManager {
if (Keyboard.getEventKeyState() || (k == 0 && Character.isDefined(c))) {
try {
keyTyped(c, k);
} catch (IndexOutOfBoundsException e) {
} catch (java.lang.IndexOutOfBoundsException e) {
System.err.println("Caught out of bounds exception pressing " + c + " " + k);
e.printStackTrace();
}
@@ -29,7 +29,6 @@ import org.lwjgl.opengl.GL11;
import codechicken.lib.gui.GuiDraw;
import codechicken.nei.Button;
import codechicken.nei.GuiNEIButton;
import codechicken.nei.ItemStackSet;
import codechicken.nei.ItemsTooltipLineHandler;
import codechicken.nei.LayoutManager;
import codechicken.nei.NEICPH;
@@ -136,13 +135,7 @@ public abstract class GuiRecipe<H extends IRecipeHandler> extends GuiContainer i
items = Arrays.asList(pStack.items);
}
items = new ItemStackSet().addAll(items).keys();
if (items.size() > 1) {
return new PermutationTooltipLineHandler(pStack, items);
}
return null;
return new PermutationTooltipLineHandler(pStack, items);
}
}
@@ -876,40 +869,41 @@ public abstract class GuiRecipe<H extends IRecipeHandler> extends GuiContainer i
public List<String> handleItemTooltip(GuiContainer gui, ItemStack itemstack, int mousex, int mousey,
List<String> currenttip) {
List<Integer> indices = getRecipeIndices();
try (CompatibilityHacks compatibilityHacks = new CompatibilityHacks()) {
List<Integer> indices = getRecipeIndices();
for (int recipeIndex : indices) {
currenttip = handler.original.handleItemTooltip(this, itemstack, currenttip, recipeIndex);
}
}
if (NEIClientConfig.showCycledIngredientsTooltip()) {
PositionedStack focused = null;
if (NEIClientConfig.showCycledIngredientsTooltip()) {
PositionedStack focused = null;
for (int refIndex = 0; refIndex < indices.size(); refIndex++) {
final int recipeIndex = indices.get(refIndex);
for (int refIndex = 0; refIndex < indices.size(); refIndex++) {
final int recipeIndex = indices.get(refIndex);
if (itemstack != null && focused == null) {
final List<PositionedStack> stacks = handler.original.getIngredientStacks(recipeIndex);
if (itemstack != null && focused == null) {
final List<PositionedStack> stacks = handler.original.getIngredientStacks(recipeIndex);
for (PositionedStack pStack : stacks) {
if (isMouseOver(pStack, refIndex)) {
focused = pStack;
break;
for (PositionedStack pStack : stacks) {
if (isMouseOver(pStack, refIndex)) {
focused = pStack;
break;
}
}
}
}
if (focused == null || focused.items.length <= 1) {
this.permutationTooltipLineHandler = null;
} else if (this.permutationTooltipLineHandler == null
|| this.permutationTooltipLineHandler.pStack != focused) {
this.permutationTooltipLineHandler = PermutationTooltipLineHandler.getInstance(focused);
}
} else if (this.permutationTooltipLineHandler != null) {
this.permutationTooltipLineHandler = null;
}
if (focused == null || focused.items.length <= 1) {
this.permutationTooltipLineHandler = null;
} else if (this.permutationTooltipLineHandler == null
|| this.permutationTooltipLineHandler.pStack != focused) {
this.permutationTooltipLineHandler = PermutationTooltipLineHandler.getInstance(focused);
}
} else if (this.permutationTooltipLineHandler != null) {
this.permutationTooltipLineHandler = null;
}
if (this.permutationTooltipLineHandler != null) {
@@ -10,7 +10,6 @@ import net.minecraft.nbt.NBTBase;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.nbt.NBTTagList;
import net.minecraftforge.fluids.FluidContainerRegistry;
import net.minecraftforge.fluids.FluidRegistry;
import net.minecraftforge.fluids.FluidStack;
import net.minecraftforge.fluids.IFluidContainerItem;
@@ -19,21 +18,19 @@ import codechicken.nei.ItemStackMap;
import codechicken.nei.api.IStackStringifyHandler;
import codechicken.nei.recipe.stackinfo.DefaultStackStringifyHandler;
import codechicken.nei.recipe.stackinfo.GTFluidStackStringifyHandler;
import codechicken.nei.util.ItemStackKey;
public class StackInfo {
private static final FluidStack NULL_FLUID = new FluidStack(FluidRegistry.WATER, 0);
public static final ArrayList<IStackStringifyHandler> stackStringifyHandlers = new ArrayList<>();
private static final HashMap<String, HashMap<String, String[]>> guidfilters = new HashMap<>();
private static final ItemStackMap<String> guidcache = new ItemStackMap<>();
private static final LinkedHashMap<ItemStackKey, FluidStack> fluidcache = new LinkedHashMap<>() {
private static final LinkedHashMap<ItemStack, FluidStack> fluidcache = new LinkedHashMap<>() {
private static final long serialVersionUID = 1042213947848622164L;
@Override
protected boolean removeEldestEntry(Map.Entry<ItemStackKey, FluidStack> eldest) {
return size() > 200;
protected boolean removeEldestEntry(Map.Entry<ItemStack, FluidStack> eldest) {
return size() > 20;
}
};
@@ -95,20 +92,19 @@ public class StackInfo {
return true;
}
public static synchronized FluidStack getFluid(ItemStack stack) {
ItemStackKey key = new ItemStackKey(stack);
FluidStack fluid = fluidcache.get(key);
public static FluidStack getFluid(ItemStack stack) {
FluidStack fluid = fluidcache.get(stack);
if (fluid == null) {
if (fluid == null && !fluidcache.containsKey(stack)) {
for (int i = stackStringifyHandlers.size() - 1; i >= 0 && fluid == null; i--) {
fluid = stackStringifyHandlers.get(i).getFluid(stack);
}
fluidcache.put(key, fluid == null ? NULL_FLUID : fluid);
fluidcache.put(stack, fluid);
}
return fluid == NULL_FLUID ? null : fluid;
return fluid;
}
public static boolean isFluidContainer(ItemStack stack) {
@@ -6,6 +6,7 @@ import java.util.regex.Pattern;
import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumChatFormatting;
import codechicken.nei.ItemList;
import codechicken.nei.ItemStackMap;
import codechicken.nei.NEIClientUtils;
import codechicken.nei.api.ItemFilter;
@@ -25,18 +26,14 @@ public class TooltipFilter implements ItemFilter {
return pattern.matcher(getSearchTooltip(itemStack)).find();
}
public static void clearCache() {
public static void populateSearchMap() {
itemSearchNames.clear();
new Thread(
() -> ItemList.items.parallelStream().forEach(TooltipFilter::getSearchTooltip),
"NEI populate Tooltip Filter").start();
}
public static void putItem(ItemStack stack) {
String tooltip = getTooltip(stack.copy());
synchronized (itemSearchNames) {
itemSearchNames.put(stack, tooltip);
}
}
public static String getSearchTooltip(ItemStack stack) {
protected static String getSearchTooltip(ItemStack stack) {
String tooltip = itemSearchNames.get(stack);
if (tooltip == null) {
@@ -1,33 +0,0 @@
package codechicken.nei.util;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
public class ItemStackKey {
public final ItemStack stack;
private int hashCode = 1;
public ItemStackKey(ItemStack stack) {
this.stack = stack;
if (this.stack != null) {
this.hashCode = 31 * this.hashCode + stack.stackSize;
this.hashCode = 31 * this.hashCode + Item.getIdFromItem(stack.getItem());
this.hashCode = 31 * this.hashCode + stack.getItemDamage();
this.hashCode = 31 * this.hashCode + (!stack.hasTagCompound() ? 0 : stack.getTagCompound().hashCode());
}
}
@Override
public int hashCode() {
return this.hashCode;
}
@Override
public boolean equals(Object o) {
if (o == this) return true;
if (!(o instanceof ItemStackKey)) return false;
return ItemStack.areItemStacksEqual(this.stack, ((ItemStackKey) o).stack);
}
}
@@ -1,78 +0,0 @@
package codechicken.nei.util;
import static com.gtnewhorizon.gtnhlib.client.event.RenderTooltipEvent.*;
import java.util.List;
import java.util.function.Consumer;
import net.minecraft.client.gui.FontRenderer;
import net.minecraft.client.gui.GuiScreen;
import net.minecraft.item.ItemStack;
import net.minecraftforge.common.MinecraftForge;
import com.gtnewhorizon.gtnhlib.client.event.RenderTooltipEvent;
public class RenderTooltipEventHelper {
private static RenderTooltipEvent event;
/**
* @return {@code true} if the event has been canceled
*/
public static boolean post(ItemStack stack, GuiScreen gui, int x, int y, FontRenderer font) {
event = new RenderTooltipEvent(
stack,
gui,
ORIGINAL_BG_START,
ORIGINAL_BG_END,
ORIGINAL_BORDER_START,
ORIGINAL_BORDER_END,
x,
y,
font);
if (stack != null) {
MinecraftForge.EVENT_BUS.post(event);
if (event.isCanceled()) {
flush();
return true;
}
}
return false;
}
public static void flush() {
event = null;
}
public static int getBackgroundStart() {
return event == null ? ORIGINAL_BG_START : event.backgroundStart;
}
public static int getBackgroundEnd() {
return event == null ? ORIGINAL_BG_END : event.backgroundEnd;
}
public static int getBorderStart() {
return event == null ? ORIGINAL_BORDER_START : event.borderStart;
}
public static int getBorderEnd() {
return event == null ? ORIGINAL_BORDER_END : event.borderEnd;
}
public static int getX() {
return event.x;
}
public static int getY() {
return event.y;
}
public static FontRenderer getFont() {
return event.font;
}
public static Consumer<List<String>> getAlternativeRenderer() {
return event.alternativeRenderer;
}
}
@@ -1421,79 +1421,3 @@ techguns.nei.TechgunsChemLabNEIRecipeHandler,Techguns:basicMachine:4,,Techguns,T
techguns.nei.TechgunsAmmoPressNEIRecipeHandler,Techguns:basicMachine:0,,Techguns,TRUE,,,,,,
techguns.nei.TechgunsMetalPressNEIRecipeHandler,Techguns:basicMachine:1,,Techguns,TRUE,,,,,,
techguns.nei.TechgunsChargingStationNEIRecipeHandler,Techguns:basicMachine:9,,Techguns,TRUE,,,,,,
ihl.nei_integration.EvaporatorRecipeHandler,ihl:evaporatorBlock,,ihl,TRUE,,,,,,,,,,,
ihl.nei_integration.ElectricEvaporatorRecipeHandler,ihl:electricEvaporatorBlock,,ihl,TRUE,,,,,,,,,,,
ihl.nei_integration.AchesonFurnaceRecipeHandler,ihl:achesonFurnance,,ihl,TRUE,,,,,,,,,,,
ihl.nei_integration.MuffleFurnaceRecipeHandler,ihl:muffleFurnance,,ihl,TRUE,,,,,,,,,,,
ihl.nei_integration.DetonationSprayingMachineRecipeHandler,ihl:cannonBronze,,ihl,TRUE,,,,,,,,,,,
ihl.nei_integration.ExtruderRecipeHandler,ihl:extruder,,ihl,TRUE,,,,,,,,,,,
ihl.nei_integration.ImpregnatingMachineRecipeHandler,ihl:tubBronze,,ihl,TRUE,,,,,,,,,,,
ihl.nei_integration.LeadOvenRecipeHandler,ihl:leadOven,,ihl,TRUE,,,,,,,,,,,
ihl.nei_integration.LoomRecipeHandler,ihl:loom,,ihl,TRUE,,,,,,,,,,,
ihl.nei_integration.GasWeldingStationGasRecipeHandler,ihl:gasWeldingStation,,ihl,TRUE,,,,,,,,,,,
ihl.nei_integration.WoodenRollingMachineRecipeHandler,ihl:woodenRollingMachinePart1,,ihl,TRUE,,,,,,,,,,,
ihl.nei_integration.CryogenicDistillerRecipeHandler,ihl:cryogenicDistiller,,ihl,TRUE,,,,,,,,,,,
ihl.nei_integration.ChemicalReactorRecipeHandler,ihl:chemicalReactor,,ihl,TRUE,,,,,,,,,,,
ihl.nei_integration.FluidizedBedReactorRecipeHandler,ihl:fluidizedBedReactor,,ihl,TRUE,,,,,,,,,,,
ihl.nei_integration.LabElectrolyzerRecipeHandler,ihl:labElectrolyzer,,ihl,TRUE,,,,,,,,,,,
ihl.nei_integration.RollingMachineRecipeHandler,ihl:rollingMachinePart1,,ihl,TRUE,,,,,,,,,,,
ihl.nei_integration.PaperMachineRecipeHandler,ihl:paperMachine,,ihl,TRUE,,,,,,,,,,,
ihl.nei_integration.ElectrolysisBathRecipeHandler,ihl:electrolysisBath,,ihl,TRUE,,,,,,,,,,,
ihl.nei_integration.WireMillRecipeHandler,ihl:wireMill,,ihl,TRUE,,,,,,,,,,,
ihl.nei_integration.InjectionMoldRecipeHandler,ihl:injectionMold,,ihl,TRUE,,,,,,,,,,,
ihl.nei_integration.VulcanizationExtrudingMoldRecipeHandler,ihl:vulcanizationExtrudingMold,,ihl,TRUE,,,,,,,,,,,
ihl.nei_integration.CrucibleRecipeHandler,ihl:crucible,,ihl,TRUE,,,,,,,,,,,
ihl.nei_integration.FractionationColumnRecipeHandler,ihl:fractionatorCover,,ihl,TRUE,,,,,,,,,,,
ihl.nei_integration.IronWorkbenchRecipeHandler,ihl:ironWorkbench,,ihl,TRUE,,,,,,,,,,,
com.cout970.magneticraft.compat.nei.CraftingCrusher,Magneticraft:crusher_control,,Magneticraft,TRUE,,,,,,,,,,,
com.cout970.magneticraft.compat.nei.CraftingGrinder,Magneticraft:grinder_control,,Magneticraft,TRUE,,,,,,,,,,,
com.cout970.magneticraft.compat.nei.CraftingPolymerizer,Magneticraft:polimerizer_control,,Magneticraft,TRUE,,,,,,,,,,,
com.cout970.magneticraft.compat.nei.CraftingBiomassBurner,Magneticraft:biomassburner,,Magneticraft,TRUE,,,,,,,,,,,
com.cout970.magneticraft.compat.nei.CraftingSifter,Magneticraft:sifter_control,,Magneticraft,TRUE,,,,,,,,,,,
pneumaticCraft.common.thirdparty.nei.NEIRefineryManager,PneumaticCraft:refinery,,PneumaticCraft,TRUE,,,,,,,,,,,
pneumaticCraft.common.thirdparty.nei.NEIPlasticMixerManager,PneumaticCraft:plasticMixer,,PneumaticCraft,TRUE,,,,,,,,,,,
pneumaticCraft.common.thirdparty.nei.NEIAmadronTradeManager,PneumaticCraft:amadronTablet,,PneumaticCraft,TRUE,,,,,,,,,,,
pneumaticCraft.common.thirdparty.nei.NEIUVLightBoxManager,PneumaticCraft:uvLightBox,,PneumaticCraft,TRUE,,,,,,,,,,,
pneumaticCraft.common.thirdparty.nei.NEIEtchingAcidManager,PneumaticCraft:etchingAcid,,PneumaticCraft,TRUE,,,,,,,,,,,
pneumaticCraft.common.thirdparty.nei.NEIThermopneumaticProcessingPlantManager,PneumaticCraft:thermopneumaticProcessingPlant,,PneumaticCraft,TRUE,,,,,,,,,,,
pneumaticCraft.common.thirdparty.nei.NEIAssemblyControllerRecipeManager,PneumaticCraft:assemblyController,,PneumaticCraft,TRUE,,,,,,,,,,,
pneumaticCraft.common.thirdparty.nei.NEIPressureChamberRecipeManager,PneumaticCraft:pressureChamberInterface,,PneumaticCraft,TRUE,,,,,,,,,,,
exter.foundry.integration.nei.InductionCrucibleFurnaceRecipeHandler,foundry:foundryMachine:0,,foundry,TRUE,,,,,,,,,,,
exter.foundry.integration.nei.AlloyMixerRecipeHandler,foundry:foundryMachine:2,,foundry,TRUE,,,,,,,,,,,
exter.foundry.integration.nei.MetalCasterRecipeHandler,foundry:foundryMachine:1,,foundry,TRUE,,,,,,,,,,,
exter.foundry.integration.nei.InfuserRecipeHandler,foundry:foundryMachine:3,,foundry,TRUE,,,,,,,,,,,
exter.foundry.integration.nei.InfuserSubstanceRecipeHandler,foundry:foundryMachine:3,,foundry,TRUE,,,,,,,,,,,
exter.foundry.integration.nei.AlloyFurnaceRecipeHandler,foundry:alloyFurnace,,foundry,TRUE,,,,,,,,,,,
exter.foundry.integration.nei.MetalAtomizerRecipeHandler,foundry:foundryMachine:5,,foundry,TRUE,,,,,,,,,,,
net.dries007.tfcnei.recipeHandlers.AnvilRecipeHandler,terrafirmacraft:Anvil,,terrafirmacraft,TRUE,,,,,,,,,,,
net.dries007.tfcnei.recipeHandlers.QuernRecipeHandler,terrafirmacraft:item.Quern,,terrafirmacraft,TRUE,,,,,,,,,,,
net.dries007.tfcnei.recipeHandlers.KilnRecipeHandler,,,terrafirmacraft,TRUE,,,,,,,,,,,
net.dries007.tfcnei.recipeHandlers.LoomRecipeHandler,terrafirmacraft:Loom,,terrafirmacraft,TRUE,,,,,,,,,,,
net.dries007.tfcnei.recipeHandlers.KnappingRecipeHandler,terrafirmacraft:item.LooseRock,,terrafirmacraft,TRUE,,,,,,,,,,,
net.dries007.tfcnei.recipeHandlers.BarrelRecipeHandler,terrafirmacraft:Barrel,,terrafirmacraft,TRUE,,,,,,,,,,,
net.dries007.tfcnei.recipeHandlers.AlloyRecipeHandler,terrafirmacraft:Crucible,,terrafirmacraft,TRUE,,,,,,,,,,,
net.dries007.tfcnei.recipeHandlers.HeatRecipeHandler,terrafirmacraft:Firepit,,terrafirmacraft,TRUE,,,,,,,,,,,
techreborn.compat.nei.FustionReacorRecipeHandler,techreborn:fusioncontrolcomputer,,techreborn,TRUE,,,,,,,,,,,
techreborn.compat.nei.recipes.VacuumFreezerRecipeHandler,techreborn:vacuumfreezer,,techreborn,TRUE,,,,,,,,,,,
techreborn.compat.nei.recipes.ImplosionCompressorRecipeHandler,techreborn:implosioncompressor,,techreborn,TRUE,,,,,,,,,,,
techreborn.compat.nei.recipes.AlloySmelterRecipeHandler,techreborn:alloySmelter,,techreborn,TRUE,,,,,,,,,,,
techreborn.compat.nei.recipes.IronAlloySmelterRecipeHandler,techreborn:alloyfurnace,,techreborn,TRUE,,,,,,,,,,,
techreborn.compat.nei.recipes.IndustrialSawmillRecipeHandler,techreborn:industrialSawmill,,techreborn,TRUE,,,,,,,,,,,
techreborn.compat.nei.recipes.ChemicalReactorRecipeHandler,techreborn:chemicalreactor,,techreborn,TRUE,,,,,,,,,,,
techreborn.compat.nei.recipes.CentrifugeRecipeHandler,techreborn:techreborn.centrifuge,,techreborn,TRUE,,,,,,,,,,,
techreborn.compat.nei.recipes.GrinderRecipeHandler,techreborn:grinder,,techreborn,TRUE,,,,,,,,,,,
techreborn.compat.nei.recipes.IndustrialElectrolyzerRecipeHandler,techreborn:industrialelectrolyzer,,techreborn,TRUE,,,,,,,,,,,
techreborn.compat.nei.recipes.BlastFurnaceRecipeHandler,techreborn:blastFurnace,,techreborn,TRUE,,,,,,,,,,,
techreborn.compat.nei.ShapedRollingMachineHandler,techreborn:rollingmachine,,techreborn,TRUE,,,,,,,,,,,
techreborn.compat.nei.ShapelessRollingMachineHandler,techreborn:rollingmachine,,techreborn,TRUE,,,,,,,,,,,
techreborn.compat.nei.recipes.AssemblingMachineRecipeHandler,techreborn:assemblymachine,,techreborn,TRUE,,,,,,,,,,,
com.fiskmods.lightsabers.nei.LightsaberForgeRecipeHandler,lightsabers:lightsaber_forge_light,,lightsabers,TRUE,,,,,,,,,,,
com.fiskmods.lightsabers.nei.DoubleLightsaberRecipeHandler,lightsabers:lightsaber_forge_dark,,lightsabers,TRUE,,,,,,,,,,,
com.fiskmods.lightsabers.nei.DisassemblyRecipeHandler,lightsabers:disassembly_station,,lightsabers,TRUE,,,,,,,,,,,
matteroverdrive.compat.modules.nei.CraftingHandlerInscriber,mo:inscriber,,mo,TRUE,,,,,,,,,,,
straywolfe.cookingwithtfc.client.nei.CookingPotRecipeHandler,cookingwithtfc:item.clayCookingPot:1,,cookingwithtfc,TRUE,,,,,,,,,,,
straywolfe.cookingwithtfc.client.nei.ClayOvenRecipeHandler,cookingwithtfc:item.clayOvenWall,,cookingwithtfc,TRUE,,,,,,,,,,,
factorization.nei.RecipeGrinder,factorization:diamond_cutting_head,,factorization,TRUE,,,,,,,,,,,
factorization.nei.RecipeMixer,factorization:FzBlock:18,,factorization,TRUE,,,,,,,,,,,
ua.pp.shurgent.tfctech.nei.WireDrawBenchRecipeHandler,tfctech:item.Wire Draw Bench,,tfctech,TRUE,,,,,,,,,,,
mekanism.client.nei.ElectrolyticSeparatorRecipeHandler,Mekanism:MachineBlock2:4,,Mekanism,TRUE,,,,,,,,,,,
1 handler itemName nbtInfo modId modRequired excludedModId priority minVersion maxVersion forceClassName itemNotes
1421 techguns.nei.TechgunsAmmoPressNEIRecipeHandler Techguns:basicMachine:0 Techguns TRUE
1422 techguns.nei.TechgunsMetalPressNEIRecipeHandler Techguns:basicMachine:1 Techguns TRUE
1423 techguns.nei.TechgunsChargingStationNEIRecipeHandler Techguns:basicMachine:9 Techguns TRUE
ihl.nei_integration.EvaporatorRecipeHandler ihl:evaporatorBlock ihl TRUE
ihl.nei_integration.ElectricEvaporatorRecipeHandler ihl:electricEvaporatorBlock ihl TRUE
ihl.nei_integration.AchesonFurnaceRecipeHandler ihl:achesonFurnance ihl TRUE
ihl.nei_integration.MuffleFurnaceRecipeHandler ihl:muffleFurnance ihl TRUE
ihl.nei_integration.DetonationSprayingMachineRecipeHandler ihl:cannonBronze ihl TRUE
ihl.nei_integration.ExtruderRecipeHandler ihl:extruder ihl TRUE
ihl.nei_integration.ImpregnatingMachineRecipeHandler ihl:tubBronze ihl TRUE
ihl.nei_integration.LeadOvenRecipeHandler ihl:leadOven ihl TRUE
ihl.nei_integration.LoomRecipeHandler ihl:loom ihl TRUE
ihl.nei_integration.GasWeldingStationGasRecipeHandler ihl:gasWeldingStation ihl TRUE
ihl.nei_integration.WoodenRollingMachineRecipeHandler ihl:woodenRollingMachinePart1 ihl TRUE
ihl.nei_integration.CryogenicDistillerRecipeHandler ihl:cryogenicDistiller ihl TRUE
ihl.nei_integration.ChemicalReactorRecipeHandler ihl:chemicalReactor ihl TRUE
ihl.nei_integration.FluidizedBedReactorRecipeHandler ihl:fluidizedBedReactor ihl TRUE
ihl.nei_integration.LabElectrolyzerRecipeHandler ihl:labElectrolyzer ihl TRUE
ihl.nei_integration.RollingMachineRecipeHandler ihl:rollingMachinePart1 ihl TRUE
ihl.nei_integration.PaperMachineRecipeHandler ihl:paperMachine ihl TRUE
ihl.nei_integration.ElectrolysisBathRecipeHandler ihl:electrolysisBath ihl TRUE
ihl.nei_integration.WireMillRecipeHandler ihl:wireMill ihl TRUE
ihl.nei_integration.InjectionMoldRecipeHandler ihl:injectionMold ihl TRUE
ihl.nei_integration.VulcanizationExtrudingMoldRecipeHandler ihl:vulcanizationExtrudingMold ihl TRUE
ihl.nei_integration.CrucibleRecipeHandler ihl:crucible ihl TRUE
ihl.nei_integration.FractionationColumnRecipeHandler ihl:fractionatorCover ihl TRUE
ihl.nei_integration.IronWorkbenchRecipeHandler ihl:ironWorkbench ihl TRUE
com.cout970.magneticraft.compat.nei.CraftingCrusher Magneticraft:crusher_control Magneticraft TRUE
com.cout970.magneticraft.compat.nei.CraftingGrinder Magneticraft:grinder_control Magneticraft TRUE
com.cout970.magneticraft.compat.nei.CraftingPolymerizer Magneticraft:polimerizer_control Magneticraft TRUE
com.cout970.magneticraft.compat.nei.CraftingBiomassBurner Magneticraft:biomassburner Magneticraft TRUE
com.cout970.magneticraft.compat.nei.CraftingSifter Magneticraft:sifter_control Magneticraft TRUE
pneumaticCraft.common.thirdparty.nei.NEIRefineryManager PneumaticCraft:refinery PneumaticCraft TRUE
pneumaticCraft.common.thirdparty.nei.NEIPlasticMixerManager PneumaticCraft:plasticMixer PneumaticCraft TRUE
pneumaticCraft.common.thirdparty.nei.NEIAmadronTradeManager PneumaticCraft:amadronTablet PneumaticCraft TRUE
pneumaticCraft.common.thirdparty.nei.NEIUVLightBoxManager PneumaticCraft:uvLightBox PneumaticCraft TRUE
pneumaticCraft.common.thirdparty.nei.NEIEtchingAcidManager PneumaticCraft:etchingAcid PneumaticCraft TRUE
pneumaticCraft.common.thirdparty.nei.NEIThermopneumaticProcessingPlantManager PneumaticCraft:thermopneumaticProcessingPlant PneumaticCraft TRUE
pneumaticCraft.common.thirdparty.nei.NEIAssemblyControllerRecipeManager PneumaticCraft:assemblyController PneumaticCraft TRUE
pneumaticCraft.common.thirdparty.nei.NEIPressureChamberRecipeManager PneumaticCraft:pressureChamberInterface PneumaticCraft TRUE
exter.foundry.integration.nei.InductionCrucibleFurnaceRecipeHandler foundry:foundryMachine:0 foundry TRUE
exter.foundry.integration.nei.AlloyMixerRecipeHandler foundry:foundryMachine:2 foundry TRUE
exter.foundry.integration.nei.MetalCasterRecipeHandler foundry:foundryMachine:1 foundry TRUE
exter.foundry.integration.nei.InfuserRecipeHandler foundry:foundryMachine:3 foundry TRUE
exter.foundry.integration.nei.InfuserSubstanceRecipeHandler foundry:foundryMachine:3 foundry TRUE
exter.foundry.integration.nei.AlloyFurnaceRecipeHandler foundry:alloyFurnace foundry TRUE
exter.foundry.integration.nei.MetalAtomizerRecipeHandler foundry:foundryMachine:5 foundry TRUE
net.dries007.tfcnei.recipeHandlers.AnvilRecipeHandler terrafirmacraft:Anvil terrafirmacraft TRUE
net.dries007.tfcnei.recipeHandlers.QuernRecipeHandler terrafirmacraft:item.Quern terrafirmacraft TRUE
net.dries007.tfcnei.recipeHandlers.KilnRecipeHandler terrafirmacraft TRUE
net.dries007.tfcnei.recipeHandlers.LoomRecipeHandler terrafirmacraft:Loom terrafirmacraft TRUE
net.dries007.tfcnei.recipeHandlers.KnappingRecipeHandler terrafirmacraft:item.LooseRock terrafirmacraft TRUE
net.dries007.tfcnei.recipeHandlers.BarrelRecipeHandler terrafirmacraft:Barrel terrafirmacraft TRUE
net.dries007.tfcnei.recipeHandlers.AlloyRecipeHandler terrafirmacraft:Crucible terrafirmacraft TRUE
net.dries007.tfcnei.recipeHandlers.HeatRecipeHandler terrafirmacraft:Firepit terrafirmacraft TRUE
techreborn.compat.nei.FustionReacorRecipeHandler techreborn:fusioncontrolcomputer techreborn TRUE
techreborn.compat.nei.recipes.VacuumFreezerRecipeHandler techreborn:vacuumfreezer techreborn TRUE
techreborn.compat.nei.recipes.ImplosionCompressorRecipeHandler techreborn:implosioncompressor techreborn TRUE
techreborn.compat.nei.recipes.AlloySmelterRecipeHandler techreborn:alloySmelter techreborn TRUE
techreborn.compat.nei.recipes.IronAlloySmelterRecipeHandler techreborn:alloyfurnace techreborn TRUE
techreborn.compat.nei.recipes.IndustrialSawmillRecipeHandler techreborn:industrialSawmill techreborn TRUE
techreborn.compat.nei.recipes.ChemicalReactorRecipeHandler techreborn:chemicalreactor techreborn TRUE
techreborn.compat.nei.recipes.CentrifugeRecipeHandler techreborn:techreborn.centrifuge techreborn TRUE
techreborn.compat.nei.recipes.GrinderRecipeHandler techreborn:grinder techreborn TRUE
techreborn.compat.nei.recipes.IndustrialElectrolyzerRecipeHandler techreborn:industrialelectrolyzer techreborn TRUE
techreborn.compat.nei.recipes.BlastFurnaceRecipeHandler techreborn:blastFurnace techreborn TRUE
techreborn.compat.nei.ShapedRollingMachineHandler techreborn:rollingmachine techreborn TRUE
techreborn.compat.nei.ShapelessRollingMachineHandler techreborn:rollingmachine techreborn TRUE
techreborn.compat.nei.recipes.AssemblingMachineRecipeHandler techreborn:assemblymachine techreborn TRUE
com.fiskmods.lightsabers.nei.LightsaberForgeRecipeHandler lightsabers:lightsaber_forge_light lightsabers TRUE
com.fiskmods.lightsabers.nei.DoubleLightsaberRecipeHandler lightsabers:lightsaber_forge_dark lightsabers TRUE
com.fiskmods.lightsabers.nei.DisassemblyRecipeHandler lightsabers:disassembly_station lightsabers TRUE
matteroverdrive.compat.modules.nei.CraftingHandlerInscriber mo:inscriber mo TRUE
straywolfe.cookingwithtfc.client.nei.CookingPotRecipeHandler cookingwithtfc:item.clayCookingPot:1 cookingwithtfc TRUE
straywolfe.cookingwithtfc.client.nei.ClayOvenRecipeHandler cookingwithtfc:item.clayOvenWall cookingwithtfc TRUE
factorization.nei.RecipeGrinder factorization:diamond_cutting_head factorization TRUE
factorization.nei.RecipeMixer factorization:FzBlock:18 factorization TRUE
ua.pp.shurgent.tfctech.nei.WireDrawBenchRecipeHandler tfctech:item.Wire Draw Bench tfctech TRUE
mekanism.client.nei.ElectrolyticSeparatorRecipeHandler Mekanism:MachineBlock2:4 Mekanism TRUE
@@ -579,78 +579,3 @@ techguns.nei.TechgunsChemLabNEIRecipeHandler,Techguns,Techguns:basicMachine:4,,T
techguns.nei.TechgunsAmmoPressNEIRecipeHandler,Techguns,Techguns:basicMachine:0,,Techguns,TRUE,,,75,,3,,,,,,
techguns.nei.TechgunsMetalPressNEIRecipeHandler,Techguns,Techguns:basicMachine:1,,Techguns,TRUE,,,75,,3,,,,,,
techguns.nei.TechgunsChargingStationNEIRecipeHandler,Techguns,Techguns:basicMachine:9,,Techguns,TRUE,,,65,,3,,,,,,
ihl.nei_integration.FluidizedBedReactorRecipeHandler,IHL Tools & Machines for IC2V2,ihl:fluidizedBedReactor,,ihl,TRUE,,,,,,,,,,,
ihl.nei_integration.EvaporatorRecipeHandler,IHL Tools & Machines for IC2V2,ihl:evaporatorBlock,,ihl,TRUE,,,,,,,,,,,
ihl.nei_integration.ElectricEvaporatorRecipeHandler,IHL Tools & Machines for IC2V2,ihl:electricEvaporatorBlock,,ihl,TRUE,,,,,,,,,,,
ihl.nei_integration.AchesonFurnaceRecipeHandler,IHL Tools & Machines for IC2V2,ihl:achesonFurnance,,ihl,TRUE,,,,,,,,,,,
ihl.nei_integration.MuffleFurnaceRecipeHandler,IHL Tools & Machines for IC2V2,ihl:muffleFurnance,,ihl,TRUE,,,,,,,,,,,
ihl.nei_integration.DetonationSprayingMachineRecipeHandler,IHL Tools & Machines for IC2V2,ihl:cannonBronze,,ihl,TRUE,,,,,,,,,,,
ihl.nei_integration.ExtruderRecipeHandler,IHL Tools & Machines for IC2V2,ihl:extruder,,ihl,TRUE,,,,,,,,,,,
ihl.nei_integration.ImpregnatingMachineRecipeHandler,IHL Tools & Machines for IC2V2,ihl:tubBronze,,ihl,TRUE,,,,,,,,,,,
ihl.nei_integration.LeadOvenRecipeHandler,IHL Tools & Machines for IC2V2,ihl:leadOven,,ihl,TRUE,,,,,,,,,,,
ihl.nei_integration.LoomRecipeHandler,IHL Tools & Machines for IC2V2,ihl:loom,,ihl,TRUE,,,,,,,,,,,
ihl.nei_integration.GasWeldingStationGasRecipeHandler,IHL Tools & Machines for IC2V2,ihl:gasWeldingStation,,ihl,TRUE,,,,,,,,,,,
ihl.nei_integration.WoodenRollingMachineRecipeHandler,IHL Tools & Machines for IC2V2,ihl:woodenRollingMachinePart1,,ihl,TRUE,,,,,,,,,,,
ihl.nei_integration.CryogenicDistillerRecipeHandler,IHL Tools & Machines for IC2V2,ihl:cryogenicDistiller,,ihl,TRUE,,,,,,,,,,,
ihl.nei_integration.ChemicalReactorRecipeHandler,IHL Tools & Machines for IC2V2,ihl:chemicalReactor,,ihl,TRUE,,,,,,,,,,,
ihl.nei_integration.LabElectrolyzerRecipeHandler,IHL Tools & Machines for IC2V2,ihl:labElectrolyzer,,ihl,TRUE,,,,,,,,,,,
ihl.nei_integration.RollingMachineRecipeHandler,IHL Tools & Machines for IC2V2,ihl:rollingMachinePart1,,ihl,TRUE,,,,,,,,,,,
ihl.nei_integration.PaperMachineRecipeHandler,IHL Tools & Machines for IC2V2,ihl:paperMachine,,ihl,TRUE,,,,,,,,,,,
ihl.nei_integration.ElectrolysisBathRecipeHandler,IHL Tools & Machines for IC2V2,ihl:electrolysisBath,,ihl,TRUE,,,,,,,,,,,
ihl.nei_integration.WireMillRecipeHandler,IHL Tools & Machines for IC2V2,ihl:wireMill,,ihl,TRUE,,,,,,,,,,,
ihl.nei_integration.InjectionMoldRecipeHandler,IHL Tools & Machines for IC2V2,ihl:injectionMold,,ihl,TRUE,,,,,,,,,,,
ihl.nei_integration.VulcanizationExtrudingMoldRecipeHandler,IHL Tools & Machines for IC2V2,ihl:vulcanizationExtrudingMold,,ihl,TRUE,,,,,,,,,,,
ihl.nei_integration.CrucibleRecipeHandler,IHL Tools & Machines for IC2V2,ihl:crucible,,ihl,TRUE,,,,,,,,,,,
ihl.nei_integration.FractionationColumnRecipeHandler,IHL Tools & Machines for IC2V2,ihl:fractionatorCover,,ihl,TRUE,,,,,,,,,,,
ihl.nei_integration.IronWorkbenchRecipeHandler,IHL Tools & Machines for IC2V2,ihl:ironWorkbench,,ihl,TRUE,,,,,,,,,,,
com.cout970.magneticraft.compat.nei.CraftingCrusher,Magneticraft,Magneticraft:crusher_control,,Magneticraft,TRUE,,,,,,,,,,,
com.cout970.magneticraft.compat.nei.CraftingGrinder,Magneticraft,Magneticraft:grinder_control,,Magneticraft,TRUE,,,,,,,,,,,
com.cout970.magneticraft.compat.nei.CraftingPolymerizer,Magneticraft,Magneticraft:polimerizer_control,,Magneticraft,TRUE,,,,,,,,,,,
com.cout970.magneticraft.compat.nei.CraftingBiomassBurner,Magneticraft,Magneticraft:biomassburner,,Magneticraft,TRUE,,,,,,,,,,,
com.cout970.magneticraft.compat.nei.CraftingSifter,Magneticraft,Magneticraft:sifter_control,,Magneticraft,TRUE,,,,,,,,,,,
pneumaticCraft.common.thirdparty.nei.NEIRefineryManager,PneumaticCraft,PneumaticCraft:refinery,,PneumaticCraft,TRUE,,"",80,,4,,,,,,
pneumaticCraft.common.thirdparty.nei.NEIPlasticMixerManager,PneumaticCraft,PneumaticCraft:plasticMixer,,PneumaticCraft,TRUE,,,,,,,,,,,
pneumaticCraft.common.thirdparty.nei.NEIAmadronTradeManager,PneumaticCraft,PneumaticCraft:amadronTablet,,PneumaticCraft,TRUE,,,,,,,,,,,
pneumaticCraft.common.thirdparty.nei.NEIUVLightBoxManager,PneumaticCraft,PneumaticCraft:uvLightBox,,PneumaticCraft,TRUE,,,,,,,,,,,
pneumaticCraft.common.thirdparty.nei.NEIEtchingAcidManager,PneumaticCraft,PneumaticCraft:etchingAcid,,PneumaticCraft,TRUE,,,,,,,,,,,
pneumaticCraft.common.thirdparty.nei.NEIThermopneumaticProcessingPlantManager,PneumaticCraft,PneumaticCraft:thermopneumaticProcessingPlant,,PneumaticCraft,TRUE,,,,,,,,,,,
pneumaticCraft.common.thirdparty.nei.NEIAssemblyControllerRecipeManager,PneumaticCraft,PneumaticCraft:assemblyController,,PneumaticCraft,TRUE,,,115,,2,,,,,,
pneumaticCraft.common.thirdparty.nei.NEIPressureChamberRecipeManager,PneumaticCraft,PneumaticCraft:pressureChamberInterface,,PneumaticCraft,TRUE,,,130,,2,,,,,,
exter.foundry.integration.nei.InductionCrucibleFurnaceRecipeHandler,Foundry,foundry:foundryMachine:0,,foundry,TRUE,,,,,,,,,,,
exter.foundry.integration.nei.AlloyMixerRecipeHandler,Foundry,foundry:foundryMachine:2,,foundry,TRUE,,,,,,,,,,,
exter.foundry.integration.nei.MetalCasterRecipeHandler,Foundry,foundry:foundryMachine:1,"",foundry,TRUE,,,,,,,,,,,
exter.foundry.integration.nei.InfuserRecipeHandler,Foundry,foundry:foundryMachine:3,,foundry,TRUE,,,,,,,,,,,
exter.foundry.integration.nei.InfuserSubstanceRecipeHandler,Foundry,foundry:foundryMachine:3,,foundry,TRUE,,,,,,,,,,,
exter.foundry.integration.nei.AlloyFurnaceRecipeHandler,Foundry,foundry:alloyFurnace,,foundry,TRUE,,,,,,,,,,,
exter.foundry.integration.nei.MetalAtomizerRecipeHandler,Foundry,foundry:foundryMachine:5,,foundry,TRUE,,,,,,,,,,,
net.dries007.tfcnei.recipeHandlers.AnvilRecipeHandler,TerraFirmaCraft,terrafirmacraft:Anvil,,terrafirmacraft,TRUE,,10,138,208,2,,,,,,
net.dries007.tfcnei.recipeHandlers.QuernRecipeHandler,TerraFirmaCraft,terrafirmacraft:item.Quern,,terrafirmacraft,TRUE,,,65,166,5,,,,,,
net.dries007.tfcnei.recipeHandlers.KilnRecipeHandler,TerraFirmaCraft,,,terrafirmacraft,TRUE,,,65,166,5,terrafirmacraftneiplugin:textures/gui/pitkiln.png,47,38,14,14,
net.dries007.tfcnei.recipeHandlers.LoomRecipeHandler,TerraFirmaCraft,terrafirmacraft:Loom,,terrafirmacraft,TRUE,,,65,166,5,,,,,,
net.dries007.tfcnei.recipeHandlers.KnappingRecipeHandler,TerraFirmaCraft,terrafirmacraft:item.LooseRock,,terrafirmacraft,TRUE,,,96,166,3,,,,,,
net.dries007.tfcnei.recipeHandlers.BarrelRecipeHandler,TerraFirmaCraft,terrafirmacraft:Barrel,,terrafirmacraft,TRUE,,,65,166,5,,,,,,
net.dries007.tfcnei.recipeHandlers.AlloyRecipeHandler,TerraFirmaCraft,terrafirmacraft:Crucible,,terrafirmacraft,TRUE,,,65,166,5,,,,,,
net.dries007.tfcnei.recipeHandlers.HeatRecipeHandler,TerraFirmaCraft,terrafirmacraft:Firepit,,terrafirmacraft,TRUE,,,65,166,5,"",,,,,
techreborn.compat.nei.FustionReacorRecipeHandler,TechReborn,techreborn:fusioncontrolcomputer,,techreborn,TRUE,,,,,,,,,,,
techreborn.compat.nei.recipes.VacuumFreezerRecipeHandler,TechReborn,techreborn:vacuumfreezer,,techreborn,TRUE,,,,,,,,,,,
techreborn.compat.nei.recipes.ImplosionCompressorRecipeHandler,TechReborn,techreborn:implosioncompressor,,techreborn,TRUE,,,,,,,,,,,
techreborn.compat.nei.recipes.AlloySmelterRecipeHandler,TechReborn,techreborn:alloySmelter,,techreborn,TRUE,,,,,,,,,,,
techreborn.compat.nei.recipes.IronAlloySmelterRecipeHandler,TechReborn,techreborn:alloyfurnace,,techreborn,TRUE,,,,,,,,,,,
techreborn.compat.nei.recipes.IndustrialSawmillRecipeHandler,TechReborn,techreborn:industrialSawmill,,techreborn,TRUE,,,,,,,,,,,
techreborn.compat.nei.recipes.ChemicalReactorRecipeHandler,TechReborn,techreborn:chemicalreactor,,techreborn,TRUE,,,,,,,,,,,
techreborn.compat.nei.recipes.CentrifugeRecipeHandler,TechReborn,techreborn:techreborn.centrifuge,,techreborn,TRUE,,,,,,,,,,,
techreborn.compat.nei.recipes.GrinderRecipeHandler,TechReborn,techreborn:grinder,,techreborn,TRUE,,,,,,,,,,,
techreborn.compat.nei.recipes.IndustrialElectrolyzerRecipeHandler,TechReborn,techreborn:industrialelectrolyzer,,techreborn,TRUE,,,,,,,,,,,
techreborn.compat.nei.recipes.BlastFurnaceRecipeHandler,TechReborn,techreborn:blastFurnace,,techreborn,TRUE,,,,,,,,,,,
techreborn.compat.nei.ShapedRollingMachineHandler,TechReborn,techreborn:rollingmachine,,techreborn,TRUE,,,,,,,,,,,
techreborn.compat.nei.ShapelessRollingMachineHandler,TechReborn,techreborn:rollingmachine,,techreborn,TRUE,,,,,,,,,,,
techreborn.compat.nei.recipes.AssemblingMachineRecipeHandler,TechReborn,techreborn:assemblymachine,,techreborn,TRUE,,,,,,,,,,,
com.fiskmods.lightsabers.nei.LightsaberForgeRecipeHandler,Advanced Lightsabers Mod,lightsabers:lightsaber_forge_light,,lightsabers,TRUE,,,,,,,,,,,
com.fiskmods.lightsabers.nei.DoubleLightsaberRecipeHandler,Advanced Lightsabers Mod,lightsabers:lightsaber_forge_dark,,lightsabers,TRUE,,,,,,,,,,,
com.fiskmods.lightsabers.nei.DisassemblyRecipeHandler,Advanced Lightsabers Mod,lightsabers:disassembly_station,,lightsabers,TRUE,,,,,,,,,,,
matteroverdrive.compat.modules.nei.CraftingHandlerInscriber,Matter Overdrive,mo:inscriber,,mo,TRUE,,,,,,,,,,,
straywolfe.cookingwithtfc.client.nei.CookingPotRecipeHandler,Cooking with TFC,cookingwithtfc:item.clayCookingPot:1,,cookingwithtfc,TRUE,,,,,,,,,,,
straywolfe.cookingwithtfc.client.nei.ClayOvenRecipeHandler,Cooking with TFC,cookingwithtfc:item.clayOvenWall,,cookingwithtfc,TRUE,,,,,,,,,,,
factorization.nei.RecipeMixer,Factorization,factorization:FzBlock:18,,factorization,TRUE,,,,,,,,,,,
ua.pp.shurgent.tfctech.nei.WireDrawBenchRecipeHandler,Shurgent's TFCTech Addon,tfctech:item.Wire Draw Bench,,tfctech,TRUE,,,,,,,,,,,
mekanism.client.nei.ElectrolyticSeparatorRecipeHandler,Mekanism,Mekanism:MachineBlock2:4,,Mekanism,TRUE,,,,,,,,,,,
1 handler modName itemName nbtInfo modId modRequired excludedModId yShift handlerHeight handlerWidth maxRecipesPerPage imageResource imageX imageY imageWidth imageHeight itemNotes
579 techguns.nei.TechgunsAmmoPressNEIRecipeHandler Techguns Techguns:basicMachine:0 Techguns TRUE 75 3
580 techguns.nei.TechgunsMetalPressNEIRecipeHandler Techguns Techguns:basicMachine:1 Techguns TRUE 75 3
581 techguns.nei.TechgunsChargingStationNEIRecipeHandler Techguns Techguns:basicMachine:9 Techguns TRUE 65 3
ihl.nei_integration.FluidizedBedReactorRecipeHandler IHL Tools & Machines for IC2V2 ihl:fluidizedBedReactor ihl TRUE
ihl.nei_integration.EvaporatorRecipeHandler IHL Tools & Machines for IC2V2 ihl:evaporatorBlock ihl TRUE
ihl.nei_integration.ElectricEvaporatorRecipeHandler IHL Tools & Machines for IC2V2 ihl:electricEvaporatorBlock ihl TRUE
ihl.nei_integration.AchesonFurnaceRecipeHandler IHL Tools & Machines for IC2V2 ihl:achesonFurnance ihl TRUE
ihl.nei_integration.MuffleFurnaceRecipeHandler IHL Tools & Machines for IC2V2 ihl:muffleFurnance ihl TRUE
ihl.nei_integration.DetonationSprayingMachineRecipeHandler IHL Tools & Machines for IC2V2 ihl:cannonBronze ihl TRUE
ihl.nei_integration.ExtruderRecipeHandler IHL Tools & Machines for IC2V2 ihl:extruder ihl TRUE
ihl.nei_integration.ImpregnatingMachineRecipeHandler IHL Tools & Machines for IC2V2 ihl:tubBronze ihl TRUE
ihl.nei_integration.LeadOvenRecipeHandler IHL Tools & Machines for IC2V2 ihl:leadOven ihl TRUE
ihl.nei_integration.LoomRecipeHandler IHL Tools & Machines for IC2V2 ihl:loom ihl TRUE
ihl.nei_integration.GasWeldingStationGasRecipeHandler IHL Tools & Machines for IC2V2 ihl:gasWeldingStation ihl TRUE
ihl.nei_integration.WoodenRollingMachineRecipeHandler IHL Tools & Machines for IC2V2 ihl:woodenRollingMachinePart1 ihl TRUE
ihl.nei_integration.CryogenicDistillerRecipeHandler IHL Tools & Machines for IC2V2 ihl:cryogenicDistiller ihl TRUE
ihl.nei_integration.ChemicalReactorRecipeHandler IHL Tools & Machines for IC2V2 ihl:chemicalReactor ihl TRUE
ihl.nei_integration.LabElectrolyzerRecipeHandler IHL Tools & Machines for IC2V2 ihl:labElectrolyzer ihl TRUE
ihl.nei_integration.RollingMachineRecipeHandler IHL Tools & Machines for IC2V2 ihl:rollingMachinePart1 ihl TRUE
ihl.nei_integration.PaperMachineRecipeHandler IHL Tools & Machines for IC2V2 ihl:paperMachine ihl TRUE
ihl.nei_integration.ElectrolysisBathRecipeHandler IHL Tools & Machines for IC2V2 ihl:electrolysisBath ihl TRUE
ihl.nei_integration.WireMillRecipeHandler IHL Tools & Machines for IC2V2 ihl:wireMill ihl TRUE
ihl.nei_integration.InjectionMoldRecipeHandler IHL Tools & Machines for IC2V2 ihl:injectionMold ihl TRUE
ihl.nei_integration.VulcanizationExtrudingMoldRecipeHandler IHL Tools & Machines for IC2V2 ihl:vulcanizationExtrudingMold ihl TRUE
ihl.nei_integration.CrucibleRecipeHandler IHL Tools & Machines for IC2V2 ihl:crucible ihl TRUE
ihl.nei_integration.FractionationColumnRecipeHandler IHL Tools & Machines for IC2V2 ihl:fractionatorCover ihl TRUE
ihl.nei_integration.IronWorkbenchRecipeHandler IHL Tools & Machines for IC2V2 ihl:ironWorkbench ihl TRUE
com.cout970.magneticraft.compat.nei.CraftingCrusher Magneticraft Magneticraft:crusher_control Magneticraft TRUE
com.cout970.magneticraft.compat.nei.CraftingGrinder Magneticraft Magneticraft:grinder_control Magneticraft TRUE
com.cout970.magneticraft.compat.nei.CraftingPolymerizer Magneticraft Magneticraft:polimerizer_control Magneticraft TRUE
com.cout970.magneticraft.compat.nei.CraftingBiomassBurner Magneticraft Magneticraft:biomassburner Magneticraft TRUE
com.cout970.magneticraft.compat.nei.CraftingSifter Magneticraft Magneticraft:sifter_control Magneticraft TRUE
pneumaticCraft.common.thirdparty.nei.NEIRefineryManager PneumaticCraft PneumaticCraft:refinery PneumaticCraft TRUE 80 4
pneumaticCraft.common.thirdparty.nei.NEIPlasticMixerManager PneumaticCraft PneumaticCraft:plasticMixer PneumaticCraft TRUE
pneumaticCraft.common.thirdparty.nei.NEIAmadronTradeManager PneumaticCraft PneumaticCraft:amadronTablet PneumaticCraft TRUE
pneumaticCraft.common.thirdparty.nei.NEIUVLightBoxManager PneumaticCraft PneumaticCraft:uvLightBox PneumaticCraft TRUE
pneumaticCraft.common.thirdparty.nei.NEIEtchingAcidManager PneumaticCraft PneumaticCraft:etchingAcid PneumaticCraft TRUE
pneumaticCraft.common.thirdparty.nei.NEIThermopneumaticProcessingPlantManager PneumaticCraft PneumaticCraft:thermopneumaticProcessingPlant PneumaticCraft TRUE
pneumaticCraft.common.thirdparty.nei.NEIAssemblyControllerRecipeManager PneumaticCraft PneumaticCraft:assemblyController PneumaticCraft TRUE 115 2
pneumaticCraft.common.thirdparty.nei.NEIPressureChamberRecipeManager PneumaticCraft PneumaticCraft:pressureChamberInterface PneumaticCraft TRUE 130 2
exter.foundry.integration.nei.InductionCrucibleFurnaceRecipeHandler Foundry foundry:foundryMachine:0 foundry TRUE
exter.foundry.integration.nei.AlloyMixerRecipeHandler Foundry foundry:foundryMachine:2 foundry TRUE
exter.foundry.integration.nei.MetalCasterRecipeHandler Foundry foundry:foundryMachine:1 foundry TRUE
exter.foundry.integration.nei.InfuserRecipeHandler Foundry foundry:foundryMachine:3 foundry TRUE
exter.foundry.integration.nei.InfuserSubstanceRecipeHandler Foundry foundry:foundryMachine:3 foundry TRUE
exter.foundry.integration.nei.AlloyFurnaceRecipeHandler Foundry foundry:alloyFurnace foundry TRUE
exter.foundry.integration.nei.MetalAtomizerRecipeHandler Foundry foundry:foundryMachine:5 foundry TRUE
net.dries007.tfcnei.recipeHandlers.AnvilRecipeHandler TerraFirmaCraft terrafirmacraft:Anvil terrafirmacraft TRUE 10 138 208 2
net.dries007.tfcnei.recipeHandlers.QuernRecipeHandler TerraFirmaCraft terrafirmacraft:item.Quern terrafirmacraft TRUE 65 166 5
net.dries007.tfcnei.recipeHandlers.KilnRecipeHandler TerraFirmaCraft terrafirmacraft TRUE 65 166 5 terrafirmacraftneiplugin:textures/gui/pitkiln.png 47 38 14 14
net.dries007.tfcnei.recipeHandlers.LoomRecipeHandler TerraFirmaCraft terrafirmacraft:Loom terrafirmacraft TRUE 65 166 5
net.dries007.tfcnei.recipeHandlers.KnappingRecipeHandler TerraFirmaCraft terrafirmacraft:item.LooseRock terrafirmacraft TRUE 96 166 3
net.dries007.tfcnei.recipeHandlers.BarrelRecipeHandler TerraFirmaCraft terrafirmacraft:Barrel terrafirmacraft TRUE 65 166 5
net.dries007.tfcnei.recipeHandlers.AlloyRecipeHandler TerraFirmaCraft terrafirmacraft:Crucible terrafirmacraft TRUE 65 166 5
net.dries007.tfcnei.recipeHandlers.HeatRecipeHandler TerraFirmaCraft terrafirmacraft:Firepit terrafirmacraft TRUE 65 166 5
techreborn.compat.nei.FustionReacorRecipeHandler TechReborn techreborn:fusioncontrolcomputer techreborn TRUE
techreborn.compat.nei.recipes.VacuumFreezerRecipeHandler TechReborn techreborn:vacuumfreezer techreborn TRUE
techreborn.compat.nei.recipes.ImplosionCompressorRecipeHandler TechReborn techreborn:implosioncompressor techreborn TRUE
techreborn.compat.nei.recipes.AlloySmelterRecipeHandler TechReborn techreborn:alloySmelter techreborn TRUE
techreborn.compat.nei.recipes.IronAlloySmelterRecipeHandler TechReborn techreborn:alloyfurnace techreborn TRUE
techreborn.compat.nei.recipes.IndustrialSawmillRecipeHandler TechReborn techreborn:industrialSawmill techreborn TRUE
techreborn.compat.nei.recipes.ChemicalReactorRecipeHandler TechReborn techreborn:chemicalreactor techreborn TRUE
techreborn.compat.nei.recipes.CentrifugeRecipeHandler TechReborn techreborn:techreborn.centrifuge techreborn TRUE
techreborn.compat.nei.recipes.GrinderRecipeHandler TechReborn techreborn:grinder techreborn TRUE
techreborn.compat.nei.recipes.IndustrialElectrolyzerRecipeHandler TechReborn techreborn:industrialelectrolyzer techreborn TRUE
techreborn.compat.nei.recipes.BlastFurnaceRecipeHandler TechReborn techreborn:blastFurnace techreborn TRUE
techreborn.compat.nei.ShapedRollingMachineHandler TechReborn techreborn:rollingmachine techreborn TRUE
techreborn.compat.nei.ShapelessRollingMachineHandler TechReborn techreborn:rollingmachine techreborn TRUE
techreborn.compat.nei.recipes.AssemblingMachineRecipeHandler TechReborn techreborn:assemblymachine techreborn TRUE
com.fiskmods.lightsabers.nei.LightsaberForgeRecipeHandler Advanced Lightsabers Mod lightsabers:lightsaber_forge_light lightsabers TRUE
com.fiskmods.lightsabers.nei.DoubleLightsaberRecipeHandler Advanced Lightsabers Mod lightsabers:lightsaber_forge_dark lightsabers TRUE
com.fiskmods.lightsabers.nei.DisassemblyRecipeHandler Advanced Lightsabers Mod lightsabers:disassembly_station lightsabers TRUE
matteroverdrive.compat.modules.nei.CraftingHandlerInscriber Matter Overdrive mo:inscriber mo TRUE
straywolfe.cookingwithtfc.client.nei.CookingPotRecipeHandler Cooking with TFC cookingwithtfc:item.clayCookingPot:1 cookingwithtfc TRUE
straywolfe.cookingwithtfc.client.nei.ClayOvenRecipeHandler Cooking with TFC cookingwithtfc:item.clayOvenWall cookingwithtfc TRUE
factorization.nei.RecipeMixer Factorization factorization:FzBlock:18 factorization TRUE
ua.pp.shurgent.tfctech.nei.WireDrawBenchRecipeHandler Shurgent's TFCTech Addon tfctech:item.Wire Draw Bench tfctech TRUE
mekanism.client.nei.ElectrolyticSeparatorRecipeHandler Mekanism Mekanism:MachineBlock2:4 Mekanism TRUE
+3 -38
View File
@@ -216,9 +216,6 @@ nei.options.inventory.search=Search Widget
nei.options.inventory.search.widgetPosition=Widget Position
nei.options.inventory.search.widgetPosition.true=Center
nei.options.inventory.search.widgetPosition.false=Right
nei.options.inventory.search.hideUntilSearching=Hide Until Searching
nei.options.inventory.search.hideUntilSearching.true=Yes
nei.options.inventory.search.hideUntilSearching.false=No
nei.options.inventory.search.widgetAutofocus=Autofocus
nei.options.inventory.search.widgetAutofocus.0=No
nei.options.inventory.search.widgetAutofocus.1=Yes
@@ -227,13 +224,6 @@ nei.options.inventory.search.patternMode=Search Mode
nei.options.inventory.search.patternMode.0=Plain
nei.options.inventory.search.patternMode.1=Extended
nei.options.inventory.search.patternMode.2=Regex
nei.options.inventory.search.spaceMode=Space Works like
nei.options.inventory.search.spaceMode.0=AND
nei.options.inventory.search.spaceMode.0.tip=Space between non-prefixed tokens works like "AND"
nei.options.inventory.search.spaceMode.1=Space
nei.options.inventory.search.spaceMode.1.tip=Space between non-prefixed tokens works like "space"
nei.options.inventory.search.spaceMode.2=AND-X
nei.options.inventory.search.spaceMode.2.tip=Space between non-prefixed tokens works like "AND" but all tokens must be within the same category
nei.options.inventory.search.quoteDropItemName=Quote Drop Item Name
nei.options.inventory.search.quoteDropItemName.true=Yes
nei.options.inventory.search.quoteDropItemName.false=No
@@ -307,10 +297,9 @@ nei.options.inventory.disableMouseScrollTransfer.false=False
nei.options.inventory.invertMouseScrollTransfer=Invert Mouse Wheel Transfer Direction
nei.options.inventory.invertMouseScrollTransfer.true=True
nei.options.inventory.invertMouseScrollTransfer.false=False
nei.options.inventory.gridRenderingCacheMode=Grid Rendering Cache Mode
nei.options.inventory.gridRenderingCacheMode.0=Off
nei.options.inventory.gridRenderingCacheMode.1=Low FPS
nei.options.inventory.gridRenderingCacheMode.2=Freeze
nei.options.inventory.cacheItemRendering=Cache Item Rendering
nei.options.inventory.cacheItemRendering.true=True
nei.options.inventory.cacheItemRendering.false=False
nei.options.inventory.collapsibleItems=Collapsible Items
nei.options.inventory.collapsibleItems.enabled=Collapsible Items
nei.options.inventory.collapsibleItems.enabled.true=Enabled
@@ -331,13 +320,6 @@ nei.options.inventory.history.useRows=Rows
nei.options.inventory.history.splittingMode=Splitting Mode
nei.options.inventory.history.splittingMode.0=Background
nei.options.inventory.history.splittingMode.1=Dotted Line
nei.options.inventory.subsets=Subsets Widget
nei.options.inventory.subsets.enabled=Subsets Visibility
nei.options.inventory.subsets.enabled.true=Enabled
nei.options.inventory.subsets.enabled.false=Disabled
nei.options.inventory.subsets.widgetPosition=Widget Position
nei.options.inventory.subsets.widgetPosition.true=Top
nei.options.inventory.subsets.widgetPosition.false=Bottom
nei.options.inventory.itemzoom=Item Zoom Panel
nei.options.inventory.itemzoom.enabled=Item Zoom Panel Visibility
nei.options.inventory.itemzoom.enabled.true=Enabled
@@ -460,23 +442,6 @@ nei.itemsort.default.tip=Leave the natural ordering of each item unchanged
nei.itemsort.damage=Item Damage
nei.itemsort.name=Display Name
nei.subsets.item.cheat=Give out an Item
nei.subsets.item.cheat.key=Ctrl + LMB
nei.subsets.item.search=Search by Item
nei.subsets.item.search.key=Shift + LMB
nei.subsets.item.show=Show Item
nei.subsets.item.show.key=LMB
nei.subsets.item.hide=Hide Item
nei.subsets.item.hide.key=RMB
nei.subsets.tag.search=Search by Subset
nei.subsets.tag.search.key=Shift + LMB
nei.subsets.tag.onlythis=Show only this Subset
nei.subsets.tag.onlythis.key=Double LMB
nei.subsets.tag.show=Show Subset
nei.subsets.tag.show.key=LMB
nei.subsets.tag.hide=Hide Subset
nei.subsets.tag.hide.key=RMB
nei.subsets.Blocks=Blocks
nei.subsets.Blocks.MobSpawners=Mob Spawners
nei.subsets.CreativeTabs=Creative Tabs
@@ -292,6 +292,9 @@ nei.options.inventory.disableMouseScrollTransfer.false=Нет
nei.options.inventory.invertMouseScrollTransfer=Инвертировать направление переноса колесиком мыши
nei.options.inventory.invertMouseScrollTransfer.true=Да
nei.options.inventory.invertMouseScrollTransfer.false=Нет
nei.options.inventory.cacheItemRendering=Кэширование рендеринга предметов
nei.options.inventory.cacheItemRendering.true=Да
nei.options.inventory.cacheItemRendering.false=Нет
nei.options.inventory.collapsibleItems=Группирование предметов
nei.options.inventory.collapsibleItems.enabled=Группирование предметов
nei.options.inventory.collapsibleItems.enabled.true=Включено
@@ -194,6 +194,9 @@ nei.options.inventory.disableMouseScrollTransfer.false=关闭
nei.options.inventory.invertMouseScrollTransfer=反转鼠标滚轮方向
nei.options.inventory.invertMouseScrollTransfer.true=开启
nei.options.inventory.invertMouseScrollTransfer.false=关闭
nei.options.inventory.cacheItemRendering=缓存物品渲染
nei.options.inventory.cacheItemRendering.true=开启
nei.options.inventory.cacheItemRendering.false=关闭
nei.options.command=指令
nei.options.command.creative=游戏模式