aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/gtPlusPlus/xmod/forestry/bees/registry
diff options
context:
space:
mode:
authorNotAPenguin <michiel.vandeginste@gmail.com>2024-09-02 23:17:17 +0200
committerGitHub <noreply@github.com>2024-09-02 23:17:17 +0200
commit1b820de08a05070909a267e17f033fcf58ac8710 (patch)
tree02831a025986a06b20f87e5bcc69d1e0c639a342 /src/main/java/gtPlusPlus/xmod/forestry/bees/registry
parentafd3fd92b6a6ab9ab0d0dc3214e6bc8ff7a86c9b (diff)
downloadGT5-Unofficial-1b820de08a05070909a267e17f033fcf58ac8710.tar.gz
GT5-Unofficial-1b820de08a05070909a267e17f033fcf58ac8710.tar.bz2
GT5-Unofficial-1b820de08a05070909a267e17f033fcf58ac8710.zip
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
Diffstat (limited to 'src/main/java/gtPlusPlus/xmod/forestry/bees/registry')
-rw-r--r--src/main/java/gtPlusPlus/xmod/forestry/bees/registry/GTPPAlleleBeeSpecies.java (renamed from src/main/java/gtPlusPlus/xmod/forestry/bees/registry/GTPP_AlleleBeeSpecies.java)4
-rw-r--r--src/main/java/gtPlusPlus/xmod/forestry/bees/registry/GTPPBeeMutation.java (renamed from src/main/java/gtPlusPlus/xmod/forestry/bees/registry/GTPP_Bee_Mutation.java)5
-rw-r--r--src/main/java/gtPlusPlus/xmod/forestry/bees/registry/GTPP_BeeDefinition.java49
-rw-r--r--src/main/java/gtPlusPlus/xmod/forestry/bees/registry/GTPP_Bees.java61
4 files changed, 59 insertions, 60 deletions
diff --git a/src/main/java/gtPlusPlus/xmod/forestry/bees/registry/GTPP_AlleleBeeSpecies.java b/src/main/java/gtPlusPlus/xmod/forestry/bees/registry/GTPPAlleleBeeSpecies.java
index 05ce6e56e6..76524388e5 100644
--- a/src/main/java/gtPlusPlus/xmod/forestry/bees/registry/GTPP_AlleleBeeSpecies.java
+++ b/src/main/java/gtPlusPlus/xmod/forestry/bees/registry/GTPPAlleleBeeSpecies.java
@@ -9,9 +9,9 @@ import forestry.api.genetics.AlleleManager;
import forestry.api.genetics.IClassification;
import forestry.apiculture.genetics.alleles.AlleleBeeSpecies;
-public class GTPP_AlleleBeeSpecies extends AlleleBeeSpecies {
+public class GTPPAlleleBeeSpecies extends AlleleBeeSpecies {
- public GTPP_AlleleBeeSpecies(String uid, boolean dominant, String unlocalizedName, String authority,
+ public GTPPAlleleBeeSpecies(String uid, boolean dominant, String unlocalizedName, String authority,
String unlocalizedDescription, IClassification branch, String binomial, int primaryColor, int secondaryColor) {
super(
uid,
diff --git a/src/main/java/gtPlusPlus/xmod/forestry/bees/registry/GTPP_Bee_Mutation.java b/src/main/java/gtPlusPlus/xmod/forestry/bees/registry/GTPPBeeMutation.java
index d20b7ffb73..02e9ec0cbe 100644
--- a/src/main/java/gtPlusPlus/xmod/forestry/bees/registry/GTPP_Bee_Mutation.java
+++ b/src/main/java/gtPlusPlus/xmod/forestry/bees/registry/GTPPBeeMutation.java
@@ -20,12 +20,11 @@ import forestry.api.genetics.IMutationCondition;
import forestry.apiculture.genetics.BeeMutation;
import forestry.core.genetics.mutations.Mutation;
-public class GTPP_Bee_Mutation extends BeeMutation {
+public class GTPPBeeMutation extends BeeMutation {
private final float split;
- public GTPP_Bee_Mutation(IAlleleBeeSpecies bee0, IAlleleBeeSpecies bee1, IAllele[] result, int chance,
- 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);
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<GTPP_AlleleBeeSpecies> mSpeciesProperties;
+ private final GTPPAlleleBeeSpecies species;
+ private final Consumer<GTPPAlleleBeeSpecies> mSpeciesProperties;
private final Consumer<IAllele[]> mAlleles;
private final Consumer<GTPP_BeeDefinition> mMutations;
private IAllele[] template;
private IBeeGenome genome;
GTPP_BeeDefinition(GTPP_BranchDefinition branch, String binomial, Materials aMat, boolean dominant, int primary,
- int secondary, Consumer<GTPP_AlleleBeeSpecies> aSpeciesProperties, Consumer<IAllele[]> aAlleles,
+ int secondary, Consumer<GTPPAlleleBeeSpecies> aSpeciesProperties, Consumer<IAllele[]> aAlleles,
Consumer<GTPP_BeeDefinition> 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<GTPP_AlleleBeeSpecies> aSpeciesProperties, Consumer<IAllele[]> aAlleles,
+ int secondary, Consumer<GTPPAlleleBeeSpecies> aSpeciesProperties, Consumer<IAllele[]> aAlleles,
Consumer<GTPP_BeeDefinition> 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_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<String, Material> sMaterialMappings = new HashMap<>();
- public static HashMap<Integer, GTPP_PropolisType> sPropolisMappings = new HashMap<>();
- public static HashMap<Integer, GTPP_PollenType> sPollenMappings = new HashMap<>();
- public static HashMap<Integer, GTPP_DropType> sDropMappings = new HashMap<>();
- public static HashMap<Integer, GTPP_CombType> sCombMappings = new HashMap<>();
+ public static HashMap<Integer, GTPPPropolisType> sPropolisMappings = new HashMap<>();
+ public static HashMap<Integer, GTPPPollenType> sPollenMappings = new HashMap<>();
+ public static HashMap<Integer, GTPPDropType> sDropMappings = new HashMap<>();
+ public static HashMap<Integer, GTPPCombType> 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());
}
}