[Solved] Why does my baby pig zombie not attack?

Discussion in 'Community Support' started by malon, Sep 24, 2020.

  1. malon

    malon New Member
    Premium Supporter Supporter

    Joined:
    May 6, 2017
    Messages:
    14
    Likes Received:
    1
    Paper, 1.16.3 build #204

    java version "1.8.0_251"
    Java(TM) SE Runtime Environment (build 1.8.0_251-b08)
    Java HotSpot(TM) 64-Bit Server VM (build 25.251-b08, mixed mode)

    MM Build #3466

    I made a simple game called "The Gauntlet". You kill a mob, when it dies it summons the next one, etc.

    I'll show you a few mobs, the first one works, the last one being the baby pig zombie that doesn't attack, he will wander around neutrally until attacked, then he retaliates properly. This is occurring in the overworld.

    Code:
    GauntVindicator:
    Type:VINDICATOR
    Options:
    Despawn:true
    PreventSunburn:true
    FollowRange:50
    Modules:
    ThreatTable:true
    AIGoalSelectors:
    - 0 clear
    - 1 meleeattack
    Skills:
    - summon{type=GauntWitherSkeleton;amount=1;ctt=true;itt=true;} @trigger ~onDeath
    - command{c="fe grant <trigger.name> 1";asOp=true;} @trigger ~onDeath
    

    Code:
    GauntWitherSkeleton:
    Type:WITHER_SKELETON
    Options:
    Despawn:true
    PreventSunburn:true
    FollowRange:50
    Modules:
    ThreatTable:true
    AIGoalSelectors:
    - 0 clear
    - 1 meleeattack
    Equipment:
    - iron_sword hand
    Skills:
    - summon{type=GauntBabyZombiePigman;amount=1;ctt=true;itt=true;} @trigger ~onDeath
    - command{c="fe grant <trigger.name> 1";asOp=true;} @trigger ~onDeath
    
    Code:
    GauntBabyZombiePigman:
      Type: BABY_PIG_ZOMBIE
      Options:
        Despawn: true
        PreventSunburn: true
        FollowRange: 50
        Angry: true
      Modules:
        ThreatTable: true
      AIGoalSelectors:
      - 0 clear
      - 1 meleeattack
      Skills:
      - summon{type=GauntCaveSpider;amount=1;ctt=true;itt=true;} @trigger ~onDeath
      - command{c="fe grant <trigger.name> 1";asOp=true;} @trigger ~onDeath
    
     
    #1
    Last edited: Sep 24, 2020
  2. EASYgamesSK

    EASYgamesSK Member

    Joined:
    Jun 1, 2019
    Messages:
    55
    Likes Received:
    8
    I see that you already set Angry option to true...
    remake your baby pigman to baby zombie and just disguise it as a baby pigman
     
    #2
  3. malon

    malon New Member
    Premium Supporter Supporter

    Joined:
    May 6, 2017
    Messages:
    14
    Likes Received:
    1
    Is this really necessary? Does the baby pig zombie fundamentally not attack?
     
    #3
  4. malon

    malon New Member
    Premium Supporter Supporter

    Joined:
    May 6, 2017
    Messages:
    14
    Likes Received:
    1
    bumpity bump
     
    #4
  5. Buguser

    Buguser Active Member
    Supporter

    Joined:
    Oct 11, 2016
    Messages:
    287
    Likes Received:
    67
    The mob will need Target Selectors to override the vanilla behavior.
    Code:
      AITargetSelectors:
      - 0 clear
      - 1 players
     
    #5
  6. malon

    malon New Member
    Premium Supporter Supporter

    Joined:
    May 6, 2017
    Messages:
    14
    Likes Received:
    1
    Solved, thank you!
     
    #6
    Buguser likes this.

Share This Page