Started by
chigen123
on
Topic category: Help with MCreator software
I’m trying to write a procedure so that effects are applied when an item is held in the offhand, but it doesn’t work and says that I need to resolve the dependency of “entity”. I’m very new to this software, and I was wondering if anyone could help.
The current code is:
if item in off-hand of event/target entity=golden seed
do
Add potion slow_falling with level 1 for 60 ticks to event/target entity
Add potion weakness with level 1 for 60 ticks to event/target entity
You can use event/target entity to target the player. If it says it can't resolve the dependency of 'entity,' it means the trigger you're using doesn't provide an entity, or you changed the procedure to require an entity when it originally didn't. This problem can come up a lot if you're using lots of locked procedures or procedures calling each other, since you have to make sure you're always using a trigger that provides everything the procedure needs to run. (Again, in this case, one of your procedures apparently isn't being provided an entity to target, but references one in the code.)
Just make sure your procedure is either being run through the item-in-inventory tick trigger, or uses the global 'on player update tick' trigger, as both of these provide the player as the event/target entity.
If it's still not working, I can send you a screenshot of an example procedure. (If it'll help.)
Thank you! I didn’t know how to set the trigger, so that helps out a lot and the mod is working now.