Help with taming/making a mob not hostile.

Started by legoboomer on Tue, 08/13/2019 - 17:23

Topic category: Help with MCreator modding

Last seen on 14:26, 21. Sep 2019
Joined Jul 2019
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
Help with taming/making a mob not hostile.
Tue, 08/13/2019 - 17:23

So I'm trying to make a feature where you can feed an item to a hostile mob to make them no longer hostile for a little bit, or maybe while you are holding the item.  I tried to make a onrightclick event that tests for the item in a entity main or off hand and then gives the entity weakness 9999 (to make them not do damage).  The item detection does work, but it gives the player weakness.  I was wondering if there was a way to test for what the player is holding and make a mob no longer deal damage (preferably not using actual java coding).