Compare commits

..
Author SHA1 Message Date
Martin Robertz 21a1ae6fd9 update 2025-01-25 19:57:31 +01:00
slprime 04f2f5af2c Change Permutation Filter 2025-01-25 19:06:33 +02:00
18 changed files with 83 additions and 297 deletions

No files matched your search

+1 -3
View File
@@ -2,9 +2,7 @@
dependencies {
api('com.github.GTNewHorizons:CodeChickenCore:1.4.1:dev')
implementation('com.github.GTNewHorizons:GTNHLib:0.6.15:dev')
implementation('com.github.GTNewHorizons:GTNHLib:0.6.5:dev')
shadowImplementation('org.apache.commons:commons-csv:1.10.0')
compileOnly 'maven.modrinth:forge-essentials:7.5.1'
}
Binary file not shown.
+1 -1
View File
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Vendored
+3 -2
View File
@@ -86,7 +86,8 @@ done
# shellcheck disable=SC2034
APP_BASE_NAME=${0##*/}
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s\n' "$PWD" ) || exit
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s
' "$PWD" ) || exit
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum
@@ -205,7 +206,7 @@ fi
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
# Collect all arguments for the java command:
# * DEFAULT_JVM_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
# and any embedded shellness will be escaped.
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
# treated as '${Hostname}' itself on the command line.
-4
View File
@@ -1,8 +1,4 @@
// Add any additional repositiroes for your dependencies here
repositories {
maven {
name = "Modrinth"
url = "https://api.modrinth.com/maven"
}
}
+1 -1
View File
@@ -17,7 +17,7 @@ pluginManagement {
}
plugins {
id 'com.gtnewhorizons.gtnhsettingsconvention' version '1.0.37'
id 'com.gtnewhorizons.gtnhsettingsconvention' version '1.0.31'
}
@@ -46,9 +46,6 @@ import codechicken.nei.recipe.GuiRecipeTab;
import codechicken.nei.recipe.StackInfo;
import cpw.mods.fml.client.CustomModLoadingErrorDisplayException;
import cpw.mods.fml.common.FMLCommonHandler;
import cpw.mods.fml.common.Loader;
import cpw.mods.fml.common.ModClassLoader;
import cpw.mods.fml.common.discovery.ASMDataTable;
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
import cpw.mods.fml.common.gameevent.TickEvent;
import cpw.mods.fml.common.gameevent.TickEvent.Phase;
@@ -257,29 +254,11 @@ public class ClientHandler {
}
public static void loadPluginsList() {
if (!Loader.isModLoaded("jarjar")) {
// Do the old style class discovery
final ClassDiscoverer classDiscoverer = new ClassDiscoverer(
test -> test.startsWith("NEI") && test.endsWith("Config.class"),
IConfigureNEI.class);
final ClassDiscoverer classDiscoverer = new ClassDiscoverer(
test -> test.startsWith("NEI") && test.endsWith("Config.class"),
IConfigureNEI.class);
NEIClientConfig.pluginsList.addAll(classDiscoverer.findClasses());
} else {
// If JarJar's loaded, the ASMDataTable now includes interfaces in addition to Annotations, so use that
// instead Includes a small change in behavior of no longer requiring the class to start with NEI and end
// with Config; This could easily be changed if desired, but the previous behavior was likely to speed
// things up by limiting the scope when looking at all of the jars and classes in the classpath.
final ASMDataTable dataTable = NEIModContainer.getAsmDataTable();
final ModClassLoader modClassLoader = (ModClassLoader) Loader.instance().getModClassLoader();
for (ASMDataTable.ASMData asmData : dataTable.getAll(IConfigureNEI.class.getName().replace('.', '/'))) {
final String className = asmData.getClassName().replace('/', '.');
try {
NEIClientConfig.pluginsList.add(Class.forName(className, true, modClassLoader));
} catch (ClassNotFoundException e) {
NEIClientConfig.logger.error("Failed to load plugin class {}", className, e);
}
}
}
NEIClientConfig.pluginsList.addAll(classDiscoverer.findClasses());
}
@SubscribeEvent
@@ -338,9 +317,8 @@ public class ClientHandler {
public void loadWorld(World world, boolean fromServer) {
if (world != lastworld) {
SMPmagneticItems.clear();
if (!NEIClientConfig.getBooleanSetting("world.overlays.lock")) {
WorldOverlayRenderer.reset();
}
WorldOverlayRenderer.reset();
if (!fromServer) {
NEIClientConfig.setHasSMPCounterPart(false);
NEIClientConfig.setInternalEnabled(false);
@@ -9,7 +9,6 @@ import java.util.Map;
import java.util.Set;
import java.util.function.Function;
import java.util.regex.Pattern;
import java.util.stream.Stream;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.GuiScreen;
@@ -62,7 +61,6 @@ import codechicken.nei.recipe.GuiRecipeTab;
import codechicken.nei.recipe.IRecipeHandler;
import codechicken.nei.recipe.RecipeCatalysts;
import codechicken.nei.recipe.RecipeInfo;
import codechicken.nei.util.NEIKeyboardUtils;
import codechicken.obfuscator.ObfuscationRun;
public class NEIClientConfig {
@@ -349,9 +347,6 @@ public class NEIClientConfig {
API.addOption(new OptionOpenGui("world.presets", GuiPresetList.class));
tag.getTag("world.overlays.lock").getBooleanValue(true);
API.addOption(new OptionToggleButton("world.overlays.lock", true));
tag.getTag("inventory.disableMouseScrollTransfer").getBooleanValue(false);
API.addOption(new OptionToggleButton("inventory.disableMouseScrollTransfer", true));
@@ -369,7 +364,6 @@ public class NEIClientConfig {
tag.getTag("inventory.gridRenderingCacheMode").getIntValue(0);
API.addOption(new OptionCycled("inventory.gridRenderingCacheMode", 3, true));
tag.getTag("loadPluginsInParallel").getBooleanValue(true);
tag.getTag("itemLoadingTimeout").getIntValue(500);
tag.getTag("command.creative").setDefaultValue("/gamemode {0} {1}");
@@ -795,7 +789,7 @@ public class NEIClientConfig {
private static final Map<String, String> keySettings = new HashMap<>();
public static int getKeyBinding(String string) {
final String key = keySettings.computeIfAbsent(string, s -> "keys." + s);
final String key = keySettings.computeIfAbsent(string, (s) -> "keys." + s);
return getSetting(key).getIntValue(Keyboard.KEY_NONE);
}
@@ -805,37 +799,17 @@ public class NEIClientConfig {
public static boolean isKeyHashDown(String string) {
final int hash = getKeyBinding(string);
if (hash != Keyboard.CHAR_NONE && Keyboard.getEventKeyState()) {
return KeyManager.keyStates.containsKey(string) ? hash == Keyboard.getEventKey()
: hash == NEIClientUtils.getKeyHash();
}
return false;
return hash != Keyboard.CHAR_NONE && hash == NEIClientUtils.getKeyHash();
}
public static String getKeyName(String keyBind) {
return getKeyName(keyBind, 0);
}
public static String getKeyName(String keyBind, int meta, int mouseBind) {
final int hash = getKeyBinding(keyBind);
if (hash == Keyboard.CHAR_NONE) {
return null;
}
return NEIClientUtils.getKeyName(hash + meta, mouseBind);
}
public static String getKeyName(String keyBind, int meta) {
final int hash = getKeyBinding(keyBind);
if (hash == Keyboard.CHAR_NONE) {
return null;
}
return NEIKeyboardUtils.getKeyName(hash + meta);
return NEIClientUtils.getKeyName(hash);
}
public static void bootNEI(World world) {
@@ -854,11 +828,8 @@ public class NEIClientConfig {
@Override
public void run() {
final Stream<Class<?>> stream = NEIClientConfig.getBooleanSetting("loadPluginsInParallel")
? NEIClientConfig.pluginsList.parallelStream()
: NEIClientConfig.pluginsList.stream();
stream.forEach(clazz -> {
NEIClientConfig.pluginsList.parallelStream().forEach(clazz -> {
try {
IConfigureNEI config = (IConfigureNEI) clazz.getConstructor().newInstance();
config.loadConfig();
@@ -50,8 +50,6 @@ import codechicken.lib.util.LangProxy;
import codechicken.nei.api.GuiInfo;
import codechicken.nei.api.IInfiniteItemHandler;
import codechicken.nei.api.ItemInfo;
import codechicken.nei.util.NEIKeyboardUtils;
import codechicken.nei.util.NEIMouseUtils;
public class NEIClientUtils extends NEIServerUtils {
@@ -59,10 +57,25 @@ public class NEIClientUtils extends NEIServerUtils {
/** Formats a number with group separator and at most 2 fraction digits. */
private static final Map<Locale, DecimalFormat> decimalFormatters = new HashMap<>();
private static final Map<Integer, Integer> keyHashMap = new HashMap<>();
public static final int ALT_HASH = NEIKeyboardUtils.ALT_HASH;
public static final int SHIFT_HASH = NEIKeyboardUtils.SHIFT_HASH;
public static final int CTRL_HASH = NEIKeyboardUtils.CTRL_HASH;
public static final int ALT_HASH = 1 << 27;
public static final int SHIFT_HASH = 1 << 26;
public static final int CTRL_HASH = 1 << 25;
static {
keyHashMap.put(Keyboard.KEY_LSHIFT, SHIFT_HASH);
keyHashMap.put(Keyboard.KEY_RSHIFT, SHIFT_HASH);
keyHashMap.put(Keyboard.KEY_LCONTROL, CTRL_HASH);
keyHashMap.put(Keyboard.KEY_LCONTROL, CTRL_HASH);
keyHashMap.put(Keyboard.KEY_LMETA, CTRL_HASH);
keyHashMap.put(Keyboard.KEY_RMETA, CTRL_HASH);
keyHashMap.put(Keyboard.KEY_LMENU, ALT_HASH);
keyHashMap.put(Keyboard.KEY_LMENU, ALT_HASH);
}
public static Minecraft mc() {
return Minecraft.getMinecraft();
@@ -439,7 +452,7 @@ public class NEIClientUtils extends NEIServerUtils {
if (Keyboard.getEventKeyState()) {
final int keycode = Keyboard.getEventKey();
if (!NEIKeyboardUtils.isHashKey(keycode)) {
if (!keyHashMap.containsKey(keycode)) {
return getMetaHash() + keycode;
}
}
@@ -447,22 +460,45 @@ public class NEIClientUtils extends NEIServerUtils {
return Keyboard.CHAR_NONE;
}
public static String getKeyName(int keyBind, int mouseBind) {
public static String getKeyHashName(int keyBind) {
StringJoiner keyText = new StringJoiner(" + ");
String keyHash = keyBind == Keyboard.KEY_NONE ? "" : NEIKeyboardUtils.getKeyName(keyBind);
String mouseHash = mouseBind == NEIMouseUtils.MOUSE_BTN_NONE ? "" : NEIMouseUtils.getKeyName(mouseBind);
if (!keyHash.isEmpty()) {
keyText.add(keyHash);
if ((keyBind & CTRL_HASH) != 0) {
keyText.add(translate(Minecraft.isRunningOnMac ? "key.ctrl.mac" : "key.ctrl"));
}
if (!mouseHash.isEmpty()) {
keyText.add(mouseHash);
if ((keyBind & SHIFT_HASH) != 0) {
keyText.add(translate("key.shift"));
}
if ((keyBind & ALT_HASH) != 0) {
keyText.add(translate("key.alt"));
}
return keyText.toString();
}
public static String getKeyName(int keyBind) {
keyBind = keyHashMap.getOrDefault(keyBind, keyBind);
StringJoiner keyText = new StringJoiner(" + ");
String hashText = getKeyHashName(keyBind);
int keyID = unHashKey(keyBind);
if (!hashText.isEmpty()) {
keyText.add(hashText);
}
if (keyID != Keyboard.CHAR_NONE || hashText.isEmpty()) {
keyText.add(Keyboard.getKeyName(keyID));
}
return keyText.toString();
}
public static int unHashKey(int keyBind) {
return keyBind & ~(CTRL_HASH | SHIFT_HASH | ALT_HASH);
}
public static void playClickSound() {
mc().getSoundHandler()
.playSound(PositionedSoundRecord.func_147674_a(new ResourceLocation("gui.button.press"), 1.0F));
@@ -25,7 +25,6 @@ import cpw.mods.fml.common.DummyModContainer;
import cpw.mods.fml.common.LoadController;
import cpw.mods.fml.common.Loader;
import cpw.mods.fml.common.ModMetadata;
import cpw.mods.fml.common.discovery.ASMDataTable;
import cpw.mods.fml.common.event.FMLInitializationEvent;
import cpw.mods.fml.common.event.FMLInterModComms;
import cpw.mods.fml.common.event.FMLLoadCompleteEvent;
@@ -42,8 +41,6 @@ public class NEIModContainer extends DummyModContainer {
private static boolean gregTech5Loaded;
private static boolean gtnhLibLoaded;
private static ASMDataTable asmDataTable;
public NEIModContainer() {
super(getModMetadata());
loadMetadata();
@@ -120,7 +117,6 @@ public class NEIModContainer extends DummyModContainer {
gregTech5Loaded = Loader.isModLoaded("gregtech") && !Loader.isModLoaded("gregapi_post");
gtnhLibLoaded = Loader.isModLoaded("gtnhlib");
if (CommonUtils.isClient()) ClientHandler.preInit();
asmDataTable = event.getAsmData();
}
@Subscribe
@@ -143,7 +139,6 @@ public class NEIModContainer extends DummyModContainer {
GuiRecipeTab.loadHandlerInfo();
ClientHandler.loadPluginsList();
ClientHandler.loadHandlerOrdering();
asmDataTable = null;
}
}
@@ -166,8 +161,4 @@ public class NEIModContainer extends DummyModContainer {
public Class<?> getCustomResourcePackClass() {
return getSource().isDirectory() ? FMLFolderResourcePack.class : FMLFileResourcePack.class;
}
public static ASMDataTable getAsmDataTable() {
return asmDataTable;
}
}
@@ -21,8 +21,6 @@ import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.server.MinecraftServer;
import net.minecraft.world.World;
import net.minecraftforge.common.DimensionManager;
import net.minecraftforge.permission.PermissionLevel;
import net.minecraftforge.permission.PermissionManager;
import org.apache.commons.io.FileUtils;
import org.apache.commons.io.IOUtils;
@@ -46,8 +44,6 @@ public class NEIServerConfig {
public static HashMap<String, PlayerSave> playerSaves = new HashMap<>();
public static ItemStackMap<Set<String>> bannedItems = new ItemStackMap<>();
private static boolean doesPermAPIExist = false;
public static void load(World world) {
if (MinecraftServer.getServer() != server) {
logger.debug("Loading NEI Server");
@@ -57,16 +53,6 @@ public class NEIServerConfig {
dimTags.clear();
loadConfig();
loadBannedItems();
try {
Class.forName("net.minecraftforge.permission.PermissionManager");
doesPermAPIExist = true;
NEIActions.baseActions().forEach(
action -> {
PermissionManager.registerPermission("nei.permissions." + action, PermissionLevel.OP);
});
} catch (ClassNotFoundException ignored) {}
}
loadWorld(world);
}
@@ -135,12 +121,7 @@ public class NEIServerConfig {
}
public static boolean canPlayerPerformAction(String playername, String name) {
String node = "permissions." + NEIActions.base(name);
boolean hasPerm = doesPermAPIExist
? PermissionManager.checkPermission(ServerUtils.getPlayer(playername), "nei." + node)
: false;
return hasPerm || isPlayerInList(playername, getPlayerList(node), true);
return isPlayerInList(playername, getPlayerList("permissions." + NEIActions.base(name)), true);
}
public static boolean isPlayerInList(String playername, Set<String> list, boolean allowCards) {
@@ -82,11 +82,7 @@ public class PositionedStack {
}
public PositionedStack copy() {
PositionedStack pStack = new PositionedStack(
Arrays.stream(this.items).map(ItemStack::copy).toArray(ItemStack[]::new),
relx,
rely,
false);
PositionedStack pStack = new PositionedStack(Arrays.asList(items), relx, rely, false);
pStack.permutated = this.permutated;
return pStack;
}
@@ -33,7 +33,6 @@ import codechicken.nei.api.ItemFilter;
import codechicken.nei.api.ItemFilter.ItemFilterProvider;
import codechicken.nei.guihook.GuiContainerManager;
import codechicken.nei.guihook.IContainerTooltipHandler;
import codechicken.nei.util.NEIMouseUtils;
public class SubsetWidget extends Button implements ItemFilterProvider, IContainerTooltipHandler {
@@ -842,21 +841,21 @@ public class SubsetWidget extends Button implements ItemFilterProvider, IContain
if (NEIClientConfig.canCheatItem(SubsetWidget.hoverStack)) {
hotkeys.put(
NEIClientUtils.getKeyName(NEIClientUtils.CTRL_HASH, NEIMouseUtils.MOUSE_BTN_LMB),
NEIClientUtils.translate("subsets.item.cheat.key"),
NEIClientUtils.translate("subsets.item.cheat"));
}
if (SubsetWidget.enableSearchBySubsets) {
hotkeys.put(
NEIClientUtils.getKeyName(NEIClientUtils.SHIFT_HASH, NEIMouseUtils.MOUSE_BTN_LMB),
NEIClientUtils.translate("subsets.item.search.key"),
NEIClientUtils.translate("subsets.item.search"));
}
hotkeys.put(
NEIMouseUtils.getKeyName(NEIMouseUtils.MOUSE_BTN_LMB),
NEIClientUtils.translate("subsets.item.show.key"),
NEIClientUtils.translate("subsets.item.show"));
hotkeys.put(
NEIMouseUtils.getKeyName(NEIMouseUtils.MOUSE_BTN_RMB),
NEIClientUtils.translate("subsets.item.hide.key"),
NEIClientUtils.translate("subsets.item.hide"));
} else if (SubsetWidget.hoverTag != null) {
hotkeys.put(
@@ -865,16 +864,12 @@ public class SubsetWidget extends Button implements ItemFilterProvider, IContain
if (SubsetWidget.enableSearchBySubsets) {
hotkeys.put(
NEIClientUtils.getKeyName(NEIClientUtils.SHIFT_HASH, NEIMouseUtils.MOUSE_BTN_LMB),
NEIClientUtils.translate("subsets.tag.search.key"),
NEIClientUtils.translate("subsets.tag.search"));
}
hotkeys.put(
NEIMouseUtils.getKeyName(NEIMouseUtils.MOUSE_BTN_LMB),
NEIClientUtils.translate("subsets.tag.show"));
hotkeys.put(
NEIMouseUtils.getKeyName(NEIMouseUtils.MOUSE_BTN_RMB),
NEIClientUtils.translate("subsets.tag.hide"));
hotkeys.put(NEIClientUtils.translate("subsets.tag.show.key"), NEIClientUtils.translate("subsets.tag.show"));
hotkeys.put(NEIClientUtils.translate("subsets.tag.hide.key"), NEIClientUtils.translate("subsets.tag.hide"));
}
return hotkeys;
@@ -8,7 +8,6 @@ import java.awt.Rectangle;
import org.lwjgl.input.Keyboard;
import codechicken.nei.NEIClientUtils;
import codechicken.nei.util.NEIKeyboardUtils;
public class OptionKeyBind extends OptionButton {
@@ -124,10 +123,10 @@ public class OptionKeyBind extends OptionButton {
public String getButtonText() {
if (editing) {
return NEIKeyboardUtils.getHashName(NEIClientUtils.getMetaHash());
return NEIClientUtils.getKeyHashName(NEIClientUtils.getMetaHash());
}
return NEIKeyboardUtils.getKeyName(Math.max(getValue(), 0));
return NEIClientUtils.getKeyName(Math.max(getValue(), 0));
}
@Override
@@ -1,80 +0,0 @@
package codechicken.nei.util;
import java.util.HashMap;
import java.util.Map;
import java.util.StringJoiner;
import net.minecraft.client.Minecraft;
import org.lwjgl.input.Keyboard;
import codechicken.nei.NEIClientUtils;
public class NEIKeyboardUtils {
public static final int ALT_HASH = 1 << 27;
public static final int SHIFT_HASH = 1 << 26;
public static final int CTRL_HASH = 1 << 25;
private static final Map<Integer, Integer> keyHashMap = new HashMap<>();
static {
keyHashMap.put(Keyboard.KEY_LSHIFT, SHIFT_HASH);
keyHashMap.put(Keyboard.KEY_RSHIFT, SHIFT_HASH);
keyHashMap.put(Keyboard.KEY_LCONTROL, CTRL_HASH);
keyHashMap.put(Keyboard.KEY_LCONTROL, CTRL_HASH);
keyHashMap.put(Keyboard.KEY_LMETA, CTRL_HASH);
keyHashMap.put(Keyboard.KEY_RMETA, CTRL_HASH);
keyHashMap.put(Keyboard.KEY_LMENU, ALT_HASH);
keyHashMap.put(Keyboard.KEY_LMENU, ALT_HASH);
}
private NEIKeyboardUtils() {}
public static boolean isHashKey(int keycode) {
return keyHashMap.containsKey(keycode);
}
public static String getHashName(int keyBind) {
StringJoiner keyText = new StringJoiner(" + ");
if ((keyBind & CTRL_HASH) != 0) {
keyText.add(NEIClientUtils.translate(Minecraft.isRunningOnMac ? "key.ctrl.mac" : "key.ctrl"));
}
if ((keyBind & SHIFT_HASH) != 0) {
keyText.add(NEIClientUtils.translate("key.shift"));
}
if ((keyBind & ALT_HASH) != 0) {
keyText.add(NEIClientUtils.translate("key.alt"));
}
return keyText.toString();
}
public static String getKeyName(int keyBind) {
keyBind = keyHashMap.getOrDefault(keyBind, keyBind);
StringJoiner keyText = new StringJoiner(" + ");
String hashText = getHashName(keyBind);
int keyID = unhash(keyBind);
if (!hashText.isEmpty()) {
keyText.add(hashText);
}
if (keyID != Keyboard.CHAR_NONE || hashText.isEmpty()) {
keyText.add(Keyboard.getKeyName(keyID));
}
return keyText.toString();
}
public static int unhash(int keyBind) {
return keyBind & ~(CTRL_HASH | SHIFT_HASH | ALT_HASH);
}
}
@@ -1,67 +0,0 @@
package codechicken.nei.util;
import java.util.StringJoiner;
import codechicken.nei.NEIClientUtils;
public class NEIMouseUtils {
public static final int MOUSE_BTN_NONE = Integer.MIN_VALUE;
public static final int MOUSE_BTN_LMB = 0;
public static final int MOUSE_BTN_RMB = 1;
public static final int MOUSE_BTN_MMB = 2;
public static final int MOUSE_SCROLL = 1 << 27;
public static final int MOUSE_DRAG = 1 << 26;
private NEIMouseUtils() {}
public static String getHashName(int mouseBind) {
StringJoiner mouseText = new StringJoiner(" + ");
if ((mouseBind & MOUSE_SCROLL) != 0) {
mouseText.add(NEIClientUtils.translate("mouse.scroll"));
}
if ((mouseBind & MOUSE_DRAG) != 0) {
mouseText.add(NEIClientUtils.translate("mouse.drag"));
}
return mouseText.toString();
}
public static String getKeyName(int mouseBind) {
StringJoiner mouseText = new StringJoiner(" + ");
String hashText = getHashName(mouseBind < 0 ? mouseBind - MOUSE_BTN_NONE : mouseBind);
if (mouseBind >= 0) {
int button = unhash(mouseBind);
switch (button) {
case 0:
mouseText.add(NEIClientUtils.translate("mouse.left"));
break;
case 1:
mouseText.add(NEIClientUtils.translate("mouse.right"));
break;
case 2:
mouseText.add(NEIClientUtils.translate("mouse.middle"));
break;
default:
mouseText.add(NEIClientUtils.translate("mouse.other", button));
break;
}
}
if (!hashText.isEmpty()) {
mouseText.add(hashText);
}
return mouseText.toString();
}
public static int unhash(int mouseBind) {
return mouseBind & ~(MOUSE_SCROLL | MOUSE_DRAG);
}
}
+7 -11
View File
@@ -5,12 +5,6 @@ nei.save=Save
nei.key.ctrl=CTRL
nei.key.shift=SHIFT
nei.key.alt=ALT
nei.mouse.left=LMB
nei.mouse.right=RMB
nei.mouse.middle=MMB
nei.mouse.other=Button %d
nei.mouse.scroll=Scroll
nei.mouse.drag=Drag
# Mac Command Key
nei.key.ctrl.mac=CMD
nei.showHotkeys=Hold %s for hotkeys
@@ -386,11 +380,6 @@ nei.options.world.highlight_tips.sample=Sample
nei.options.world.panels=Panels Settings
nei.options.world.presets=Presets List
nei.options.world.overlays=Overlays Settings
nei.options.world.overlays.lock=Lock overlays between dimensions
nei.options.world.overlays.lock.true=Enabled
nei.options.world.overlays.lock.false=Disabled
nei.options.tools=Tools
nei.options.tools.handler_load_from_config=Load handlers from Config
nei.options.tools.handler_load_from_config.true=Config
@@ -472,14 +461,21 @@ 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
@@ -134,11 +134,6 @@ nei.options.world.highlight_tips=Mettez en surbrillance les info-bulles
nei.options.world.highlight_tips.hide=Caché
nei.options.world.highlight_tips.show=Montré
nei.options.world.overlays=Paramètres des overlays
nei.options.world.overlays.lock.true=Activé
nei.options.world.overlays.lock.false=Désactivé
nei.options.world.overlays.lock=Conserver les overlays entre les dimensions
nei.options.tools=Outils
nei.options.tools.dump=Data Dumps
nei.options.tools.dump.dump=Jeter