More AI task blocks

Published by Goldorion on
Issue description

I searched a little inside the Minecraft code, and I found there are AI goals that aren’t implemented. It will be more interesting to have more AI tasks, to make more complex and different entities. Here is a list with few AI tasks.
- DefendVillage
- OwnerHurtByTarget
- OwnerHurtTarget
- AttackOnCollide
- FollowGollum
- FollowOwner
- LookIdle
- DolphinJump

- LlamaFollowCaravan

I also have the code for the goal FollowParent.

this.goalSelector.addGoal(${customBlockIndex+1}, new FollowParentGoal(this, ${field$speed}));
{
  "message0": "Follow parent with speed %1",
  "args0": [
    {
      "type": "field_number",
      "name": "speed",
      "value": 1.0
    }
  ],
  "inputsInline": true,
  "previousStatement": null,
  "nextStatement": null,
  "colour": 20,
  "mcreator": {
    "toolbox_id": "targettasks",
    "fields": [
      "speed"
    ]
  }
}

(I tested this goal and you can use this code for 1.14.4 and 1.15.2.)

Issue comments

Many of these require specific entity classes that can not be provided, for example, DolphinJumpGoal requires DolphinEntity which custom mobs are not.

I will consider adding ones that are possible, but just a note, this is borderline a feature list which does not belong on the tracker ;)

I could not find AttackOnCollide, probably from 1.12.2? This is now melee attack and supported by AI builder.

I could add FollowParentGoal, but the problem is that this procedure would only work with breedable entities

Follow parent works, others can not be added for the reasons above. Thank you for the suggestions.

[#60671] Added follow parent AI task

Closing, added in 2020.3.

I didn’t know if I had to make one ticket for everything or one ticket for the Follow Parent and a topic for the rest. Otherwise, thanks you for the information and the addition. :)

Yes, the topic would suit better for the rest.

You can try making a plugin for the rest, but use will be limited by the limits I explained in previous comments.