mirror of
https://github.com/GTNewHorizons/NotEnoughItems.git
synced 2026-11-16 02:04:59 +00:00
Compare commits
5
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bb89384493 | ||
|
|
e96e4dfdde | ||
|
|
0a6a6771d8 | ||
|
|
c96199a727 | ||
|
|
ab4ea2cfa1 |
No files matched your search
@@ -1,10 +1,13 @@
|
||||
package codechicken.nei;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.File;
|
||||
import java.io.FileReader;
|
||||
import java.io.FileWriter;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStreamReader;
|
||||
import java.net.URL;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashSet;
|
||||
import java.util.Iterator;
|
||||
@@ -22,9 +25,11 @@ import net.minecraft.client.gui.GuiErrorScreen;
|
||||
import net.minecraft.client.gui.GuiScreen;
|
||||
import net.minecraft.client.gui.GuiSelectWorld;
|
||||
import net.minecraft.client.multiplayer.WorldClient;
|
||||
import net.minecraft.client.resources.IResource;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
import net.minecraft.launchwrapper.Launch;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.client.event.GuiOpenEvent;
|
||||
import net.minecraftforge.client.event.RenderWorldLastEvent;
|
||||
@@ -165,11 +170,33 @@ public class ClientHandler {
|
||||
}, callback);
|
||||
}
|
||||
|
||||
public static void loadSettingsFile(String resource, BiConsumer<File, FileWriter> createDefault,
|
||||
public static boolean loadSettingsResource(String resource, Consumer<Stream<String>> callback) {
|
||||
final ResourceLocation location = new ResourceLocation("nei", resource);
|
||||
|
||||
try {
|
||||
final IResource res = Minecraft.getMinecraft().getResourceManager().getResource(location);
|
||||
|
||||
try (BufferedReader reader = new BufferedReader(
|
||||
new InputStreamReader(res.getInputStream(), StandardCharsets.UTF_8))) {
|
||||
NEIClientConfig.logger.info("Loading '{}' from jar {}", resource, location);
|
||||
callback.accept(
|
||||
IOUtils.readLines(reader).stream().map(String::trim)
|
||||
.filter(line -> !line.isEmpty() && !line.startsWith("#")));
|
||||
return true;
|
||||
}
|
||||
|
||||
} catch (Exception io) {
|
||||
NEIClientConfig.logger.error("Failed to load '{}' file {}", resource, location);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public static boolean loadSettingsFile(String resource, BiConsumer<File, FileWriter> createDefault,
|
||||
Consumer<Stream<String>> callback) {
|
||||
File file = new File(NEIClientConfig.configDir, resource);
|
||||
|
||||
if (!file.exists()) {
|
||||
if (!file.exists() && createDefault != null) {
|
||||
try (FileWriter writer = new FileWriter(file)) {
|
||||
NEIClientConfig.logger.info("Creating default '{}' {}", resource, file);
|
||||
createDefault.accept(file, writer);
|
||||
@@ -178,13 +205,19 @@ public class ClientHandler {
|
||||
}
|
||||
}
|
||||
|
||||
try (FileReader reader = new FileReader(file)) {
|
||||
NEIClientConfig.logger.info("Loading '{}' file {}", resource, file);
|
||||
callback.accept(
|
||||
IOUtils.readLines(reader).stream().filter(line -> !line.startsWith("#") && !line.trim().isEmpty()));
|
||||
} catch (IOException e) {
|
||||
NEIClientConfig.logger.error("Failed to load '{}' file {}", resource, file, e);
|
||||
if (file.exists()) {
|
||||
try (FileReader reader = new FileReader(file)) {
|
||||
NEIClientConfig.logger.info("Loading '{}' file {}", resource, file);
|
||||
callback.accept(
|
||||
IOUtils.readLines(reader).stream().map(String::trim)
|
||||
.filter(line -> !line.isEmpty() && !line.startsWith("#")));
|
||||
return true;
|
||||
} catch (IOException e) {
|
||||
NEIClientConfig.logger.error("Failed to load '{}' file {}", resource, file, e);
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public static void loadSerialHandlers() {
|
||||
|
||||
@@ -7,14 +7,27 @@ import net.minecraft.item.ItemStack;
|
||||
|
||||
import codechicken.nei.ItemsGrid.ItemsGridSlot;
|
||||
import codechicken.nei.ItemsGrid.MouseContext;
|
||||
import codechicken.nei.recipe.Recipe.RecipeId;
|
||||
import codechicken.nei.recipe.StackInfo;
|
||||
|
||||
public class ItemHistoryPanel extends AbstractSubpanel<ItemsGrid<ItemsGridSlot, MouseContext>> {
|
||||
public class ItemHistoryPanel extends AbstractSubpanel<ItemsGrid<ItemHistoryPanel.HistoryGridSlot, MouseContext>> {
|
||||
|
||||
public static class HistoryGridSlot extends ItemsGridSlot {
|
||||
|
||||
public HistoryGridSlot(int slotIndex, int itemIndex, ItemStack item) {
|
||||
super(slotIndex, itemIndex, item);
|
||||
}
|
||||
|
||||
@Override
|
||||
public RecipeId getRecipeId() {
|
||||
return FavoriteRecipes.getFavorite(this.item);
|
||||
}
|
||||
}
|
||||
|
||||
public ItemHistoryPanel() {
|
||||
this.grid = new ItemsGrid<>() {
|
||||
|
||||
protected List<ItemsGridSlot> gridMask;
|
||||
protected List<HistoryGridSlot> gridMask;
|
||||
|
||||
@Override
|
||||
protected void onGridChanged() {
|
||||
@@ -23,12 +36,12 @@ public class ItemHistoryPanel extends AbstractSubpanel<ItemsGrid<ItemsGridSlot,
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ItemsGridSlot> getMask() {
|
||||
public List<HistoryGridSlot> getMask() {
|
||||
|
||||
if (this.gridMask == null) {
|
||||
this.gridMask = new ArrayList<>();
|
||||
for (int slotIndex = 0; slotIndex < Math.min(size(), this.rows * this.columns); slotIndex++) {
|
||||
this.gridMask.add(new ItemsGridSlot(slotIndex, slotIndex, getItem(slotIndex)));
|
||||
this.gridMask.add(new HistoryGridSlot(slotIndex, slotIndex, getItem(slotIndex)));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -37,7 +50,7 @@ public class ItemHistoryPanel extends AbstractSubpanel<ItemsGrid<ItemsGridSlot,
|
||||
|
||||
@Override
|
||||
protected MouseContext getMouseContext(int mousex, int mousey) {
|
||||
final ItemsGridSlot hovered = getSlotMouseOver(mousex, mousey);
|
||||
final HistoryGridSlot hovered = getSlotMouseOver(mousex, mousey);
|
||||
|
||||
if (hovered != null) {
|
||||
return new MouseContext(
|
||||
|
||||
@@ -30,6 +30,7 @@ import codechicken.nei.api.ItemFilter.ItemFilterProvider;
|
||||
import codechicken.nei.api.ItemInfo;
|
||||
import codechicken.nei.recipe.InformationHandler;
|
||||
import codechicken.nei.search.TooltipFilter;
|
||||
import codechicken.nei.util.ItemUntranslator;
|
||||
|
||||
public class ItemList {
|
||||
|
||||
@@ -101,6 +102,12 @@ public class ItemList {
|
||||
return true;
|
||||
}
|
||||
|
||||
displayName = ItemUntranslator.getInstance().getItemStackDisplayName(item);
|
||||
|
||||
if (!displayName.isEmpty() && this.pattern.matcher(displayName).find()) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (item.hasDisplayName()) {
|
||||
displayName = EnumChatFormatting
|
||||
.getTextWithoutFormattingCodes(item.getItem().getItemStackDisplayName(item));
|
||||
|
||||
@@ -61,6 +61,7 @@ import codechicken.nei.recipe.IRecipeHandler;
|
||||
import codechicken.nei.recipe.InformationHandler;
|
||||
import codechicken.nei.recipe.RecipeCatalysts;
|
||||
import codechicken.nei.recipe.RecipeInfo;
|
||||
import codechicken.nei.util.ItemUntranslator;
|
||||
import codechicken.nei.util.NEIKeyboardUtils;
|
||||
import codechicken.obfuscator.ObfuscationRun;
|
||||
|
||||
@@ -424,6 +425,24 @@ public class NEIClientConfig {
|
||||
tag.getTag("inventory.autocrafting").setComment("Autocrafting").getBooleanValue(true);
|
||||
API.addOption(new OptionToggleButton("inventory.autocrafting", true));
|
||||
|
||||
tag.getTag("inventory.itemUntranslator").setComment("Item Untranslator").getBooleanValue(true);
|
||||
API.addOption(new OptionToggleButton("inventory.itemUntranslator", true) {
|
||||
|
||||
@Override
|
||||
public boolean onClick(int button) {
|
||||
super.onClick(button);
|
||||
|
||||
if (enableItemUntranslator()) {
|
||||
ItemUntranslator.getInstance().load();
|
||||
} else {
|
||||
ItemUntranslator.getInstance().unload();
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
tag.getTag("tools.handler_load_from_config").setComment("ADVANCED: Load handlers from config")
|
||||
.getBooleanValue(false);
|
||||
API.addOption(new OptionToggleButton("tools.handler_load_from_config", true) {
|
||||
@@ -1208,6 +1227,10 @@ public class NEIClientConfig {
|
||||
return getBooleanSetting("inventory.collapsibleItems.enabled");
|
||||
}
|
||||
|
||||
public static boolean enableItemUntranslator() {
|
||||
return getBooleanSetting("inventory.itemUntranslator");
|
||||
}
|
||||
|
||||
public static boolean getMagnetMode() {
|
||||
return enabledActions.contains("magnet");
|
||||
}
|
||||
|
||||
@@ -21,6 +21,7 @@ import codechicken.nei.api.INEIGuiHandler;
|
||||
import codechicken.nei.api.ItemInfo;
|
||||
import codechicken.nei.commands.CommandBookmarkAdd;
|
||||
import codechicken.nei.commands.CommandRecipeId;
|
||||
import codechicken.nei.commands.CommandUntranslator;
|
||||
import codechicken.nei.guihook.GuiContainerManager;
|
||||
import codechicken.nei.guihook.IContainerInputHandler;
|
||||
import codechicken.nei.guihook.IContainerSlotClickHandler;
|
||||
@@ -68,6 +69,7 @@ public class NEIController implements IContainerSlotClickHandler, IContainerInpu
|
||||
public static void registerClientCommands() {
|
||||
ClientCommandHandler.instance.registerCommand(new CommandBookmarkAdd());
|
||||
ClientCommandHandler.instance.registerCommand(new CommandRecipeId());
|
||||
ClientCommandHandler.instance.registerCommand(new CommandUntranslator());
|
||||
}
|
||||
|
||||
public static void updateUnlimitedItems(InventoryPlayer inventory) {
|
||||
|
||||
@@ -29,7 +29,7 @@ public class SearchTextFormatter implements TextFormatter {
|
||||
text = SearchTokenParser.SPACE_PATTERN.matcher(text).replaceAll("\\\\ ");
|
||||
}
|
||||
final SearchExpressionFormatVisitor visitor = new SearchExpressionFormatVisitor(searchParser);
|
||||
return SearchExpressionUtils.visitSearchExpression(text, visitor);
|
||||
return SearchExpressionUtils.visitRecipeSearchExpression(text, visitor);
|
||||
} else {
|
||||
final StringBuilder formattedText = new StringBuilder();
|
||||
|
||||
|
||||
@@ -122,10 +122,8 @@ public class SearchTokenParser {
|
||||
Language currentLanguage = Minecraft.getMinecraft().getLanguageManager().getCurrentLanguage();
|
||||
|
||||
if (!currentLanguage.getLanguageCode().equals(providersCache.languageCode)) {
|
||||
providersCache.providers = new ArrayList<>();
|
||||
providersCache.languageCode = currentLanguage.getLanguageCode();
|
||||
|
||||
Map<Character, ISearchParserProvider> providers = new HashMap<>();
|
||||
final List<ISearchParserProvider> providersList = new ArrayList<>();
|
||||
final Map<Character, ISearchParserProvider> providers = new HashMap<>();
|
||||
|
||||
for (int index = this.searchProviders.size() - 1; index >= 0; index--) {
|
||||
ISearchParserProvider provider = this.searchProviders.get(index);
|
||||
@@ -134,12 +132,14 @@ public class SearchTokenParser {
|
||||
if (provider.getSearchMode() == SearchMode.PREFIX && !providers.containsKey(provider.getPrefix())) {
|
||||
providers.put(provider.getPrefix(), provider);
|
||||
} else if (provider.getSearchMode() == SearchMode.ALWAYS) {
|
||||
providersCache.providers.add(provider);
|
||||
providersList.add(provider);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
providersCache.providers.addAll(providers.values());
|
||||
providersList.addAll(providers.values());
|
||||
providersCache.languageCode = currentLanguage.getLanguageCode();
|
||||
providersCache.providers = providersList;
|
||||
}
|
||||
|
||||
return providersCache.providers;
|
||||
@@ -238,9 +238,13 @@ public class SearchTokenParser {
|
||||
if (spaceMode == 1) {
|
||||
text = SearchTokenParser.SPACE_PATTERN.matcher(text).replaceAll("\\\\ ");
|
||||
}
|
||||
|
||||
return new IsRegisteredItemFilter(
|
||||
SearchExpressionUtils.visitSearchExpression(text, new ItemFilterVisitor(this)));
|
||||
if (skipRecipeTokens) {
|
||||
return new IsRegisteredItemFilter(
|
||||
SearchExpressionUtils.visitRecipeSearchExpression(text, new ItemFilterVisitor(this)));
|
||||
} else {
|
||||
return new IsRegisteredItemFilter(
|
||||
SearchExpressionUtils.visitSearchExpression(text, new ItemFilterVisitor(this)));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -320,7 +324,7 @@ public class SearchTokenParser {
|
||||
text = SearchTokenParser.SPACE_PATTERN.matcher(text).replaceAll("\\\\ ");
|
||||
}
|
||||
|
||||
return SearchExpressionUtils.visitSearchExpression(text, new RecipeFilterVisitor(this));
|
||||
return SearchExpressionUtils.visitRecipeSearchExpression(text, new RecipeFilterVisitor(this));
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -38,7 +38,11 @@ public class WorldOverlayRenderer implements IKeyStateTracker {
|
||||
public void tickKeyStates() {
|
||||
if (Minecraft.getMinecraft().currentScreen != null) return;
|
||||
|
||||
if (KeyManager.keyStates.get("world.moboverlay").down) mobOverlay = (mobOverlay + 1) % 2;
|
||||
if (KeyManager.keyStates.get("world.moboverlay").down) {
|
||||
mobOverlay = (mobOverlay + 1) % 2;
|
||||
NEIClientUtils
|
||||
.printChatMessage(new ChatComponentText(NEIClientUtils.translate("chat.moboverlay." + mobOverlay)));
|
||||
}
|
||||
if (KeyManager.keyStates.get("world.chunkoverlay").down) {
|
||||
chunkOverlay = (chunkOverlay + 1) % (NEIModContainer.isGT5Loaded() ? 4 : 3);
|
||||
// 0-2 (or 3 with gt)
|
||||
|
||||
@@ -65,6 +65,7 @@ import codechicken.nei.search.IdentifierFilter;
|
||||
import codechicken.nei.search.ModNameFilter;
|
||||
import codechicken.nei.search.OreDictionaryFilter;
|
||||
import codechicken.nei.search.TooltipFilter;
|
||||
import codechicken.nei.util.ItemUntranslator;
|
||||
import cpw.mods.fml.common.FMLCommonHandler;
|
||||
import cpw.mods.fml.common.ModContainer;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
@@ -137,6 +138,10 @@ public class ItemInfo {
|
||||
addSearchProviders();
|
||||
RecipeItemInputHandler.load();
|
||||
PresetsList.load();
|
||||
|
||||
if (NEIClientConfig.enableItemUntranslator()) {
|
||||
ItemUntranslator.getInstance().load();
|
||||
}
|
||||
}
|
||||
|
||||
private static void addSearchProviders() {
|
||||
|
||||
@@ -117,7 +117,7 @@ public class BookmarkGridGenerator {
|
||||
this.itemToSlot.put(collapsedItemIndex, absoluteSlotIndex);
|
||||
this.caclulatedItems.put(collapsedItemIndex, getItem(group, collapsedItemIndex));
|
||||
|
||||
if (!(shadows = getShadows(group, item.recipeId)).isEmpty()) {
|
||||
if (item.recipeId != null && !(shadows = getShadows(group, item.recipeId)).isEmpty()) {
|
||||
borderGrid.put(absoluteSlotIndex, "recipe:" + shadows.get(0));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,78 @@
|
||||
package codechicken.nei.commands;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
import net.minecraft.command.CommandBase;
|
||||
import net.minecraft.command.ICommandSender;
|
||||
import net.minecraft.util.ChatComponentTranslation;
|
||||
import net.minecraft.util.ChatStyle;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
|
||||
import codechicken.nei.ItemList;
|
||||
import codechicken.nei.NEIClientConfig;
|
||||
import codechicken.nei.util.ItemUntranslator;
|
||||
|
||||
public class CommandUntranslator extends CommandBase {
|
||||
|
||||
@Override
|
||||
public String getCommandName() {
|
||||
return "untranslator";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getCommandUsage(ICommandSender sender) {
|
||||
return "/untranslator dump OR /untranslator clear";
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getRequiredPermissionLevel() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void processCommand(ICommandSender sender, String[] args) {
|
||||
final String command = args.length == 0 ? null : args[0];
|
||||
|
||||
if ("dump".equals(command)) {
|
||||
if (ItemList.items.isEmpty()) {
|
||||
sendChatErrorMessage(sender, "nei.chat.untranslator.dump.error");
|
||||
return;
|
||||
} else {
|
||||
sendChatInfoMessage(sender, "nei.chat.untranslator.dump.start");
|
||||
ItemUntranslator.getInstance().generateUntranslatedNames();
|
||||
sendChatInfoMessage(sender, "nei.chat.untranslator.dump.finish");
|
||||
|
||||
if (NEIClientConfig.enableItemUntranslator()) {
|
||||
ItemUntranslator.getInstance().load();
|
||||
}
|
||||
}
|
||||
} else if ("clear".equals(command)) {
|
||||
final File file = new File(NEIClientConfig.configDir, "untranslator.cfg");
|
||||
|
||||
if (file.exists() && file.delete()) {
|
||||
sendChatInfoMessage(sender, "nei.chat.untranslator.clear");
|
||||
if (NEIClientConfig.enableItemUntranslator()) {
|
||||
ItemUntranslator.getInstance().load();
|
||||
}
|
||||
} else {
|
||||
sendChatErrorMessage(sender, "nei.chat.untranslator.clear.error");
|
||||
}
|
||||
} else {
|
||||
sendChatErrorMessage(sender, getCommandUsage(sender));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private static void sendChatInfoMessage(ICommandSender sender, String translationKey, Object... args) {
|
||||
sender.addChatMessage(
|
||||
new ChatComponentTranslation(translationKey, args)
|
||||
.setChatStyle(new ChatStyle().setColor(EnumChatFormatting.AQUA)));
|
||||
}
|
||||
|
||||
private static void sendChatErrorMessage(ICommandSender sender, String translationKey, Object... args) {
|
||||
sender.addChatMessage(
|
||||
new ChatComponentTranslation(translationKey, args)
|
||||
.setChatStyle(new ChatStyle().setColor(EnumChatFormatting.RED)));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -49,6 +49,7 @@ import codechicken.nei.NEIClientConfig;
|
||||
import codechicken.nei.NEIClientUtils;
|
||||
import codechicken.nei.NEIModContainer;
|
||||
import codechicken.nei.recipe.StackInfo;
|
||||
import codechicken.nei.util.ItemUntranslator;
|
||||
import codechicken.nei.util.ReadableNumberConverter;
|
||||
import codechicken.nei.util.RenderTooltipEventHelper;
|
||||
|
||||
@@ -60,6 +61,10 @@ public class GuiContainerManager {
|
||||
public void onResourceManagerReload(IResourceManager p_110549_1_) {
|
||||
renderingErrorItems.clear();
|
||||
ItemList.loadItems.restart();
|
||||
|
||||
if (NEIClientConfig.enableItemUntranslator()) {
|
||||
ItemUntranslator.getInstance().load();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -590,8 +595,6 @@ public class GuiContainerManager {
|
||||
}
|
||||
}
|
||||
|
||||
if (!tooltip.isEmpty()) tooltip.set(0, tooltip.get(0) + GuiDraw.TOOLTIP_LINESPACE); // add space after 'title'
|
||||
|
||||
if (showTooltip && NEIClientConfig.getBooleanSetting("inventory.showHotkeys")) {
|
||||
List<String> hotkeystips = collectHotkeyTips(mousex, mousey);
|
||||
|
||||
@@ -605,6 +608,19 @@ public class GuiContainerManager {
|
||||
}
|
||||
}
|
||||
|
||||
if (showTooltip && stack != null && !tooltip.isEmpty()) {
|
||||
final String secondDisplayName = ItemUntranslator.getInstance().getItemStackDisplayName(stack);
|
||||
|
||||
if (!secondDisplayName.isEmpty()) {
|
||||
tooltip.add(1, EnumChatFormatting.DARK_GRAY + secondDisplayName + GuiDraw.TOOLTIP_LINESPACE);
|
||||
} else {
|
||||
tooltip.set(0, tooltip.get(0) + GuiDraw.TOOLTIP_LINESPACE);
|
||||
}
|
||||
|
||||
} else if (!tooltip.isEmpty()) {
|
||||
tooltip.set(0, tooltip.get(0) + GuiDraw.TOOLTIP_LINESPACE);
|
||||
}
|
||||
|
||||
if (NEIModContainer.isGTNHLibLoaded() && !tooltip.isEmpty()) {
|
||||
if (RenderTooltipEventHelper.post(stack, this.window, mousex, mousey, font)) {
|
||||
return;
|
||||
|
||||
@@ -13,6 +13,7 @@ import net.minecraft.client.gui.GuiScreen;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
import codechicken.lib.gui.GuiDraw;
|
||||
import codechicken.nei.FavoriteRecipes;
|
||||
import codechicken.nei.ItemPanels;
|
||||
import codechicken.nei.ItemsGrid.ItemsGridSlot;
|
||||
import codechicken.nei.NEIClientConfig;
|
||||
@@ -123,10 +124,10 @@ public class GuiCraftingRecipe extends GuiRecipe<ICraftingHandler> {
|
||||
|
||||
final Point mouseover = GuiDraw.getMousePosition();
|
||||
final BookmarksGridSlot panelSlot = ItemPanels.bookmarkPanel.getSlotMouseOver(mouseover.x, mouseover.y);
|
||||
RecipeId recipeId = null;
|
||||
|
||||
if (panelSlot != null && !panelSlot.isIngredient()) {
|
||||
recipeId = panelSlot.getRecipeId();
|
||||
if (panelSlot != null) {
|
||||
return panelSlot.isIngredient() || panelSlot.getRecipeId() == null ? FavoriteRecipes.getFavorite(stackover)
|
||||
: panelSlot.getRecipeId();
|
||||
}
|
||||
|
||||
ItemsGridSlot itemSlot = ItemPanels.itemPanel.getSlotMouseOver(mouseover.x, mouseover.y);
|
||||
@@ -143,7 +144,7 @@ public class GuiCraftingRecipe extends GuiRecipe<ICraftingHandler> {
|
||||
return itemSlot.getRecipeId();
|
||||
}
|
||||
|
||||
return recipeId;
|
||||
return null;
|
||||
}
|
||||
|
||||
private GuiCraftingRecipe(ArrayList<ICraftingHandler> handlers, boolean limitToOneRecipe) {
|
||||
|
||||
@@ -14,4 +14,8 @@ public abstract class AbstractSearchExpressionVisitor<T> extends SearchExpressio
|
||||
return searchParser;
|
||||
}
|
||||
|
||||
public T fail() {
|
||||
return defaultResult();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -37,6 +37,20 @@ public class ItemFilterVisitor extends AbstractSearchExpressionVisitor<ItemFilte
|
||||
}
|
||||
}
|
||||
|
||||
// Should only be called for collecting ingredients permutations
|
||||
@Override
|
||||
public ItemFilter visitRecipeSearchExpression(SearchExpressionParser.RecipeSearchExpressionContext ctx) {
|
||||
if (ctx.recipeClauseExpression() != null) {
|
||||
final List<ItemFilter> anyFilters = new ArrayList<>();
|
||||
final List<ItemFilter> allFilters = new ArrayList<>();
|
||||
for (SearchExpressionParser.RecipeClauseExpressionContext clauseCtx : ctx.recipeClauseExpression()) {
|
||||
addIngredientPermutationItemFilter(clauseCtx.searchExpression(), anyFilters, allFilters);
|
||||
}
|
||||
return constructFilter(anyFilters, allFilters);
|
||||
}
|
||||
return defaultResult();
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemFilter visitOrExpression(SearchExpressionParser.OrExpressionContext ctx) {
|
||||
return visitChildren(ctx, AnyMultiItemFilter::new);
|
||||
@@ -79,6 +93,31 @@ public class ItemFilterVisitor extends AbstractSearchExpressionVisitor<ItemFilte
|
||||
return new NothingItemFilter();
|
||||
}
|
||||
|
||||
private void addIngredientPermutationItemFilter(SearchExpressionParser.SearchExpressionContext ctx,
|
||||
List<ItemFilter> anyFilters, List<ItemFilter> allFilters) {
|
||||
// Only for ingredients or default
|
||||
if (ctx.type == 0 || ctx.type == 3) {
|
||||
if (ctx.allRecipe) {
|
||||
allFilters.add(visit(ctx));
|
||||
} else {
|
||||
anyFilters.add(visit(ctx));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private ItemFilter constructFilter(List<ItemFilter> anyFilters, List<ItemFilter> allFilters) {
|
||||
if (anyFilters.isEmpty()) {
|
||||
return constructFilter(allFilters, AllMultiItemFilter::new);
|
||||
}
|
||||
if (allFilters.isEmpty()) {
|
||||
return constructFilter(anyFilters, AnyMultiItemFilter::new);
|
||||
}
|
||||
final List<ItemFilter> filters = new ArrayList<>();
|
||||
filters.add(constructFilter(allFilters, AllMultiItemFilter::new));
|
||||
filters.add(constructFilter(anyFilters, AnyMultiItemFilter::new));
|
||||
return constructFilter(filters, AllMultiItemFilter::new);
|
||||
}
|
||||
|
||||
private String getTokenCleanText(SearchExpressionParser.TokenContext ctx) {
|
||||
String cleanText = null;
|
||||
if (ctx.PLAIN_TEXT() != null) {
|
||||
|
||||
@@ -52,6 +52,17 @@ public class SearchExpressionUtils {
|
||||
}
|
||||
|
||||
public static <T> T visitSearchExpression(String text, AbstractSearchExpressionVisitor<T> visitor) {
|
||||
SearchExpressionParser parser = createSearchExpressionParser(text, visitor.getSearchParser(), visitor);
|
||||
SearchExpressionParser.RecipeSearchExpressionContext recipeCtx = parser.recipeSearchExpression();
|
||||
// Manually check whether it's not a recipe expression, because parser would parse it either way
|
||||
if (recipeCtx.recipeClauseExpression() != null && recipeCtx.recipeClauseExpression().size() == 1
|
||||
&& recipeCtx.recipeClauseExpression(0).searchExpression().type == 3) {
|
||||
return visitor.visitSearchExpression(recipeCtx.recipeClauseExpression(0).searchExpression());
|
||||
}
|
||||
return visitor.fail();
|
||||
}
|
||||
|
||||
public static <T> T visitRecipeSearchExpression(String text, AbstractSearchExpressionVisitor<T> visitor) {
|
||||
SearchExpressionParser parser = createSearchExpressionParser(text, visitor.getSearchParser(), visitor);
|
||||
return visitor.visitRecipeSearchExpression(parser.recipeSearchExpression());
|
||||
}
|
||||
|
||||
@@ -0,0 +1,396 @@
|
||||
package codechicken.nei.util;
|
||||
|
||||
import java.io.BufferedWriter;
|
||||
import java.io.File;
|
||||
import java.lang.reflect.Field;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.nio.file.Files;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Properties;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import net.minecraft.util.StringTranslate;
|
||||
import net.minecraftforge.fluids.Fluid;
|
||||
import net.minecraftforge.fluids.FluidContainerRegistry;
|
||||
import net.minecraftforge.fluids.FluidContainerRegistry.FluidContainerData;
|
||||
import net.minecraftforge.fluids.FluidRegistry;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
|
||||
import codechicken.nei.ClientHandler;
|
||||
import codechicken.nei.ItemList;
|
||||
import codechicken.nei.NEIClientConfig;
|
||||
import codechicken.nei.SubsetWidget;
|
||||
import codechicken.nei.api.API;
|
||||
import codechicken.nei.recipe.StackInfo;
|
||||
import cpw.mods.fml.common.FMLCommonHandler;
|
||||
import cpw.mods.fml.common.registry.LanguageRegistry;
|
||||
import cpw.mods.fml.relauncher.ReflectionHelper;
|
||||
|
||||
public class ItemUntranslator {
|
||||
|
||||
private class LanguageRegistryPatch implements AutoCloseable {
|
||||
// RAII-style helper that temporarily swaps language data in
|
||||
// LanguageRegistry / StringTranslate using reflection. This allows
|
||||
// reading translation entries for a different language (eg. en_US)
|
||||
// even when the game is using another language at runtime.
|
||||
|
||||
private String secondLanguage = "en_US";
|
||||
private String language;
|
||||
|
||||
private static Map<String, Properties> modLanguageDataSymlink;
|
||||
private Properties languageDataCache;
|
||||
|
||||
private static Map<String, String> secondLanguageListCache;
|
||||
private static Map<String, String> languageListCache;
|
||||
|
||||
private static Field languageListField;
|
||||
private static Field fieldStringTranslateInstance;
|
||||
|
||||
static {
|
||||
try {
|
||||
final Field modLanguageDataField = ReflectionHelper
|
||||
.findField(LanguageRegistry.class, "modLanguageData");
|
||||
|
||||
languageListField = ReflectionHelper.findField(StringTranslate.class, "languageList", "field_74816_c");
|
||||
fieldStringTranslateInstance = ReflectionHelper
|
||||
.findField(StringTranslate.class, "instance", "field_74817_a");
|
||||
|
||||
modLanguageDataSymlink = (Map<String, Properties>) modLanguageDataField
|
||||
.get(LanguageRegistry.instance());
|
||||
languageListCache = (Map<String, String>) languageListField.get(fieldStringTranslateInstance.get(null));
|
||||
} catch (Throwable e) {
|
||||
languageListField = null;
|
||||
fieldStringTranslateInstance = null;
|
||||
}
|
||||
}
|
||||
|
||||
private LanguageRegistryPatch(String secondLanguage) {
|
||||
this.language = FMLCommonHandler.instance().getCurrentLanguage();
|
||||
this.secondLanguage = secondLanguage;
|
||||
patchLanguageRegistry();
|
||||
patchStringTranslate();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void close() {
|
||||
restoreStringTranslate();
|
||||
restoreLanguageRegistry();
|
||||
}
|
||||
|
||||
private void patchLanguageRegistry() {
|
||||
this.languageDataCache = modLanguageDataSymlink.get(this.language);
|
||||
modLanguageDataSymlink.put(this.language, modLanguageDataSymlink.get(this.secondLanguage));
|
||||
}
|
||||
|
||||
private void patchStringTranslate() {
|
||||
|
||||
if (languageListField != null) {
|
||||
|
||||
if (secondLanguageListCache == null) {
|
||||
secondLanguageListCache = new HashMap<>(languageListCache);
|
||||
modLanguageDataSymlink.get(secondLanguage)
|
||||
.forEach((k, v) -> secondLanguageListCache.put((String) k, (String) v));
|
||||
}
|
||||
|
||||
try {
|
||||
languageListField.set(fieldStringTranslateInstance.get(null), secondLanguageListCache);
|
||||
} catch (IllegalAccessException e) {
|
||||
throw new RuntimeException("Failed to access StringTranslate language list", e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void restoreLanguageRegistry() {
|
||||
final String language = FMLCommonHandler.instance().getCurrentLanguage();
|
||||
modLanguageDataSymlink.put(language, languageDataCache);
|
||||
languageDataCache = null;
|
||||
}
|
||||
|
||||
private void restoreStringTranslate() {
|
||||
if (languageListField != null && languageListCache != null) {
|
||||
try {
|
||||
languageListField.set(fieldStringTranslateInstance.get(null), languageListCache);
|
||||
} catch (IllegalAccessException e) {
|
||||
throw new RuntimeException("Failed to restore StringTranslate language list", e);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static final String CONFIG_FILE = "untranslator.cfg";
|
||||
private static final ItemUntranslator instance = new ItemUntranslator();
|
||||
|
||||
private final Map<String, String> secondNames = new HashMap<>();
|
||||
private final Map<String, String> processedNames = new HashMap<>();
|
||||
|
||||
static {
|
||||
API.addSubset("Untranslated", item -> instance.getItemStackDisplayName(item).isEmpty());
|
||||
}
|
||||
|
||||
private ItemUntranslator() {}
|
||||
|
||||
public static ItemUntranslator getInstance() {
|
||||
return instance;
|
||||
}
|
||||
|
||||
public void generateUntranslatedNames() {
|
||||
final Map<String, String> items = new HashMap<>();
|
||||
|
||||
items.put("language", FMLCommonHandler.instance().getCurrentLanguage());
|
||||
|
||||
for (Fluid fluid : FluidRegistry.getRegisteredFluids().values()) {
|
||||
items.put(
|
||||
fluid.getUnlocalizedName().toLowerCase(),
|
||||
stripFormatting(StatCollector.translateToLocal(fluid.getUnlocalizedName())));
|
||||
}
|
||||
|
||||
for (CreativeTabs tab : CreativeTabs.creativeTabArray) {
|
||||
final List<ItemStack> tabItems = new ArrayList<>();
|
||||
|
||||
tab.displayAllReleventItems(tabItems);
|
||||
|
||||
for (ItemStack stack : tabItems) {
|
||||
collectDisplayNameForStack(stack, items);
|
||||
}
|
||||
}
|
||||
|
||||
for (ItemStack stack : ItemList.items) {
|
||||
collectDisplayNameForStack(stack, items);
|
||||
}
|
||||
|
||||
for (FluidContainerData data : FluidContainerRegistry.getRegisteredFluidContainerData()) {
|
||||
if (data.filledContainer != null) {
|
||||
collectDisplayNameForStack(data.filledContainer, items);
|
||||
}
|
||||
}
|
||||
|
||||
for (Map.Entry<String, String> entry : LanguageRegistryPatch.languageListCache.entrySet()) {
|
||||
final String key = entry.getKey().toLowerCase();
|
||||
if (key.endsWith(".name") && !items.containsKey(key) && !entry.getValue().contains("%")) {
|
||||
items.put(key, entry.getValue());
|
||||
}
|
||||
}
|
||||
|
||||
saveMappings(items);
|
||||
}
|
||||
|
||||
private void collectDisplayNameForStack(ItemStack stack, Map<String, String> items) {
|
||||
final String displayName = stripFormatting(stack.getDisplayName());
|
||||
final String guidKey = determineGUIDForGeneration(stack, displayName, items);
|
||||
|
||||
if (!items.containsKey(guidKey)) {
|
||||
items.put(guidKey, displayName);
|
||||
}
|
||||
}
|
||||
|
||||
private String determineGUIDForGeneration(ItemStack stack, String displayName, Map<String, String> items) {
|
||||
final String unlocalizedName = stack.getUnlocalizedName().toLowerCase();
|
||||
|
||||
if (displayName.equals(stripFormatting(StatCollector.translateToLocal(unlocalizedName)))) {
|
||||
return unlocalizedName;
|
||||
}
|
||||
|
||||
if (!unlocalizedName.endsWith(".name")
|
||||
&& displayName.equals(stripFormatting(StatCollector.translateToLocal(unlocalizedName + ".name")))) {
|
||||
return unlocalizedName + ".name";
|
||||
}
|
||||
|
||||
final FluidStack fluid = StackInfo.getFluid(stack);
|
||||
|
||||
if (fluid != null) {
|
||||
final String fluidUnlocalizedName = fluid.getUnlocalizedName().toLowerCase();
|
||||
|
||||
if (displayName.equals(items.get(fluidUnlocalizedName))) {
|
||||
return fluidUnlocalizedName;
|
||||
}
|
||||
|
||||
if (!fluidUnlocalizedName.startsWith("fluid.")
|
||||
&& displayName.equals(items.get("fluid." + fluidUnlocalizedName))) {
|
||||
return "fluid." + fluidUnlocalizedName;
|
||||
}
|
||||
|
||||
return (Item.itemRegistry.getNameForObject(stack.getItem()) + ":"
|
||||
+ stack.getItemDamage()
|
||||
+ "@"
|
||||
+ fluid.getUnlocalizedName()).toLowerCase();
|
||||
}
|
||||
|
||||
if (stack.hasTagCompound()) {
|
||||
try {
|
||||
final ItemStack stackCopy = new ItemStack(stack.getItem(), 1, stack.getItemDamage());
|
||||
|
||||
if (displayName.equals(stripFormatting(stackCopy.getDisplayName()))) {
|
||||
return (Item.itemRegistry.getNameForObject(stack.getItem()) + ":" + stack.getItemDamage())
|
||||
.toLowerCase();
|
||||
}
|
||||
} catch (Exception e) {}
|
||||
}
|
||||
|
||||
return StackInfo.getItemStackGUID(stack);
|
||||
}
|
||||
|
||||
private String stripFormatting(String name) {
|
||||
return EnumChatFormatting.getTextWithoutFormattingCodes(name).trim();
|
||||
}
|
||||
|
||||
public synchronized String getItemStackDisplayName(ItemStack stack) {
|
||||
|
||||
if (stack == null || this.secondNames.isEmpty()) {
|
||||
return "";
|
||||
}
|
||||
|
||||
final String guidKey = StackInfo.getItemStackGUID(stack);
|
||||
|
||||
return this.processedNames.computeIfAbsent(guidKey, stackKey -> {
|
||||
String displayName = this.secondNames.get(stackKey);
|
||||
|
||||
if (displayName == null) {
|
||||
final String guid = findBestGUIDForLookup(stack);
|
||||
displayName = this.secondNames
|
||||
.computeIfAbsent(guid == null ? stackKey : guid, g -> getFallbackDisplayName(stack));
|
||||
}
|
||||
|
||||
return displayName.equals(stripFormatting(stack.getDisplayName())) ? "" : displayName;
|
||||
});
|
||||
}
|
||||
|
||||
public String findBestGUIDForLookup(ItemStack stack) {
|
||||
String guidKey = (Item.itemRegistry.getNameForObject(stack.getItem()) + ":" + stack.getItemDamage())
|
||||
.toLowerCase();
|
||||
|
||||
if (this.secondNames.containsKey(guidKey)) {
|
||||
return guidKey;
|
||||
}
|
||||
|
||||
final FluidStack fluid = StackInfo.getFluid(stack);
|
||||
|
||||
if (fluid != null) {
|
||||
guidKey = (Item.itemRegistry.getNameForObject(stack.getItem()) + ":"
|
||||
+ stack.getItemDamage()
|
||||
+ "@"
|
||||
+ fluid.getUnlocalizedName()).toLowerCase();
|
||||
|
||||
if (this.secondNames.containsKey(guidKey)) {
|
||||
return guidKey;
|
||||
}
|
||||
|
||||
final String fluidUnlocalizedName = fluid.getUnlocalizedName().toLowerCase();
|
||||
|
||||
if (!fluidUnlocalizedName.startsWith("fluid.")
|
||||
&& this.secondNames.containsKey("fluid." + fluidUnlocalizedName)) {
|
||||
return "fluid." + fluidUnlocalizedName;
|
||||
}
|
||||
|
||||
if (this.secondNames.containsKey(fluidUnlocalizedName)) {
|
||||
return fluidUnlocalizedName;
|
||||
}
|
||||
}
|
||||
|
||||
final String unlocalizedName = stack.getUnlocalizedName().toLowerCase();
|
||||
|
||||
if (!unlocalizedName.endsWith(".name") && this.secondNames.containsKey(unlocalizedName + ".name")) {
|
||||
return unlocalizedName + ".name";
|
||||
}
|
||||
|
||||
if (this.secondNames.containsKey(unlocalizedName)) {
|
||||
return unlocalizedName;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
private String getFallbackDisplayName(ItemStack stack) {
|
||||
final String unlocalizedName = stack.getUnlocalizedName();
|
||||
final String secondLanguage = this.secondNames.get("language");
|
||||
String name = LanguageRegistry.instance().getStringLocalization(unlocalizedName, secondLanguage);
|
||||
|
||||
if (name == null && !unlocalizedName.endsWith(".name")) {
|
||||
name = LanguageRegistry.instance().getStringLocalization(unlocalizedName + ".name", secondLanguage);
|
||||
}
|
||||
|
||||
if (name == null || name.contains("%")) {
|
||||
try (LanguageRegistryPatch lrPatch = new LanguageRegistryPatch(secondLanguage)) {
|
||||
name = stack.getDisplayName();
|
||||
}
|
||||
}
|
||||
|
||||
final FluidStack fluid = StackInfo.getFluid(stack);
|
||||
|
||||
if (fluid != null) {
|
||||
final String unlocalizedFluidName = fluid.getUnlocalizedName().toLowerCase();
|
||||
String fluidName = this.secondNames.get(unlocalizedFluidName);
|
||||
|
||||
if (fluidName == null && !unlocalizedFluidName.startsWith("fluid.")) {
|
||||
fluidName = this.secondNames.get("fluid." + unlocalizedFluidName);
|
||||
}
|
||||
|
||||
if (fluidName != null && name != null && !name.isEmpty()) {
|
||||
return name.replace(fluid.getLocalizedName(), fluidName);
|
||||
} else {
|
||||
name = fluidName;
|
||||
}
|
||||
}
|
||||
|
||||
return name == null ? "" : name;
|
||||
}
|
||||
|
||||
protected void saveMappings(Map<String, String> items) {
|
||||
try (BufferedWriter writer = Files.newBufferedWriter(
|
||||
(new File(NEIClientConfig.configDir, CONFIG_FILE)).toPath(),
|
||||
StandardCharsets.UTF_8)) {
|
||||
for (Map.Entry<String, String> entry : items.entrySet()) {
|
||||
if (entry.getValue().isEmpty()) continue;
|
||||
|
||||
writer.write(entry.getKey() + "=" + entry.getValue());
|
||||
writer.newLine();
|
||||
}
|
||||
} catch (Exception e) {
|
||||
NEIClientConfig.logger.error("Error saving untranslator", e);
|
||||
}
|
||||
|
||||
NEIClientConfig.logger.info("Untranslator saved");
|
||||
}
|
||||
|
||||
public void unload() {
|
||||
this.secondNames.clear();
|
||||
LanguageRegistryPatch.secondLanguageListCache = null;
|
||||
this.processedNames.clear();
|
||||
}
|
||||
|
||||
public void load() {
|
||||
unload();
|
||||
|
||||
this.secondNames.clear();
|
||||
|
||||
if (ClientHandler.loadSettingsFile(CONFIG_FILE, null, this::parseStream)
|
||||
|| ClientHandler.loadSettingsResource(CONFIG_FILE, this::parseStream)) {
|
||||
NEIClientConfig.logger.info("Untranslator loaded");
|
||||
}
|
||||
|
||||
if (!this.secondNames.containsKey("language")
|
||||
|| FMLCommonHandler.instance().getCurrentLanguage().equals(this.secondNames.get("language"))) {
|
||||
this.secondNames.clear();
|
||||
}
|
||||
|
||||
SubsetWidget.updateHiddenItems();
|
||||
}
|
||||
|
||||
private void parseStream(Stream<String> lines) {
|
||||
lines.forEach(line -> {
|
||||
final int sepIndex = line.indexOf('=');
|
||||
|
||||
if (sepIndex != -1) {
|
||||
this.secondNames.put(line.substring(0, sepIndex).trim(), line.substring(sepIndex + 1).trim());
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
@@ -137,6 +137,8 @@ nei.chat.chunkoverlay.0=Chunk Overlay: Off
|
||||
nei.chat.chunkoverlay.1=Chunk Overlay: Chunk Corners
|
||||
nei.chat.chunkoverlay.2=Chunk Overlay: Chunks
|
||||
nei.chat.chunkoverlay.3=Chunk Overlay: GT Ore Veins
|
||||
nei.chat.moboverlay.0=Mob Spawning Overlay: §cOff
|
||||
nei.chat.moboverlay.1=Mob Spawning Overlay: §2On
|
||||
nei.chat.item_link.text=<%s> §6Click to add bookmark: %s
|
||||
nei.chat.bookmark_added.text=Bookmark added!
|
||||
|
||||
@@ -147,6 +149,12 @@ nei.chat.recipeid.diff.finish=Finished processing recipe diff!
|
||||
nei.chat.recipeid.dump.start=Start processing recipe handlers!
|
||||
nei.chat.recipeid.dump.finish=Finished processing recipe handlers!
|
||||
|
||||
nei.chat.untranslator.dump.start=Start processing untranslator dump!
|
||||
nei.chat.untranslator.dump.finish=Finished processing untranslator dump!
|
||||
nei.chat.untranslator.dump.error=First, wait for the items to load!
|
||||
nei.chat.untranslator.clear=File successfully deleted!
|
||||
nei.chat.untranslator.clear.error=Could not delete file!
|
||||
|
||||
nei.options=NEI Options
|
||||
nei.options.back=Back
|
||||
nei.options.save=Save
|
||||
@@ -427,6 +435,9 @@ nei.options.inventory.itemzoom.showName=Display Name
|
||||
nei.options.inventory.itemzoom.showName.true=Show
|
||||
nei.options.inventory.itemzoom.showName.false=Hide
|
||||
nei.options.inventory.itemzoom.nameColor=Display Name Color
|
||||
nei.options.inventory.itemUntranslator=Item Untranslator
|
||||
nei.options.inventory.itemUntranslator.true=Enabled
|
||||
nei.options.inventory.itemUntranslator.false=Disabled
|
||||
|
||||
nei.options.command=Commands
|
||||
nei.options.command.creative=Gamemode
|
||||
|
||||
Reference in new issue
Block a user