mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-28 23:38:25 +01:00
fix recursion for leashing an abstract horse
This commit is contained in:
parent
cd6b64113f
commit
a4f75b1ae0
1 changed files with 4 additions and 7 deletions
|
@ -29,7 +29,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
|
||||
+ // Paper start
|
||||
+ @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
|
||||
+ }
|
||||
+ // Paper end
|
||||
|
@ -42,14 +42,11 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
--- a/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 {
|
||||
|
||||
}
|
||||
|
||||
public boolean a(EntityHuman entityhuman) {
|
||||
+ // Paper start - allow overriding
|
||||
+ return this.canLeash(entityhuman);
|
||||
+ }
|
||||
+ public boolean canLeash(EntityHuman entityhuman) {
|
||||
+ // Paper end - allow overriding
|
||||
- public boolean a(EntityHuman entityhuman) {
|
||||
+ public boolean a(EntityHuman entityhuman) { // Paper - overriden in EntityHorseAbstract
|
||||
return !this.isLeashed() && !(this instanceof IMonster);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue