Solved Custom Mob Not "/kill"able

Discussion in 'Plugin Development' started by mine2012craft, Sep 17, 2017.

Thread Status:
Not open for further replies.
  1. Offline

    mine2012craft

    Hello,

    So, I've created a custom mob with the desired AI that I needed. The problem is that I can't /kill it, or spawn the normal entity with a spawn egg or /summon.

    Here is the AI code:

    Code:
        @SuppressWarnings({ "rawtypes", "unchecked" })
        public AggressiveCaveSpider(World world, Location loc) {
            super(((CraftWorld)world).getHandle());
            Set goalB = (Set) getPrivateField("b", PathfinderGoalSelector.class, goalSelector); goalB.clear();
            Set goalC = (Set) getPrivateField("c", PathfinderGoalSelector.class, goalSelector); goalC.clear();
            Set targetB = (Set) getPrivateField("b", PathfinderGoalSelector.class, targetSelector); targetB.clear();
            Set targetC = (Set) getPrivateField("c", PathfinderGoalSelector.class, targetSelector); targetC.clear();   
            this.goalSelector.a(0, new PathfinderGoalFloat(this));
            this.targetSelector.a(1, new PathfinderGoalHurtByTarget(this, true));
            this.targetSelector.a(2, new PathfinderGoalNearestAttackableTarget(this, EntityHuman.class, true));
            this.goalSelector.a(4, new PathfinderGoalMeleeAttack(this, 1, false));
            this.goalSelector.a(7, new PathfinderGoalRandomStroll(this, 1D));
            this.goalSelector.a(8, new PathfinderGoalRandomLookaround(this));       
        }
    Do I need to add another PathfinderGoal or create a method for it?

    Thank you,
    WarlordWeaponry
     
  2. Offline

    ZachPro

  3. Offline

    mine2012craft

    Ah, ok I got it now. Thanks for helping anyway.
     
Thread Status:
Not open for further replies.

Share This Page