Entity Helps Player

Started by Logdawg940 on Sat, 12/07/2019 - 17:07

Topic category: Help with modding (Java Edition)

Last seen on 23:14, 21. Jul 2020
Joined Jun 2018
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Entity Helps Player
Sat, 12/07/2019 - 17:07

I'm trying to make an entity that summons when the player is below 4 hearts (8 health) and the player has a specific item in their invo. This entity fights off any hostille mobs. It acts sort of like a tamed wolf but it doesn't sit or anything. Please help me try and figure this out.

Last seen on 16:08, 27. Jun 2020
Joined Jan 2019
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Use the "when item in…
Wed, 12/11/2019 - 19:17

Use the "when item in inventory tick" trigger for the specific item.
Procedure:

If entity health < 8
{
    spawn entity <invocation> at X Y Z
    remove 1 <item> from player inventory
}

 

Last seen on 16:08, 27. Jun 2020
Joined Jan 2019
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
About how to make it hostile…
Wed, 12/11/2019 - 19:21

About how to make it hostile, put this block in the mob AI section:

attacks entity <entity>

and replaces <entity> by the entity you want your minion to attack. Add this block again as many as you need different mobs to be targeted. Don't use EntityLiving as the mob will attack everything, including you.

If you want to make it follow you, you should find the block in the "target tasks" tab.

Last seen on 23:14, 21. Jul 2020
Joined Jun 2018
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Thank you!  
Sun, 12/15/2019 - 14:40

Thank you!

 

Last seen on 16:08, 27. Jun 2020
Joined Jan 2019
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
The only flaw with this…
Sun, 12/15/2019 - 20:39

The only flaw with this method is that it'll activate at every tick if you don't heal and if you have summon items left.

I don't know yet how to make a cooldown ;-;

or just try to heal the player in the summon procedure.