fix recursion for leashing an abstract horse
This commit is contained in:
@@ -29,7 +29,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
|
|
||||||
+ // Paper start
|
+ // Paper start
|
||||||
+ @Override
|
+ @Override
|
||||||
+ public boolean canLeash(EntityHuman entityhuman) {
|
+ public boolean a(EntityHuman entityhuman) {
|
||||||
+ return world.paperConfig.allowLeashingUndeadHorse ? super.a(entityhuman) : super.a(entityhuman) && this.getMonsterType() != EnumMonsterType.UNDEAD; // Paper
|
+ return world.paperConfig.allowLeashingUndeadHorse ? super.a(entityhuman) : super.a(entityhuman) && this.getMonsterType() != EnumMonsterType.UNDEAD; // Paper
|
||||||
+ }
|
+ }
|
||||||
+ // Paper end
|
+ // Paper end
|
||||||
@@ -42,14 +42,11 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
--- a/src/main/java/net/minecraft/server/EntityInsentient.java
|
--- a/src/main/java/net/minecraft/server/EntityInsentient.java
|
||||||
+++ b/src/main/java/net/minecraft/server/EntityInsentient.java
|
+++ b/src/main/java/net/minecraft/server/EntityInsentient.java
|
||||||
@@ -0,0 +0,0 @@ public abstract class EntityInsentient extends EntityLiving {
|
@@ -0,0 +0,0 @@ public abstract class EntityInsentient extends EntityLiving {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean a(EntityHuman entityhuman) {
|
- public boolean a(EntityHuman entityhuman) {
|
||||||
+ // Paper start - allow overriding
|
+ public boolean a(EntityHuman entityhuman) { // Paper - overriden in EntityHorseAbstract
|
||||||
+ return this.canLeash(entityhuman);
|
|
||||||
+ }
|
|
||||||
+ public boolean canLeash(EntityHuman entityhuman) {
|
|
||||||
+ // Paper end - allow overriding
|
|
||||||
return !this.isLeashed() && !(this instanceof IMonster);
|
return !this.isLeashed() && !(this instanceof IMonster);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user