More Behavior Toggle Abilty #17


  • Enhancment
  • Started
Open
Assigned to _ForgeUser9840713
  • _ForgeUser9709086 created this issue Nov 19, 2013

    A follow up to my last enhancement request. (I requested the door opening first because that was a priority for me)

    There's a good number of different behaviors for each mob type, and the more they can be manipulated the better. Basically I would like the same treatment as the "open doors" behavior, but for as many behaviors in as many mobs as you can. (I'm particularly interested in the behaviors of villagers)
    Cross-compatibility of behaviors between mobs would also be great. Such as being able to give pigs melee attacks like zombies, or allow creepers to teleport like endermen.

  • _ForgeUser9709086 added the tags New Enhancment Nov 19, 2013
  • _ForgeUser9840713 posted a comment Nov 19, 2013

    Well, making more behaviors controllable means a lot of work for me! And since I have a lot of other projects at the moment, it would be beneficial if you specify exactly which behaviors are needed. Villagers are a good place to start, but they've got a lot of behaviors:

    this.goalSelector.a(0, new PathfinderGoalFloat(this));
    this.goalSelector.a(1, new PathfinderGoalAvoidPlayer(this, EntityZombie.class, 8.0F, 0.6D, 0.6D));
    this.goalSelector.a(1, new PathfinderGoalTradeWithPlayer(this));
    this.goalSelector.a(1, new PathfinderGoalLookAtTradingPlayer(this));
    this.goalSelector.a(2, new PathfinderGoalMoveIndoors(this));
    this.goalSelector.a(3, new PathfinderGoalRestrictOpenDoor(this));
    this.goalSelector.a(4, new PathfinderGoalOpenDoor(this, true));
    this.goalSelector.a(5, new PathfinderGoalMoveTowardsRestriction(this, 0.6D));
    this.goalSelector.a(6, new PathfinderGoalMakeLove(this));
    this.goalSelector.a(7, new PathfinderGoalTakeFlower(this));
    this.goalSelector.a(8, new PathfinderGoalPlay(this, 0.32D));
    this.goalSelector.a(9, new PathfinderGoalInteract(this, EntityHuman.class, 3.0F, 1.0F));
    this.goalSelector.a(9, new PathfinderGoalInteract(this, EntityVillager.class, 5.0F, 0.02F));
    this.goalSelector.a(9, new PathfinderGoalRandomStroll(this, 0.6D));
    this.goalSelector.a(10, new PathfinderGoalLookAtPlayer(this, EntityInsentient.class, 8.0F));
    

    (copied from nms code)

    Giving entities abilities they usually don't have is causing even more troubles, since they are mostly missing implementation to perform these abilities (for example, the Melee attack is restricted to Creature entity classes, workarounds will only work when rewriting the whole thing for all entities)

  • _ForgeUser9840713 removed a tag New Nov 19, 2013
  • _ForgeUser9840713 added a tag Waiting Nov 19, 2013
  • _ForgeUser9709086 posted a comment Nov 20, 2013

    Well, another behavior I am particularly interested in is TradeWithPlayer, but (even if it's a workaround) being able to make non-attacking mobs able to attack would make writing my plugin a lot easier.

  • _ForgeUser9709086 removed a tag Waiting Nov 20, 2013
  • _ForgeUser9709086 added a tag Replied Nov 20, 2013
  • _ForgeUser9840713 removed a tag Replied Nov 22, 2013
  • _ForgeUser9840713 added a tag Accepted Nov 22, 2013
  • _ForgeUser9840713 removed a tag Accepted Dec 28, 2013
  • _ForgeUser9840713 added a tag Started Dec 28, 2013

To post a comment, please login or register a new account.