mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2024-10-06 11:27:31 +02:00
Horse protection
This commit is contained in:
parent
56fe2bb453
commit
11df61f74d
@ -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()) {
|
||||
|
Loading…
Reference in New Issue
Block a user