I am developing a mod that makes phantoms a neutral mob, only attackes when provoked. What would be the best / idiomatic way of doing this?
At first I though I would create a Mixin that injects into the initGoals() method, but I cannot access the private attack goal inner classes that are called in this method.
I have tried to make inject my own private classes to use but then to make a usefull inner attack goal class you need fields and methods from the class that inner class is contained in. So at somepoint you just start reqreating the whole mob, which does not seem like a good idea either.
#How would you go about making a hostile mob neutral?
7 messages · Page 1 of 1 (latest)
Sorry why not just access widen to get access to those private inner classes?
I might be out of my depth here though so idk? I’m not a mod dev
I don't really understand what you mean by widen access. I am talking about the private inner class StartAttackGoal which is inside the PhantomEntity class and extends Goal Can I use mixins to change the access of the private inner class? LIke turn it to a public class?
Yeah that
Also see the first example on https://wiki.fabricmc.net/tutorial:mixin_examples about private inner classes