how could i replace certain mobs and require feeding the mob a certain item to get the vanilla version?

Started by jejak. on

Topic category: Help with Minecraft modding (Java Edition)

Joined Oct 2025
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
how could i replace certain mobs and require feeding the mob a certain item to get the vanilla version?

for example, a wild sheep will not drop anything, but when you feed it a food it turns into a regular sheep and it is possible to get wool and mutton by killing it

Joined Jul 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Right clicked on entity, get…
Sat, 06/27/2026 - 16:06

Right clicked on entity, get item in main hand is tagged as food, make a custom tag and add all food you want, then if so despawn entity and spawn entity at the same x y z, also set rotation and pitch to the original entities same values to make it seemless

To replace it, you can do on entity tick update, check entity is type sheep, despawn entity, spawn wild sheep, etc as above but the other way around

Joined Mar 2026
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Basically what fr6_17 said…
Sat, 06/27/2026 - 22:12

Basically what fr6_17 said but using a tamable mob for easier implementation:

part 1
Create your custom entity:
AI and goals: make the entity an animal type and make sure to add your foods and the ability for your entity to be tamed.
Triggers: [On entity tick update] use our tick procedure. 

For the tick procedure, just follow the image instructions:
You may omit the yaw, pitch, vx, vy, and vz, but the results will be less smooth.


Here's a procedure I made for replacing spawned mobs into their wild counterparts:

part 2
For the tick procedure, just follow the image instructions:
You may omit the yaw, pitch, vx, vy, and vz, but the results will be less smooth.
You can also just duplicate this to work for other mobs. If you choose to do so, you can have all of them work inside of the same procedure.