Started by
Polar404
on
Topic category: Help with Minecraft modding (Java Edition)
I'm designing a Fancy Chicken from the canceled Minecarft Earth for my mod. However, I want the Fancy Chicken to spawn among normal chickens in the game. In other words, I want a fancy chicken to be generated among all of them in a certain number of chickens, as if it were the leader of that group.
Example: in a group of 4 chickens, I want a Fancy Chicken to spawn naturally among them all.
...It would be pretty hard to change how chickens spawn, since it's a pretty old part of the game that's not easily altered. You could try adding a spawn condition for your entity that checks for other chickens nearby, but this could also be difficult.
You can, however, run procedures using the 'when entity spawns' global trigger, which could be a decent solution. You could either spawn a couple of regular chickens nearby whenever your fancy chicken spawns, or make a procedure that has a small chance of despawning the regular chicken and spawning a fancy chicken whenever a regular chicken spawns. Just make sure to first check that the event/target entity is some sort of chicken, otherwise any entity spawning, (including arrows, dropped items, etc), will have a chance of spawning a chicken, which would be a funny, but probably not what you're going for.
(On second thought, you probably want to go with the first option of spawning chickens around your fancy chicken whenever it spawns, simply because the second option would run into issues of chickens spawned from eggs/breeding also having a chance of spawning a fancy chicken.)
you could make it so when a chicken spawns, there is a super small chance that it is despawned and replaced with the fancy chicken