Started by
LordHog1
on
Topic category: Help with Minecraft modding (Java Edition)
I wanted to add a dye and all the functionality that comes with it including sheep. I wasn't able to add my dye the to pre existing sheep so I have my own fake sheep that spawn just like the real ones. However I'm having trouble making a procedure that know when it was born and not just spawned, and getting parent color when a sheep was just born to get the combined color of the parents like how the real ones do (eg: red sheep breeding with white sheep births a pink sheep)
I'm controlling the color with attributes and model layers if that's important
Is there a plugin to add a trigger to know when it was born or something to detect parent color.
Thanks in advance.
Well, you can make a procedure that first checks, if the current entity is a baby, and if there's a fake sheep in a small radius. If that turns out to be true search for the nearest entity of the fake sheep which will always be it's mother because the baby spawns at the exact same place as the mother. Then check for the color of the mother sheep. (Idk how you made the color but just check for that variable that saves it.) And change the current entities color to that.
That makes a lot of sense but how do I check for the closest fake sheep and how do i check the level of color attribute because you can only really target the source entity or the event entity and its neither.
Nevermind, I got help from Friyes and they were more then helpful :)
What kind of sheep are you adding?