diff options
| author | Jakub <53441451+kuba6000@users.noreply.github.com> | 2022-08-14 15:19:13 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-08-14 15:19:13 +0200 |
| commit | 6d436a2c6a5d9b51070b8399c4fdb196603a8e82 (patch) | |
| tree | 0ac08abe69626ad89e25eb9b0c7aadb7e5243dac | |
| parent | d8d8a462a25a29a9640f6c038ced50a570255e6e (diff) | |
| download | GT5-Unofficial-6d436a2c6a5d9b51070b8399c4fdb196603a8e82.tar.gz GT5-Unofficial-6d436a2c6a5d9b51070b8399c4fdb196603a8e82.tar.bz2 GT5-Unofficial-6d436a2c6a5d9b51070b8399c4fdb196603a8e82.zip | |
Add "Mob Drops" NEI page + Extreme Extermination Chamber (#1)
* First commit
* Mixins
* Merge the same items with diffrent damage
* Faster random in NEI
* More accuracy ?
* Update ClientProxy.java
* Renaming
* Update buildscript
* Use reserved MTE ID's
* EEC work
* Rework NEI page
* Fix inaccurate chances
* Basic equipment spawn
* Add config options
* Translations
* Add infernal drops
* Witchery fix
* Forestry fixes
* More fixes
* Default blacklist
* NEI sorting
* Comment out testing deps
* Clientsided check
* Blood Magic support
* LoaderReference
* Check if peacefull is allowed
* Add some XP output
* Add recipe
* Send Server config to Client
* Add command to reload config
* Translations
* Process MT additions
33 files changed, 3537 insertions, 13 deletions
diff --git a/build.gradle b/build.gradle index ec6cfc966c..4c2b5f597e 100644 --- a/build.gradle +++ b/build.gradle @@ -1,4 +1,4 @@ -//version: 1659365110 +//version: 1659977784 /* DO NOT CHANGE THIS FILE! Also, you may replace this file at any time if there is an update available. @@ -651,7 +651,7 @@ task updateBuildScript { } } -if (isNewBuildScriptVersionAvailable(projectDir.toString())) { +if (!project.getGradle().startParameter.isOffline() && isNewBuildScriptVersionAvailable(projectDir.toString())) { if (autoUpdateBuildScript.toBoolean()) { performBuildScriptUpdate(projectDir.toString()) } else { diff --git a/dependencies.gradle b/dependencies.gradle index b6456d02b6..39a4c44d2f 100644 --- a/dependencies.gradle +++ b/dependencies.gradle @@ -1,5 +1,32 @@ // Add your dependencies here dependencies { + compile("com.github.GTNewHorizons:GT5-Unofficial:5.09.40.78:dev") + compile("com.github.GTNewHorizons:EnderCore:0.2.6:dev") + compile("com.github.GTNewHorizons:EnderIO:2.3.1.29:dev") + compile("com.github.GTNewHorizons:Infernal-Mobs:1.7.5-GTNH:dev") + compileOnly("com.github.GTNewHorizons:BloodMagic:1.3.10:dev") + { + transitive = false + } + compileOnly("thaumcraft:Thaumcraft:1.7.10-4.2.3.5:dev") + { + transitive = false + } + compileOnly("com.github.GTNewHorizons:CraftTweaker:3.2.9:dev") + { + transitive = false + } + runtime("com.github.GTNewHorizons:Baubles:1.0.1.14:dev") + runtime("curse.maven:cofh-core-69162:2388751") + // For testing + //runtime("com.github.GTNewHorizons:OpenBlocks:1.6.9-GTNH:dev") + //runtime("com.github.GTNewHorizons:CraftTweaker:3.2.9:dev") + //compile("com.github.GTNewHorizons:SpecialMobs:3.3.12:dev") + //compile("com.github.GTNewHorizons:twilightforest:2.3.8.15:dev") + //compile("com.github.GTNewHorizons:EnderZoo:1.0.23:dev") + //runtime("thaumcraft:Thaumcraft:1.7.10-4.2.3.5:dev") + //runtime("com.github.GTNewHorizons:BloodMagic:1.3.10:dev") + //compile("curse.maven:witchery-69673:2234410") } diff --git a/gradle.properties b/gradle.properties index 88a36b059a..3fe7a4dc8c 100644 --- a/gradle.properties +++ b/gradle.properties @@ -49,13 +49,13 @@ apiPackage = accessTransformersFile = # Provides setup for Mixins if enabled. If you don't know what mixins are: Keep it disabled! -usesMixins = false +usesMixins = true # Adds some debug arguments like verbose output and export usesMixinDebug = false # Specify the location of your implementation of IMixinConfigPlugin. Leave it empty otherwise. -mixinPlugin = +mixinPlugin = mixin.MixinPlugin # Specify the package that contains all of your Mixins. You may only place Mixins in this package or the build will fail! -mixinsPackage = +mixinsPackage = mixin.mixins # Specify the core mod entry class if you use a core mod. This class must implement IFMLLoadingPlugin! # This parameter is for legacy compatibility only # Example value: coreModClass = asm.FMLPlugin + modGroup = com.myname.mymodid -> com.myname.mymodid.asm.FMLPlugin diff --git a/repositories.gradle b/repositories.gradle index c8843905de..92bcd9fb22 100644 --- a/repositories.gradle +++ b/repositories.gradle @@ -1,5 +1,26 @@ // Add any additional repositories for your dependencies here repositories { - + maven { + name = "GTNH Maven" + url = "http://jenkins.usrv.eu:8081/nexus/content/groups/public/" + } + maven { + name = "ic2" + url = "http://maven.ic2.player.to/" + metadataSources { + mavenPom() + artifact() + } + } + maven { + url "https://cursemaven.com" + } + maven { + name = "jitpack.io" + url = "https://jitpack.io" + } + maven { + url 'https://repo.openmods.info/artifactory/openmods/' + } } diff --git a/src/main/java/kubatech/ClientProxy.java b/src/main/java/kubatech/ClientProxy.java index 8d676b30ec..f25f41ee2c 100644 --- a/src/main/java/kubatech/ClientProxy.java +++ b/src/main/java/kubatech/ClientProxy.java @@ -20,15 +20,23 @@ package kubatech; import cpw.mods.fml.common.event.*; +import kubatech.api.utils.ModUtils; +import kubatech.loaders.MobRecipeLoader; +import kubatech.nei.IMCForNEI; +import net.minecraftforge.common.MinecraftForge; +@SuppressWarnings("unused") public class ClientProxy extends CommonProxy { public void preInit(FMLPreInitializationEvent event) { + ModUtils.isClientSided = true; super.preInit(event); } public void init(FMLInitializationEvent event) { super.init(event); + IMCForNEI.IMCSender(); + MinecraftForge.EVENT_BUS.register(MobRecipeLoader.instance); } public void postInit(FMLPostInitializationEvent event) { diff --git a/src/main/java/kubatech/CommonProxy.java b/src/main/java/kubatech/CommonProxy.java index b058dc96e7..e844cd19d0 100644 --- a/src/main/java/kubatech/CommonProxy.java +++ b/src/main/java/kubatech/CommonProxy.java @@ -19,14 +19,22 @@ package kubatech; +import cpw.mods.fml.common.FMLCommonHandler; import cpw.mods.fml.common.event.*; +import kubatech.commands.CommandConfig; +import kubatech.commands.CommandHandler; +import kubatech.commands.CommandHelp; +import kubatech.loaders.RecipeLoader; public class CommonProxy { public void preInit(FMLPreInitializationEvent event) { - Config.syncronizeConfiguration(event.getSuggestedConfigurationFile()); + kubatech.info("Initializing ! Version: " + Tags.VERSION); - kubatech.info("I am " + Tags.MODNAME + " at version " + Tags.VERSION); + Config.init(event.getSuggestedConfigurationFile()); + Config.synchronizeConfiguration(); + RecipeLoader.addRecipes(); + FMLCommonHandler.instance().bus().register(new FMLEventHandler()); } public void init(FMLInitializationEvent event) {} @@ -35,7 +43,13 @@ public class CommonProxy { public void serverAboutToStart(FMLServerAboutToStartEvent event) {} - public void serverStarting(FMLServerStartingEvent event) {} + public void serverStarting(FMLServerStartingEvent event) { + RecipeLoader.addRecipesLate(); + CommandHandler cmd = new CommandHandler(); + cmd.addCommand(new CommandHelp()); + cmd.addCommand(new CommandConfig()); + event.registerServerCommand(cmd); + } public void serverStarted(FMLServerStartedEvent event) {} diff --git a/src/main/java/kubatech/Config.java b/src/main/java/kubatech/Config.java index b3af0fe9bc..439557d9a0 100644 --- a/src/main/java/kubatech/Config.java +++ b/src/main/java/kubatech/Config.java @@ -24,10 +24,62 @@ import net.minecraftforge.common.config.Configuration; public class Config { - public static void syncronizeConfiguration(File configFile) { + private static class Categories { + public static final String mobHandler = "MobHandler"; + } + + public static boolean mobHandlerEnabled = true; + public static boolean includeEmptyMobs = true; + public static String[] mobBlacklist; + public static File configFile; + + public static void init(File configFile) { + Config.configFile = configFile; + } + + public static void synchronizeConfiguration() { Configuration configuration = new Configuration(configFile); configuration.load(); + mobHandlerEnabled = configuration + .get( + Categories.mobHandler, + "Enabled", + true, + "Enable \"Mob Drops\" NEI page and Extreme Extermination Chamber") + .getBoolean(); + includeEmptyMobs = configuration + .get(Categories.mobHandler, "IncludeEmptyMobs", true, "Include mobs that have no drops in NEI") + .getBoolean(); + mobBlacklist = configuration + .get( + Categories.mobHandler, + "MobBlacklist", + new String[] { + "Giant", + "Thaumcraft.TravelingTrunk", + "chisel.snowman", + "OpenBlocks.Luggage", + "OpenBlocks.MiniMe", + "SpecialMobs.SpecialCreeper", + "SpecialMobs.SpecialZombie", + "SpecialMobs.SpecialPigZombie", + "SpecialMobs.SpecialSlime", + "SpecialMobs.SpecialSkeleton", + "SpecialMobs.SpecialEnderman", + "SpecialMobs.SpecialCaveSpider", + "SpecialMobs.SpecialGhast", + "SpecialMobs.SpecialWitch", + "SpecialMobs.SpecialSpider", + "TwilightForest.HydraHead", + "TwilightForest.RovingCube", + "TwilightForest.Harbinger Cube", + "TwilightForest.Adherent", + "SpecialMobs.SpecialSilverfish", + }, + "These mobs will be skipped when generating recipe map") + .getStringList(); + if (configuration.hasChanged()) { configuration.save(); } diff --git a/src/main/java/kubatech/FMLEventHandler.java b/src/main/java/kubatech/FMLEventHandler.java new file mode 100644 index 0000000000..e5acd58a36 --- /dev/null +++ b/src/main/java/kubatech/FMLEventHandler.java @@ -0,0 +1,16 @@ +package kubatech; + +import cpw.mods.fml.common.eventhandler.SubscribeEvent; +import cpw.mods.fml.common.gameevent.PlayerEvent; +import kubatech.network.LoadConfigPacket; +import net.minecraft.entity.player.EntityPlayerMP; + +public class FMLEventHandler { + // Gets fired only server-sided + @SubscribeEvent + public void onPlayerLoggedIn(PlayerEvent.PlayerLoggedInEvent event) { + if (!(event.player instanceof EntityPlayerMP)) return; + kubatech.info("Sending config to " + event.player.getDisplayName()); + kubatech.NETWORK.sendTo(LoadConfigPacket.instance, (EntityPlayerMP) event.player); + } +} diff --git a/src/main/java/kubatech/api/LoaderReference.java b/src/main/java/kubatech/api/LoaderReference.java new file mode 100644 index 0000000000..aef8930905 --- /dev/null +++ b/src/main/java/kubatech/api/LoaderReference.java @@ -0,0 +1,12 @@ +package kubatech.api; + +import cpw.mods.fml.common.Loader; + +public class LoaderReference { + public static final boolean BloodMagic = Loader.isModLoaded("AWWayofTime"); + public static final boolean EnderIO = Loader.isModLoaded("EnderIO"); + public static final boolean ExtraUtilities = Loader.isModLoaded("ExtraUtilities"); + public static final boolean InfernalMobs = Loader.isModLoaded("InfernalMobs"); + public static final boolean Thaumcraft = Loader.isModLoaded("Thaumcraft"); + public static final boolean MineTweaker = Loader.isModLoaded("MineTweaker3"); +} diff --git a/src/main/java/kubatech/api/Variables.java b/src/main/java/kubatech/api/Variables.java new file mode 100644 index 0000000000..c989b45f6f --- /dev/null +++ b/src/main/java/kubatech/api/Variables.java @@ -0,0 +1,26 @@ +/* + * KubaTech - Gregtech Addon + * Copyright (C) 2022 kuba6000 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + * + */ + +package kubatech.api; + +import net.minecraft.util.EnumChatFormatting; + +public class Variables { + public static final String Author = "Author: " + EnumChatFormatting.GOLD + "kuba6000"; +} diff --git a/src/main/java/kubatech/api/enums/ItemList.java b/src/main/java/kubatech/api/enums/ItemList.java new file mode 100644 index 0000000000..b0cf3289b6 --- /dev/null +++ b/src/main/java/kubatech/api/enums/ItemList.java @@ -0,0 +1,167 @@ +package kubatech.api.enums; + +import static gregtech.api.enums.GT_Values.NI; +import static gregtech.api.enums.GT_Values.W; + +import gregtech.api.interfaces.IItemContainer; +import gregtech.api.util.GT_LanguageManager; +import gregtech.api.util.GT_ModHandler; +import gregtech.api.util.GT_OreDictUnificator; +import gregtech.api.util.GT_Utility; +import java.util.Locale; +import net.minecraft.block.Block; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; + +public enum ItemList implements IItemContainer { + ExtremeExterminationChamber; + + private ItemStack mStack; + private boolean mHasNotBeenSet = true; + + @Override + public IItemContainer set(Item aItem) { + mHasNotBeenSet = false; + if (aItem == null) return this; + ItemStack aStack = new ItemStack(aItem, 1, 0); + mStack = GT_Utility.copyAmount(1, aStack); + return this; + } + + @Override + public IItemContainer set(ItemStack aStack) { + mHasNotBeenSet = false; + mStack = GT_Utility.copyAmount(1, aStack); + return this; + } + + @Override + public Item getItem() { + if (mHasNotBeenSet) + throw new IllegalAccessError("The Enum '" + name() + "' has not been set to an Item at this time!"); + if (GT_Utility.isStackInvalid(mStack)) return null; + return mStack.getItem(); + } + + @Override + public Block getBlock() { + if (mHasNotBeenSet) + throw new IllegalAccessError("The Enum '" + name() + "' has not been set to an Item at this time!"); + return GT_Utility.getBlockFromItem(getItem()); + } + + @Override + public final boolean hasBeenSet() { + return !mHasNotBeenSet; + } + + @Override + public boolean isStackEqual(Object aStack) { + return isStackEqual(aStack, false, false); + } + + @Override + public boolean isStackEqual(Object aStack, boolean aWildcard, boolean aIgnoreNBT) { + if (GT_Utility.isStackInvalid(aStack)) return false; + return GT_Utility.areUnificationsEqual((ItemStack) aStack, aWildcard ? getWildcard(1) : get(1), aIgnoreNBT); + } + + @Override + public ItemStack get(long aAmount, Object... aReplacements) { + if (mHasNotBeenSet) + throw new IllegalAccessError("The Enum '" + name() + "' has not been set to an Item at this time!"); + if (GT_Utility.isStackInvalid(mStack)) return GT_Utility.copyAmount(aAmount, aReplacements); + return GT_Utility.copyAmount(aAmount, GT_OreDictUnificator.get(mStack)); + } + + @Override + public ItemStack getWildcard(long aAmount, Object... aReplacements) { + if (mHasNotBeenSet) + throw new IllegalAccessError("The Enum '" + name() + "' has not been set to an Item at this time!"); + if (GT_Utility.isStackInvalid(mStack)) return GT_Utility.copyAmount(aAmount, aReplacements); + return GT_Utility.copyAmountAndMetaData(aAmount, W, GT_OreDictUnificator.get(mStack)); + } + + @Override + public ItemStack getUndamaged(long aAmount, Object... aReplacements) { + if (mHasNotBeenSet) + throw new IllegalAccessError("The Enum '" + name() + "' has not been set to an Item at this time!"); + if (GT_Utility.isStackInvalid(mStack)) return GT_Utility.copyAmount(aAmount, aReplacements); + return GT_Utility.copyAmountAndMetaData(aAmount, 0, GT_OreDictUnificator.get(mStack)); + } + + @Override + public ItemStack getAlmostBroken(long aAmount, Object... aReplacements) { + if (mHasNotBeenSet) + throw new IllegalAccessError("The Enum '" + name() + "' has not been set to an Item at this time!"); + if (GT_Utility.isStackInvalid(mStack)) return GT_Utility.copyAmount(aAmount, aReplacements); + return GT_Utility.copyAmountAndMetaData(aAmount, mStack.getMaxDamage() - 1, GT_OreDictUnificator.get(mStack)); + } + + @Override + public ItemStack getWithName(long aAmount, String aDisplayName, Object... aReplacements) { + ItemStack rStack = get(1, aReplacements); + if (GT_Utility.isStackInvalid(rStack)) return NI; + + // CamelCase alphanumeric words from aDisplayName + StringBuilder tCamelCasedDisplayNameBuilder = new StringBuilder(); + final String[] tDisplayNameWords = aDisplayName.split("\\W"); + for (String tWord : tDisplayNameWords) { + if (tWord.length() > 0) + tCamelCasedDisplayNameBuilder.append(tWord.substring(0, 1).toUpperCase(Locale.US)); + if (tWord.length() > 1) + tCamelCasedDisplayNameBuilder.append(tWord.substring(1).toLowerCase(Locale.US)); + } + if (tCamelCasedDisplayNameBuilder.length() == 0) { + // CamelCased DisplayName is empty, so use hash of aDisplayName + tCamelCasedDisplayNameBuilder.append(((Long) (long) aDisplayName.hashCode())); + } + + // Construct a translation key from UnlocalizedName and CamelCased DisplayName + final String tKey = rStack.getUnlocalizedName() + ".with." + tCamelCasedDisplayNameBuilder + ".name"; + + rStack.setStackDisplayName(GT_LanguageManager.addStringLocalization(tKey, aDisplayName)); + return GT_Utility.copyAmount(aAmount, rStack); + } + + @Override + public ItemStack getWithCharge(long aAmount, int aEnergy, Object... aReplacements) { + ItemStack rStack = get(1, aReplacements); + if (GT_Utility.isStackInvalid(rStack)) return null; + GT_ModHandler.chargeElectricItem(rStack, aEnergy, Integer.MAX_VALUE, true, false); + return GT_Utility.copyAmount(aAmount, rStack); + } + + @Override + public ItemStack getWithDamage(long aAmount, long aMetaValue, Object... aReplacements) { + if (mHasNotBeenSet) + throw new IllegalAccessError("The Enum '" + name() + "' has not been set to an Item at this time!"); + if (GT_Utility.isStackInvalid(mStack)) return GT_Utility.copyAmount(aAmount, aReplacements); + return GT_Utility.copyAmountAndMetaData(aAmount, aMetaValue, GT_OreDictUnificator.get(mStack)); + } + + @Override + public IItemContainer registerOre(Object... aOreNames) { + if (mHasNotBeenSet) + throw new IllegalAccessError("The Enum '" + name() + "' has not been set to an Item at this time!"); + for (Object tOreName : aOreNames) GT_OreDictUnificator.registerOre(tOreName, get(1)); + return this; + } + + @Override + public IItemContainer registerWildcardAsOre(Object... aOreNames) { + if (mHasNotBeenSet) + throw new IllegalAccessError("The Enum '" + name() + "' has not been set to an Item at this time!"); + for (Object tOreName : aOreNames) GT_OreDictUnificator.registerOre(tOreName, getWildcard(1)); + return this; + } + + /** + * Returns the internal stack. + * This method is unsafe. It's here only for quick operations. + * DON'T CHANGE THE RETURNED VALUE! + */ + public ItemStack getInternalStack_unsafe() { + return mStack; + } +} diff --git a/src/main/java/kubatech/api/utils/FastRandom.java b/src/main/java/kubatech/api/utils/FastRandom.java new file mode 100644 index 0000000000..c0fb1ec9d5 --- /dev/null +++ b/src/main/java/kubatech/api/utils/FastRandom.java @@ -0,0 +1,27 @@ +package kubatech.api.utils; + +import java.util.Random; +import java.util.SplittableRandom; + +public class FastRandom extends Random { + + private SplittableRandom realRandom; + + public FastRandom() { + realRandom = new SplittableRandom(); + } + + public FastRandom(long seed) { + realRandom = new SplittableRandom(seed); + } + + @Override + public synchronized void setSeed(long seed) { + realRandom = new SplittableRandom(seed); + } + + @Override + protected int next(int bits) { + return (realRandom.nextInt() >>> (32 - bits)); + } +} diff --git a/src/main/java/kubatech/api/utils/InfernalHelper.java b/src/main/java/kubatech/api/utils/InfernalHelper.java new file mode 100644 index 0000000000..d4e416e9a5 --- /dev/null +++ b/src/main/java/kubatech/api/utils/InfernalHelper.java @@ -0,0 +1,226 @@ +/* + * KubaTech - Gregtech Addon + * Copyright (C) 2022 kuba6000 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + * + */ + +package kubatech.api.utils; + +import atomicstryker.infernalmobs.common.InfernalMobsCore; +import atomicstryker.infernalmobs.common.mods.api.ModifierLoader; +import java.lang.reflect.Field; +import java.lang.reflect.Method; +import java.util.ArrayList; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.item.ItemStack; + +public class InfernalHelper { + private static Method isClassAllowed = null; + + public static boolean isClassAllowed(EntityLivingBase e) { + try { + if (isClassAllowed == null) { + isClassAllowed = InfernalMobsCore.class.getDeclaredMethod("isClassAllowed", EntityLivingBase.class); + isClassAllowed.setAccessible(true); + } + return (boolean) isClassAllowed.invoke(InfernalMobsCore.instance(), e); + } catch (Throwable exception) { + exception.printStackTrace(); + } + return false; + } + + private static Method checkEntityClassForced = null; + + public static boolean checkEntityClassForced(EntityLivingBase e) { + try { + if (checkEntityClassForced == null) { + checkEntityClassForced = + InfernalMobsCore.class.getDeclaredMethod("checkEntityClassForced", EntityLivingBase.class); + checkEntityClassForced.setAccessible(true); + } + return (boolean) checkEntityClassForced.invoke(InfernalMobsCore.instance(), e); + } catch (Throwable exception) { + exception.printStackTrace(); + } + return false; + } + + private static Field modifierLoaders = null; + + public static ArrayList<ModifierLoader<?>> getModifierLoaders() { + try { + if (modifierLoaders == null) { + modifierLoaders = InfernalMobsCore.class.getDeclaredField("modifierLoaders"); + modifierLoaders.setAccessible(true); + } + return (ArrayList<ModifierLoader<?>>) modifierLoaders.get(InfernalMobsCore.instance()); + } catch (Throwable exception) { + exception.printStackTrace(); + } + return new ArrayList<>(); + } + + private static Field eliteRarity; + + public static int getEliteRarity() { + try { + if (eliteRarity == null) { + eliteRarity = InfernalMobsCore.class.getDeclaredField("eliteRarity"); + eliteRarity.setAccessible(true); + } + return eliteRarity.getInt(InfernalMobsCore.instance()); + } catch (Throwable exception) { + exception.printStackTrace(); + } + return 15; + } + + private static Field ultraRarity; + + public static int getUltraRarity() { + try { + if (ultraRarity == null) { + ultraRarity = InfernalMobsCore.class.getDeclaredField("ultraRarity"); + ultraRarity.setAccessible(true); + } + return ultraRarity.getInt(InfernalMobsCore.instance()); + } catch (Throwable exception) { + exception.printStackTrace(); + } + return 15; + } + + private static Field infernoRarity; + + public static int getInfernoRarity() { + try { + if (infernoRarity == null) { + infernoRarity = InfernalMobsCore.class.getDeclaredField("infernoRarity"); + infernoRarity.setAccessible(true); + } + return infernoRarity.getInt(InfernalMobsCore.instance()); + } catch (Throwable exception) { + exception.printStackTrace(); + } + return 15; + } + + private static Field minEliteModifiers; + + public static int getMinEliteModifiers() { + try { + if (minEliteModifiers == null) { + minEliteModifiers = InfernalMobsCore.class.getDeclaredField("minEliteModifiers"); + minEliteModifiers.setAccessible(true); + } + return minEliteModifiers.getInt(InfernalMobsCore.instance()); + } catch (Throwable exception) { + exception.printStackTrace(); + } + return 15; + } + + private static Field minUltraModifiers; + + public static int getMinUltraModifiers() { + try { + if (minUltraModifiers == null) { + minUltraModifiers = InfernalMobsCore.class.getDeclaredField("minUltraModifiers"); + minUltraModifiers.setAccessible(true); + } + return minUltraModifiers.getInt(InfernalMobsCore.instance()); + } catch (Throwable exception) { + exception.printStackTrace(); + } + return 15; + } + + private static Field minInfernoModifiers; + + public static int getMinInfernoModifiers() { + try { + if (minInfernoModifiers == null) { + minInfernoModifiers = InfernalMobsCore.class.getDeclaredField("minInfernoModifiers"); + minInfernoModif |
