Skip to content

Commit

Permalink
Set wolf step height to 1
Browse files Browse the repository at this point in the history
  • Loading branch information
fullwall committed Jan 12, 2014
1 parent 533b4e1 commit 5d5cda3
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions src/main/java/net/citizensnpcs/npc/entity/WolfController.java
Expand Up @@ -73,6 +73,7 @@ public boolean bL() {
public void bn() {
super.bn();
if (npc != null) {
NMS.setStepHeight(this, 1);
npc.update();
}
}
Expand All @@ -82,16 +83,8 @@ public void collide(net.minecraft.server.v1_7_R1.Entity entity) {
// this method is called by both the entities involved - cancelling
// it will not stop the NPC from moving.
super.collide(entity);
if (npc != null)
if (npc != null) {
Util.callCollisionEvent(npc, entity.getBukkitEntity());
}

@Override
public boolean h_() {
if (npc == null || !npc.isFlyable()) {
return super.h_();
} else {
return false;
}
}

Expand Down Expand Up @@ -137,6 +130,15 @@ public CraftEntity getBukkitEntity() {
public NPC getNPC() {
return npc;
}

@Override
public boolean h_() {
if (npc == null || !npc.isFlyable()) {
return super.h_();
} else {
return false;
}
}
}

public static class WolfNPC extends CraftWolf implements NPCHolder {
Expand Down

0 comments on commit 5d5cda3

Please sign in to comment.