Entity Helps Player

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

Topic category: Help with modding

Last seen on 23:07, 26. Jan 2020
Joined Jun 2018
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
  • Tracker tickets:
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.

2Upvote this forum topic
Last seen on 20:19, 24. Jan 2020
Joined Jan 2019
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
  • Tracker tickets:
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
}

 

0Upvote this forum topic
Last seen on 20:19, 24. Jan 2020
Joined Jan 2019
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
  • Tracker tickets:
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.

0Upvote this forum topic
Last seen on 23:07, 26. Jan 2020
Joined Jun 2018
User points:

Statistics:

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

Thank you!

 

0Upvote this forum topic
Last seen on 20:19, 24. Jan 2020
Joined Jan 2019
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
  • Tracker tickets:
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.

0Upvote this forum topic