Horse protection

This commit is contained in:
fullwall 2015-10-24 15:25:57 +08:00
parent 56fe2bb453
commit 11df61f74d

View File

@ -65,6 +65,13 @@ public class HorseController extends MobEntityController {
}
}
@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()) {