From 1b820de08a05070909a267e17f033fcf58ac8710 Mon Sep 17 00:00:00 2001 From: NotAPenguin Date: Mon, 2 Sep 2024 23:17:17 +0200 Subject: The Great Renaming (#3014) * move kekztech to a single root dir * move detrav to a single root dir * move gtnh-lanthanides to a single root dir * move tectech and delete some gross reflection in gt++ * remove more reflection inside gt5u * delete more reflection in gt++ * fix imports * move bartworks and bwcrossmod * fix proxies * move galactigreg and ggfab * move gtneioreplugin * try to fix gt++ bee loader * apply the rename rules to BW * apply rename rules to bwcrossmod * apply rename rules to detrav scanner mod * apply rename rules to galacticgreg * apply rename rules to ggfab * apply rename rules to goodgenerator * apply rename rules to gtnh-lanthanides * apply rename rules to gt++ * apply rename rules to kekztech * apply rename rules to kubatech * apply rename rules to tectech * apply rename rules to gt apply the rename rules to gt * fix tt import * fix mui hopefully * fix coremod except intergalactic * rename assline recipe class * fix a class name i stumbled on * rename StructureUtility to GTStructureUtility to prevent conflict with structurelib * temporary rename of GTTooltipDataCache to old name * fix gt client/server proxy names --- .../bees/registry/GTPPAlleleBeeSpecies.java | 50 +++++++++++++ .../forestry/bees/registry/GTPPBeeMutation.java | 85 +++++++++++++++++++++ .../bees/registry/GTPP_AlleleBeeSpecies.java | 50 ------------- .../forestry/bees/registry/GTPP_BeeDefinition.java | 49 ++++++------ .../forestry/bees/registry/GTPP_Bee_Mutation.java | 86 ---------------------- .../xmod/forestry/bees/registry/GTPP_Bees.java | 61 +++++++-------- 6 files changed, 190 insertions(+), 191 deletions(-) create mode 100644 src/main/java/gtPlusPlus/xmod/forestry/bees/registry/GTPPAlleleBeeSpecies.java create mode 100644 src/main/java/gtPlusPlus/xmod/forestry/bees/registry/GTPPBeeMutation.java delete mode 100644 src/main/java/gtPlusPlus/xmod/forestry/bees/registry/GTPP_AlleleBeeSpecies.java delete mode 100644 src/main/java/gtPlusPlus/xmod/forestry/bees/registry/GTPP_Bee_Mutation.java (limited to 'src/main/java/gtPlusPlus/xmod/forestry/bees/registry') diff --git a/src/main/java/gtPlusPlus/xmod/forestry/bees/registry/GTPPAlleleBeeSpecies.java b/src/main/java/gtPlusPlus/xmod/forestry/bees/registry/GTPPAlleleBeeSpecies.java new file mode 100644 index 0000000000..76524388e5 --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/forestry/bees/registry/GTPPAlleleBeeSpecies.java @@ -0,0 +1,50 @@ +package gtPlusPlus.xmod.forestry.bees.registry; + +import net.minecraft.init.Items; +import net.minecraft.item.ItemStack; + +import forestry.api.apiculture.EnumBeeChromosome; +import forestry.api.apiculture.IAlleleBeeSpeciesCustom; +import forestry.api.genetics.AlleleManager; +import forestry.api.genetics.IClassification; +import forestry.apiculture.genetics.alleles.AlleleBeeSpecies; + +public class GTPPAlleleBeeSpecies extends AlleleBeeSpecies { + + public GTPPAlleleBeeSpecies(String uid, boolean dominant, String unlocalizedName, String authority, + String unlocalizedDescription, IClassification branch, String binomial, int primaryColor, int secondaryColor) { + super( + uid, + unlocalizedName, + authority, + unlocalizedDescription, + dominant, + branch, + binomial, + primaryColor, + secondaryColor); + AlleleManager.alleleRegistry.registerAllele(this, EnumBeeChromosome.SPECIES); + } + + @Override + public IAlleleBeeSpeciesCustom addProduct(ItemStack product, Float chance) { + if (product == null || product.getItem() == null) { + product = new ItemStack(Items.boat); + } + if (chance <= 0.0f || chance > 1.0f) { + chance = 0.1f; + } + return super.addProduct(product, chance); + } + + @Override + public IAlleleBeeSpeciesCustom addSpecialty(ItemStack specialty, Float chance) { + if (specialty == null || specialty.getItem() == null) { + specialty = new ItemStack(Items.boat); + } + if (chance <= 0.0f || chance > 1.0f) { + chance = 0.1f; + } + return super.addSpecialty(specialty, chance); + } +} diff --git a/src/main/java/gtPlusPlus/xmod/forestry/bees/registry/GTPPBeeMutation.java b/src/main/java/gtPlusPlus/xmod/forestry/bees/registry/GTPPBeeMutation.java new file mode 100644 index 0000000000..02e9ec0cbe --- /dev/null +++ b/src/main/java/gtPlusPlus/xmod/forestry/bees/registry/GTPPBeeMutation.java @@ -0,0 +1,85 @@ +package gtPlusPlus.xmod.forestry.bees.registry; + +import java.lang.reflect.Field; +import java.util.List; + +import net.minecraft.util.ChunkCoordinates; +import net.minecraft.world.World; + +import org.apache.commons.lang3.reflect.FieldUtils; + +import forestry.api.apiculture.BeeManager; +import forestry.api.apiculture.IAlleleBeeSpecies; +import forestry.api.apiculture.IBeeGenome; +import forestry.api.apiculture.IBeeHousing; +import forestry.api.apiculture.IBeeModifier; +import forestry.api.core.IClimateProvider; +import forestry.api.genetics.IAllele; +import forestry.api.genetics.IGenome; +import forestry.api.genetics.IMutationCondition; +import forestry.apiculture.genetics.BeeMutation; +import forestry.core.genetics.mutations.Mutation; + +public class GTPPBeeMutation extends BeeMutation { + + private final float split; + + public GTPPBeeMutation(IAlleleBeeSpecies bee0, IAlleleBeeSpecies bee1, IAllele[] result, int chance, float split) { + super(bee0, bee1, result, chance); + this.split = split; + BeeManager.beeRoot.registerMutation(this); + } + + @Override + public float getBaseChance() { + return super.getBaseChance() / split; + } + + @Override + public float getChance(IBeeHousing housing, IAlleleBeeSpecies allele0, IAlleleBeeSpecies allele1, + IBeeGenome genome0, IBeeGenome genome1) { + World world = housing != null ? housing.getWorld() : null; + ChunkCoordinates housingCoordinates = housing != null ? housing.getCoordinates() : null; + int x = housingCoordinates != null ? housingCoordinates.posX : 0; + int y = housingCoordinates != null ? housingCoordinates.posY : 0; + int z = housingCoordinates != null ? housingCoordinates.posZ : 0; + + float processedChance = getBasicChance(world, x, y, z, allele0, allele1, genome0, genome1, housing); + + if (processedChance <= 0f) { + return 0f; + } + + IBeeModifier beeHousingModifier = BeeManager.beeRoot.createBeeHousingModifier(housing); + IBeeModifier beeModeModifier = BeeManager.beeRoot.getBeekeepingMode(world) + .getBeeModifier(); + + processedChance *= beeHousingModifier.getMutationModifier(genome0, genome1, processedChance); + processedChance *= beeModeModifier.getMutationModifier(genome0, genome1, processedChance); + + return processedChance; + } + + @SuppressWarnings("unchecked") + private float getBasicChance(World world, int x, int y, int z, IAllele allele0, IAllele allele1, IGenome genome0, + IGenome genome1, IClimateProvider climate) { + float mutationChance = this.getBaseChance(); + List mutationConditions = null; + Field f = FieldUtils.getDeclaredField(Mutation.class, "mutationConditions", true); + if (f == null) f = FieldUtils.getField(Mutation.class, "mutationConditions", true); + if (f == null) return mutationChance; + try { + mutationConditions = f.get(this) instanceof List ? (List) f.get(this) : null; + } catch (IllegalAccessException e) { + e.printStackTrace(); + } + + if (mutationConditions != null) for (IMutationCondition mutationCondition : mutationConditions) { + mutationChance *= mutationCondition.getChance(world, x, y, z, allele0, allele1, genome0, genome1, climate); + if (mutationChance == 0) { + return 0; + } + } + return mutationChance; + } +} diff --git a/src/main/java/gtPlusPlus/xmod/forestry/bees/registry/GTPP_AlleleBeeSpecies.java b/src/main/java/gtPlusPlus/xmod/forestry/bees/registry/GTPP_AlleleBeeSpecies.java deleted file mode 100644 index 05ce6e56e6..0000000000 --- a/src/main/java/gtPlusPlus/xmod/forestry/bees/registry/GTPP_AlleleBeeSpecies.java +++ /dev/null @@ -1,50 +0,0 @@ -package gtPlusPlus.xmod.forestry.bees.registry; - -import net.minecraft.init.Items; -import net.minecraft.item.ItemStack; - -import forestry.api.apiculture.EnumBeeChromosome; -import forestry.api.apiculture.IAlleleBeeSpeciesCustom; -import forestry.api.genetics.AlleleManager; -import forestry.api.genetics.IClassification; -import forestry.apiculture.genetics.alleles.AlleleBeeSpecies; - -public class GTPP_AlleleBeeSpecies extends AlleleBeeSpecies { - - public GTPP_AlleleBeeSpecies(String uid, boolean dominant, String unlocalizedName, String authority, - String unlocalizedDescription, IClassification branch, String binomial, int primaryColor, int secondaryColor) { - super( - uid, - unlocalizedName, - authority, - unlocalizedDescription, - dominant, - branch, - binomial, - primaryColor, - secondaryColor); - AlleleManager.alleleRegistry.registerAllele(this, EnumBeeChromosome.SPECIES); - } - - @Override - public IAlleleBeeSpeciesCustom addProduct(ItemStack product, Float chance) { - if (product == null || product.getItem() == null) { - product = new ItemStack(Items.boat); - } - if (chance <= 0.0f || chance > 1.0f) { - chance = 0.1f; - } - return super.addProduct(product, chance); - } - - @Override - public IAlleleBeeSpeciesCustom addSpecialty(ItemStack specialty, Float chance) { - if (specialty == null || specialty.getItem() == null) { - specialty = new ItemStack(Items.boat); - } - if (chance <= 0.0f || chance > 1.0f) { - chance = 0.1f; - } - return super.addSpecialty(specialty, chance); - } -} diff --git a/src/main/java/gtPlusPlus/xmod/forestry/bees/registry/GTPP_BeeDefinition.java b/src/main/java/gtPlusPlus/xmod/forestry/bees/registry/GTPP_BeeDefinition.java index 73418bdab8..11397e3ef3 100644 --- a/src/main/java/gtPlusPlus/xmod/forestry/bees/registry/GTPP_BeeDefinition.java +++ b/src/main/java/gtPlusPlus/xmod/forestry/bees/registry/GTPP_BeeDefinition.java @@ -38,23 +38,24 @@ import forestry.core.genetics.alleles.AlleleHelper; import forestry.core.genetics.alleles.EnumAllele.Lifespan; import forestry.core.genetics.alleles.EnumAllele.Tolerance; import gregtech.api.enums.Materials; -import gregtech.api.util.GT_LanguageManager; -import gregtech.api.util.GT_ModHandler; +import gregtech.api.util.GTLanguageManager; +import gregtech.api.util.GTModHandler; import gregtech.common.items.CombType; -import gregtech.loaders.misc.GT_Bees; -import gtPlusPlus.core.material.ELEMENT.STANDALONE; +import gregtech.loaders.misc.GTBeeDefinition; +import gregtech.loaders.misc.GTBees; import gtPlusPlus.core.material.Material; +import gtPlusPlus.core.material.MaterialsElements.STANDALONE; import gtPlusPlus.core.util.Utils; import gtPlusPlus.core.util.minecraft.MaterialUtils; import gtPlusPlus.core.util.reflect.ReflectionUtils; -import gtPlusPlus.xmod.forestry.bees.handler.GTPP_CombType; +import gtPlusPlus.xmod.forestry.bees.handler.GTPPCombType; public enum GTPP_BeeDefinition implements IBeeDefinition { DRAGONBLOOD(GTPP_BranchDefinition.LEGENDARY, "Dragon Blood", STANDALONE.DRAGON_METAL, true, Utils.rgbtoHexValue(220, 20, 20), Utils.rgbtoHexValue(20, 20, 20), beeSpecies -> { - beeSpecies.addProduct(GT_ModHandler.getModItem(Forestry.ID, "beeCombs", 1, 8), 0.30f); - beeSpecies.addSpecialty(GTPP_Bees.combs.getStackForType(GTPP_CombType.DRAGONBLOOD), 0.10f); + beeSpecies.addProduct(GTModHandler.getModItem(Forestry.ID, "beeCombs", 1, 8), 0.30f); + beeSpecies.addSpecialty(GTPP_Bees.combs.getStackForType(GTPPCombType.DRAGONBLOOD), 0.10f); beeSpecies.setHumidity(ARID); beeSpecies.setTemperature(EnumTemperature.NORMAL); beeSpecies.setHasEffect(); @@ -67,13 +68,13 @@ public enum GTPP_BeeDefinition implements IBeeDefinition { IBeeMutationCustom tMutation = dis.registerMutation("DRAGONESSENCE", "NEUTRONIUM", 2); tMutation.restrictHumidity(ARID); tMutation.requireResource(STANDALONE.DRAGON_METAL.getBlock(), 1); - tMutation.addMutationCondition(new GT_Bees.DimensionMutationCondition(1, "End")); // End Dim + tMutation.addMutationCondition(new GTBees.DimensionMutationCondition(1, "End")); // End Dim }), FORCE(GTPP_BranchDefinition.LEGENDARY, "Force", STANDALONE.FORCE, true, Utils.rgbtoHexValue(250, 250, 20), Utils.rgbtoHexValue(200, 200, 5), beeSpecies -> { - beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.STONE), 0.30f); - beeSpecies.addProduct(GT_Bees.combs.getStackForType(CombType.SALT), 0.15f); - beeSpecies.addSpecialty(GTPP_Bees.combs.getStackForType(GTPP_CombType.FORCE), 0.10f); + beeSpecies.addProduct(GTBees.combs.getStackForType(CombType.STONE), 0.30f); + beeSpecies.addProduct(GTBees.combs.getStackForType(CombType.SALT), 0.15f); + beeSpecies.addSpecialty(GTPP_Bees.combs.getStackForType(GTPPCombType.FORCE), 0.10f); beeSpecies.setHumidity(EnumHumidity.NORMAL); beeSpecies.setTemperature(EnumTemperature.HOT); beeSpecies.setHasEffect(); @@ -89,15 +90,15 @@ public enum GTPP_BeeDefinition implements IBeeDefinition { }),; private final GTPP_BranchDefinition branch; - private final GTPP_AlleleBeeSpecies species; - private final Consumer mSpeciesProperties; + private final GTPPAlleleBeeSpecies species; + private final Consumer mSpeciesProperties; private final Consumer mAlleles; private final Consumer mMutations; private IAllele[] template; private IBeeGenome genome; GTPP_BeeDefinition(GTPP_BranchDefinition branch, String binomial, Materials aMat, boolean dominant, int primary, - int secondary, Consumer aSpeciesProperties, Consumer aAlleles, + int secondary, Consumer aSpeciesProperties, Consumer aAlleles, Consumer aMutations) { this( branch, @@ -112,7 +113,7 @@ public enum GTPP_BeeDefinition implements IBeeDefinition { } GTPP_BeeDefinition(GTPP_BranchDefinition branch, String binomial, Material aMat, boolean dominant, int primary, - int secondary, Consumer aSpeciesProperties, Consumer aAlleles, + int secondary, Consumer aSpeciesProperties, Consumer aAlleles, Consumer aMutations) { this.mAlleles = aAlleles; this.mMutations = aMutations; @@ -123,13 +124,13 @@ public enum GTPP_BeeDefinition implements IBeeDefinition { String uid = "gtpp.bee.species" + species; String description = "for.description." + species; String name = "for.bees.species." + lowercaseName; - GT_LanguageManager.addStringLocalization("for.bees.species." + lowercaseName, species, true); + GTLanguageManager.addStringLocalization("for.bees.species." + lowercaseName, species, true); GTPP_Bees.sMaterialMappings.put( binomial.toLowerCase() .replaceAll(" ", ""), aMat); this.branch = branch; - this.species = new GTPP_AlleleBeeSpecies( + this.species = new GTPPAlleleBeeSpecies( uid, dominant, name, @@ -184,7 +185,7 @@ public enum GTPP_BeeDefinition implements IBeeDefinition { return ret; } - private final void setSpeciesProperties(GTPP_AlleleBeeSpecies species2) { + private final void setSpeciesProperties(GTPPAlleleBeeSpecies species2) { this.mSpeciesProperties.accept(species2); } @@ -239,7 +240,7 @@ public enum GTPP_BeeDefinition implements IBeeDefinition { */ private final IBeeMutationCustom registerMutation(IAlleleBeeSpecies parent1, IAlleleBeeSpecies parent2, int chance, float chancedivider) { - return new GTPP_Bee_Mutation(parent1, parent2, this.getTemplate(), chance, chancedivider); + return new GTPPBeeMutation(parent1, parent2, this.getTemplate(), chance, chancedivider); } private final IBeeMutationCustom registerMutation(GTPP_BeeDefinition parent1, IAlleleBeeSpecies parent2, int chance, @@ -285,14 +286,12 @@ public enum GTPP_BeeDefinition implements IBeeDefinition { return new BeeVariation.RainResist(this); } - private static final Class sGtBees = ReflectionUtils.getClass("gregtech.loaders.misc.GT_BeeDefinition"); - public static IAlleleBeeSpecies getGregtechBeeType(String name) { try { - Enum aBeeObject = ReflectionUtils.getEnum(sGtBees, name); - Field gtBeesField = ReflectionUtils.getField(sGtBees, "species"); - IAlleleBeeSpecies beeType = ReflectionUtils.getFieldValue(gtBeesField, aBeeObject); - return beeType != null ? beeType : null; + // This is still cursed, but the species field is private and I don't want to go modify that right now + GTBeeDefinition aBeeObject = GTBeeDefinition.valueOf(name); + Field gtBeesField = ReflectionUtils.getField(GTBeeDefinition.class, "species"); + return ReflectionUtils.getFieldValue(gtBeesField, aBeeObject); } catch (Throwable t) { t.printStackTrace(); return null; diff --git a/src/main/java/gtPlusPlus/xmod/forestry/bees/registry/GTPP_Bee_Mutation.java b/src/main/java/gtPlusPlus/xmod/forestry/bees/registry/GTPP_Bee_Mutation.java deleted file mode 100644 index d20b7ffb73..0000000000 --- a/src/main/java/gtPlusPlus/xmod/forestry/bees/registry/GTPP_Bee_Mutation.java +++ /dev/null @@ -1,86 +0,0 @@ -package gtPlusPlus.xmod.forestry.bees.registry; - -import java.lang.reflect.Field; -import java.util.List; - -import net.minecraft.util.ChunkCoordinates; -import net.minecraft.world.World; - -import org.apache.commons.lang3.reflect.FieldUtils; - -import forestry.api.apiculture.BeeManager; -import forestry.api.apiculture.IAlleleBeeSpecies; -import forestry.api.apiculture.IBeeGenome; -import forestry.api.apiculture.IBeeHousing; -import forestry.api.apiculture.IBeeModifier; -import forestry.api.core.IClimateProvider; -import forestry.api.genetics.IAllele; -import forestry.api.genetics.IGenome; -import forestry.api.genetics.IMutationCondition; -import forestry.apiculture.genetics.BeeMutation; -import forestry.core.genetics.mutations.Mutation; - -public class GTPP_Bee_Mutation extends BeeMutation { - - private final float split; - - public GTPP_Bee_Mutation(IAlleleBeeSpecies bee0, IAlleleBeeSpecies bee1, IAllele[] result, int chance, - float split) { - super(bee0, bee1, result, chance); - this.split = split; - BeeManager.beeRoot.registerMutation(this); - } - - @Override - public float getBaseChance() { - return super.getBaseChance() / split; - } - - @Override - public float getChance(IBeeHousing housing, IAlleleBeeSpecies allele0, IAlleleBeeSpecies allele1, - IBeeGenome genome0, IBeeGenome genome1) { - World world = housing != null ? housing.getWorld() : null; - ChunkCoordinates housingCoordinates = housing != null ? housing.getCoordinates() : null; - int x = housingCoordinates != null ? housingCoordinates.posX : 0; - int y = housingCoordinates != null ? housingCoordinates.posY : 0; - int z = housingCoordinates != null ? housingCoordinates.posZ : 0; - - float processedChance = getBasicChance(world, x, y, z, allele0, allele1, genome0, genome1, housing); - - if (processedChance <= 0f) { - return 0f; - } - - IBeeModifier beeHousingModifier = BeeManager.beeRoot.createBeeHousingModifier(housing); - IBeeModifier beeModeModifier = BeeManager.beeRoot.getBeekeepingMode(world) - .getBeeModifier(); - - processedChance *= beeHousingModifier.getMutationModifier(genome0, genome1, processedChance); - processedChance *= beeModeModifier.getMutationModifier(genome0, genome1, processedChance); - - return processedChance; - } - - @SuppressWarnings("unchecked") - private float getBasicChance(World world, int x, int y, int z, IAllele allele0, IAllele allele1, IGenome genome0, - IGenome genome1, IClimateProvider climate) { - float mutationChance = this.getBaseChance(); - List mutationConditions = null; - Field f = FieldUtils.getDeclaredField(Mutation.class, "mutationConditions", true); - if (f == null) f = FieldUtils.getField(Mutation.class, "mutationConditions", true); - if (f == null) return mutationChance; - try { - mutationConditions = f.get(this) instanceof List ? (List) f.get(this) : null; - } catch (IllegalAccessException e) { - e.printStackTrace(); - } - - if (mutationConditions != null) for (IMutationCondition mutationCondition : mutationConditions) { - mutationChance *= mutationCondition.getChance(world, x, y, z, allele0, allele1, genome0, genome1, climate); - if (mutationChance == 0) { - return 0; - } - } - return mutationChance; - } -} diff --git a/src/main/java/gtPlusPlus/xmod/forestry/bees/registry/GTPP_Bees.java b/src/main/java/gtPlusPlus/xmod/forestry/bees/registry/GTPP_Bees.java index 77b7d57954..bfdddcca8b 100644 --- a/src/main/java/gtPlusPlus/xmod/forestry/bees/registry/GTPP_Bees.java +++ b/src/main/java/gtPlusPlus/xmod/forestry/bees/registry/GTPP_Bees.java @@ -4,18 +4,18 @@ import static gregtech.api.enums.Mods.Forestry; import java.util.HashMap; -import gregtech.GT_Mod; +import gregtech.GTMod; import gtPlusPlus.api.objects.Logger; import gtPlusPlus.core.material.Material; import gtPlusPlus.core.util.reflect.ReflectionUtils; -import gtPlusPlus.xmod.forestry.bees.handler.GTPP_CombType; -import gtPlusPlus.xmod.forestry.bees.handler.GTPP_DropType; -import gtPlusPlus.xmod.forestry.bees.handler.GTPP_PollenType; -import gtPlusPlus.xmod.forestry.bees.handler.GTPP_PropolisType; -import gtPlusPlus.xmod.forestry.bees.items.output.GTPP_Comb; -import gtPlusPlus.xmod.forestry.bees.items.output.GTPP_Drop; -import gtPlusPlus.xmod.forestry.bees.items.output.GTPP_Pollen; -import gtPlusPlus.xmod.forestry.bees.items.output.GTPP_Propolis; +import gtPlusPlus.xmod.forestry.bees.handler.GTPPCombType; +import gtPlusPlus.xmod.forestry.bees.handler.GTPPDropType; +import gtPlusPlus.xmod.forestry.bees.handler.GTPPPollenType; +import gtPlusPlus.xmod.forestry.bees.handler.GTPPPropolisType; +import gtPlusPlus.xmod.forestry.bees.items.output.GTPPComb; +import gtPlusPlus.xmod.forestry.bees.items.output.GTPPDrop; +import gtPlusPlus.xmod.forestry.bees.items.output.GTPPPollen; +import gtPlusPlus.xmod.forestry.bees.items.output.GTPPPropolis; public class GTPP_Bees { @@ -25,32 +25,32 @@ public class GTPP_Bees { public static final byte MAGICBEES = 3; public static final byte GREGTECH = 4; - public static GTPP_Propolis propolis; - public static GTPP_Pollen pollen; - public static GTPP_Drop drop; - public static GTPP_Comb combs; + public static GTPPPropolis propolis; + public static GTPPPollen pollen; + public static GTPPDrop drop; + public static GTPPComb combs; public static HashMap sMaterialMappings = new HashMap<>(); - public static HashMap sPropolisMappings = new HashMap<>(); - public static HashMap sPollenMappings = new HashMap<>(); - public static HashMap sDropMappings = new HashMap<>(); - public static HashMap sCombMappings = new HashMap<>(); + public static HashMap sPropolisMappings = new HashMap<>(); + public static HashMap sPollenMappings = new HashMap<>(); + public static HashMap sDropMappings = new HashMap<>(); + public static HashMap sCombMappings = new HashMap<>(); public GTPP_Bees() { - if (Forestry.isModLoaded() && GT_Mod.gregtechproxy.mGTBees) { + if (Forestry.isModLoaded() && GTMod.gregtechproxy.mGTBees) { Logger.BEES("Creating required items."); - propolis = new GTPP_Propolis(); - pollen = new GTPP_Pollen(); - drop = new GTPP_Drop(); - combs = new GTPP_Comb(); + propolis = new GTPPPropolis(); + pollen = new GTPPPollen(); + drop = new GTPPDrop(); + combs = new GTPPComb(); Logger.BEES("Loading types."); initTypes(); Logger.BEES("Adding recipes."); - GTPP_Drop.initDropsRecipes(); - GTPP_Propolis.initPropolisRecipes(); - GTPP_Comb.initCombsRecipes(); + GTPPDrop.initDropsRecipes(); + GTPPPropolis.initPropolisRecipes(); + GTPPComb.initCombsRecipes(); Logger.BEES("Initialising bees."); GTPP_BeeDefinition.initBees(); @@ -60,10 +60,11 @@ public class GTPP_Bees { } private static void initTypes() { - ReflectionUtils.loadClass("gtPlusPlus.xmod.forestry.bees.registry.GTPP_BeeDefinition"); - ReflectionUtils.loadClass("gtPlusPlus.xmod.forestry.bees.handler.GTPP_CombType"); - ReflectionUtils.loadClass("gtPlusPlus.xmod.forestry.bees.handler.GTPP_DropType"); - ReflectionUtils.loadClass("gtPlusPlus.xmod.forestry.bees.handler.GTPP_PollenType"); - ReflectionUtils.loadClass("gtPlusPlus.xmod.forestry.bees.handler.GTPP_PropolisType"); + // This is stupid + ReflectionUtils.loadClass(GTPP_BeeDefinition.class.getName()); + ReflectionUtils.loadClass(GTPPCombType.class.getName()); + ReflectionUtils.loadClass(GTPPDropType.class.getName()); + ReflectionUtils.loadClass(GTPPPollenType.class.getName()); + ReflectionUtils.loadClass(GTPPPropolisType.class.getName()); } } -- cgit