Skip to content

Commit

Permalink
Horse protection
Browse files Browse the repository at this point in the history
  • Loading branch information
fullwall committed Oct 24, 2015
1 parent 07d0d34 commit b487567
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,13 @@ public void a(boolean flag) {
}
}

@Override
public boolean cp() {
if (npc == null) return super.cp();
boolean protectedDefault = npc.data().get(NPC.DEFAULT_PROTECTED_METADATA, true);
return super.cp() && !protectedDefault;
}

@Override
protected void a(double d0, boolean flag, Block block, BlockPosition blockposition) {
if (npc == null || !npc.isFlyable()) {
Expand Down

0 comments on commit b487567

Please sign in to comment.