Started by
Trutty
on
Topic category: Help with MCreator software
Currently trying to make a mob that is hostile if a player's hunger bar is below a certain threshold, but is otherwise neutral (In the same way that spiders do not inherently attack during the day). However, I cannot figure out how to create a neutral mob that is provoked by anything outside of a direct attack/How to go about making that sort of check in general.
Here are two options I can think of,
Option 1: on LivingSetAttackTargetEvent you can check if the target is a player and check the player's food level you get the point. That will look something like this,
Option 2: You said want your mob to kinda be like a spider but with a few exceptions so this is how spider does it :D,
This is also important,
To break this down, the SpiderEntity creates it's own target methods and attack methods. So why not create your own attack methods and target methods. This is actually the "correct" way of doing it so I would do this instead of Option 1. Even though Option 1 seems simpler.