AngelOfCreation
AngelOfCreation
Explore posts from servers
JCHJava Community | Help. Code. Learn.
Created by AngelOfCreation on 3/30/2025 in #java-help
Mendelian genetics in Forge 1.20.1
I need to create a framework called GeneticMob as a mixin to Animal.class in Forge 1.20.1. I then want to create mixins for individual animals that extend GeneticMob. An example would be PigMixin that extends GeneticMob. GeneticMob should provide common methods like getMainGene, getHiddenGene, etc. But these classes rely on enums called Gene that are specific to each animal. Is there a way for me to tell GeneticMob that there will be an enum called Gene so the compiler will let me work with it before its created? My overall idea is to create a system that lets me easily give other mobs mendelian genetics like the Panda has. If there is a better way of doing this I'm all ears.
14 replies
JCHJava Community | Help. Code. Learn.
Created by AngelOfCreation on 3/25/2025 in #java-help
Reflection in a Minecraft mod.
I'm trying to code a compatibility mod for Minecraft that uses mixins to add compatibility with optional dependencies. The mod is an addon to an existing mod called Pet Cemetery and has a mixin that adds compatibility with others mods that add TameableAnimal's. However it also has several lines of code specifically for if a couple of extra mods are added that need special compatibility. These mods should be optional however it is crashing without them because it is calling their classes at runtime. I've been tentatively consulting with ChatGPT on how to ensure that the methods and classes are not directly called at runtime but can still be called if the mod's are loaded. ChatGPT has suggested Reflection and I wanted to get you guy's opinions on this. My old Java professor briefly talked to us about Reflection and all I really know is that it's very advanced and can be dangerous if done improperly so I was hoping you guys could shed some light on this and whether chatGPT is giving me bad advice.
5 replies
DHDistant Horizons
Created by AngelOfCreation on 12/27/2024 in #help-me
Does the 2.3.0 beta work with the new oculus version?
I know it says in server side support that Oculus doesn't work but it just got updated to support DH 2.2 and I was wondering if that worked with the new beta.
9 replies
DHDistant Horizons
Created by AngelOfCreation on 4/17/2024 in #help-me
Is it normal for this mod to take 30 seconds to load each chunk?
Even at max CPU usage, it takes forever to load anything. Is that normal? What's the point of this mod if I have to wait literal hours for the whole 128 x 128 chunks to load. https://gyazo.com/a1e9cbb3edd2a8609677d199f4d4d7d7 https://gyazo.com/b42fdd836ae3983b9c917bbc5cb8d36c https://gyazo.com/a12d08c04505e034a4e3eccc74c9bf11
7 replies