#NMS Sheep error

1 messages · Page 1 of 1 (latest)

fallen pendant
#
public class Sheep extends EntitySheep  {

    public Sheep(@NotNull Location location, @NotNull Player player, @NotNull Pet pet) {
        super(EntityTypes.ax, ((CraftWorld) Objects.requireNonNull(location.getWorld())).getHandle());
        this.setPosition(location.getX(), location.getY(), location.getZ());
        this.setHealth(20.0f);
        this.ageLocked = true;
        this.setBaby(true);
        this.setCustomNameVisible(true);
        this.setInvulnerable(true);
        this.setGoalTarget(((CraftPlayer)player).getHandle(), EntityTargetEvent.TargetReason.CUSTOM, true);
        pet.setOwnerUUID(player.getUniqueId());
        pet.setOwnUUID(this.getUniqueID());
    }

    @Override
    public void initPathfinder(){
        this.bP.a(1, new PathfinderGoalPet(this, 1.9, 15));
        this.bP.a(0, new PathfinderGoalFloat(this));
        this.bP.a(2, new PathfinderGoalLookAtPlayer(this, EntityHuman.class, 4.0F));


    }

That is the sheep class