How to make a mob that spawns naturally among other vanilla mobs

Started by Polar404 on

Topic category: Help with modding (Java Edition)

Last seen on 17:10, 11. Dec 2023
Joined Jan 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How to make a mob that spawns naturally among other vanilla mobs

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.

Last seen on 23:34, 25. Feb 2024
Joined May 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
...It would be pretty hard…
Mon, 10/30/2023 - 11:37

...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.)

Last seen on 01:24, 26. Feb 2024
Joined Sep 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
you could make it so when a…
Tue, 11/21/2023 - 16:04

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