mirror of
https://github.com/GTNewHorizons/NotEnoughItems.git
synced 2026-11-16 02:04:59 +00:00
Compare commits
5
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
55ccb70c8b | ||
|
|
2e1c7764b7 | ||
|
|
9daa9cabb2 | ||
|
|
74dc7c34d9 | ||
|
|
e5f85e32ec |
No files matched your search
+1
-1
@@ -2,7 +2,7 @@
|
||||
|
||||
dependencies {
|
||||
api('com.github.GTNewHorizons:CodeChickenCore:1.4.2:dev')
|
||||
implementation('com.github.GTNewHorizons:GTNHLib:0.6.22:dev')
|
||||
implementation('com.github.GTNewHorizons:GTNHLib:0.6.24:dev')
|
||||
|
||||
shadowImplementation('org.apache.commons:commons-csv:1.10.0')
|
||||
|
||||
|
||||
@@ -25,6 +25,7 @@ import net.minecraft.client.gui.GuiSelectWorld;
|
||||
import net.minecraft.client.multiplayer.WorldClient;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
import net.minecraft.launchwrapper.Launch;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.client.event.RenderWorldLastEvent;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
@@ -257,13 +258,17 @@ public class ClientHandler {
|
||||
}
|
||||
|
||||
public static void loadPluginsList() {
|
||||
if (!Loader.isModLoaded("jarjar")) {
|
||||
final boolean jarjar = Launch.blackboard.getOrDefault("jarjar.rfbPluginLoaded", Boolean.FALSE) == Boolean.TRUE;
|
||||
if (!jarjar) {
|
||||
// Do the old style class discovery
|
||||
final ClassDiscoverer classDiscoverer = new ClassDiscoverer(
|
||||
test -> test.startsWith("NEI") && test.endsWith("Config.class"),
|
||||
IConfigureNEI.class);
|
||||
|
||||
NEIClientConfig.pluginsList.addAll(classDiscoverer.findClasses());
|
||||
NEIClientConfig.logger
|
||||
.info("Loading NEI Plugins via ClassDiscoverer: " + NEIClientConfig.pluginsList.size());
|
||||
|
||||
} 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
|
||||
@@ -279,6 +284,7 @@ public class ClientHandler {
|
||||
NEIClientConfig.logger.error("Failed to load plugin class {}", className, e);
|
||||
}
|
||||
}
|
||||
NEIClientConfig.logger.info("Loading NEI Plugins via JarJar: " + NEIClientConfig.pluginsList.size());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -147,6 +147,7 @@ public class NEIClientConfig {
|
||||
API.addOption(new OptionToggleButton("inventory.widgetsenabled"));
|
||||
|
||||
tag.getTag("inventory.autocrafting").getBooleanValue(false);
|
||||
tag.getTag("inventory.dynamicFontSize").getBooleanValue(true);
|
||||
tag.getTag("inventory.hidden").getBooleanValue(false);
|
||||
tag.getTag("inventory.cheatmode").getIntValue(2);
|
||||
tag.getTag("inventory.lockmode").setComment(
|
||||
|
||||
@@ -126,19 +126,24 @@ 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<>();
|
||||
|
||||
for (int index = this.searchProviders.size() - 1; index >= 0; index--) {
|
||||
ISearchParserProvider provider = this.searchProviders.get(index);
|
||||
|
||||
if (!providers.containsKey(provider.getPrefix())
|
||||
&& provider.getMatchingLanguages().contains(currentLanguage)) {
|
||||
providers.put(provider.getPrefix(), provider);
|
||||
if (provider.getMatchingLanguages().contains(currentLanguage)) {
|
||||
if (provider.getSearchMode() == SearchMode.PREFIX && !providers.containsKey(provider.getPrefix())) {
|
||||
providers.put(provider.getPrefix(), provider);
|
||||
} else if (provider.getSearchMode() == SearchMode.ALWAYS) {
|
||||
providersCache.providers.add(provider);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
providersCache.providers = new ArrayList<>(providers.values());
|
||||
providersCache.languageCode = currentLanguage.getLanguageCode();
|
||||
providersCache.providers.addAll(providers.values());
|
||||
}
|
||||
|
||||
return providersCache.providers;
|
||||
|
||||
@@ -413,7 +413,7 @@ public class NEITransformer implements IClassTransformer {
|
||||
if (name.equals("net.minecraftforge.oredict.OreDictionary")) {
|
||||
ClassReader cr = new ClassReader(bytes);
|
||||
ClassWriter cw = new ClassWriter(ClassWriter.COMPUTE_FRAMES);
|
||||
cr.accept(new OreDictionaryVisitor(ASM5, cw), ClassReader.SKIP_DEBUG | ClassReader.SKIP_FRAMES);
|
||||
cr.accept(new OreDictionaryVisitor(ASM5, cw), 0);
|
||||
bytes = cw.toByteArray();
|
||||
}
|
||||
bytes = transformSubclasses(name, bytes);
|
||||
|
||||
@@ -307,14 +307,19 @@ public class GuiContainerManager {
|
||||
|
||||
if (stackSize == null) {
|
||||
if (itemstack.stackSize > 1) {
|
||||
stackSize = ReadableNumberConverter.INSTANCE.toWideReadableForm(itemstack.stackSize);
|
||||
|
||||
if (stackSize.length() == 3) {
|
||||
scale = 0.8f;
|
||||
} else if (stackSize.length() == 4) {
|
||||
scale = 0.6f;
|
||||
} else if (stackSize.length() > 4) {
|
||||
scale = 0.5f;
|
||||
if (NEIClientConfig.getBooleanSetting("inventory.dynamicFontSize")) {
|
||||
stackSize = ReadableNumberConverter.INSTANCE.toWideReadableForm(itemstack.stackSize);
|
||||
|
||||
if (stackSize.length() == 3) {
|
||||
scale = 0.8f;
|
||||
} else if (stackSize.length() == 4) {
|
||||
scale = 0.6f;
|
||||
} else if (stackSize.length() > 4) {
|
||||
scale = 0.5f;
|
||||
}
|
||||
} else {
|
||||
stackSize = String.valueOf(itemstack.stackSize);
|
||||
}
|
||||
|
||||
} else {
|
||||
|
||||
Reference in new issue
Block a user