Posted March 22, 20214 yr Hello everyone! New to the modding community and the forums, but I'll go ahead and get right to it: I'm trying to make a mod that allows me to spawn a horse with specific variants set (i.e. the coat color and coat type). I've been combing through the horse code for a while, and it seems like anything that would allow be to do this has been blocked off. The main function I'd want to use, setVariantAndMarkings() in the HorseEntity class, is private. I've tried replicating what the function itself does, but it relies on more private information (it has to set the entitydata using a unique id defined privately at the top of the class: DATA_ID_TYPE_VARIANT). Does anyone know of any way I could get around these roadblocks? I've been trying out various approaches for hours now to no avail. If any more info is needed feel free to ask and I'll happily provide some. Any help would be greatly appreciated! Thanks!
March 22, 20214 yr Author Found a solution! To anyone who may wonder in the future, I ended up using the readAdditionalSaveData function of the HorseEntity class, and passed in a compoundNBT tag with the Variant value already calculated. In the future if anyone has any other questions on this topic, go ahead and post them here!
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.