Paper 1.9.4 Update
This commit is contained in:
@@ -12,19 +12,19 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
}
|
||||
|
||||
public boolean a(Entity entity, boolean flag) {
|
||||
+ return this.a(entity, flag, false); // Paper
|
||||
+ return this.mountEntity(entity, flag, false); // Paper - forward
|
||||
+ }
|
||||
+
|
||||
+ public boolean a(Entity entity, boolean flag, boolean suppressEvents) { // Paper - Add suppress
|
||||
+ public boolean mountEntity(Entity entity, boolean flag, boolean suppressEvents) { // Paper
|
||||
if (!flag && (!this.n(entity) || !entity.q(this))) {
|
||||
return false;
|
||||
} else {
|
||||
@@ -0,0 +0,0 @@ public abstract class Entity implements ICommandListener {
|
||||
}
|
||||
|
||||
this.as = entity;
|
||||
- this.as.o(this);
|
||||
+ this.as.addRider(this, suppressEvents); // Paper
|
||||
this.at = entity;
|
||||
- this.at.o(this);
|
||||
+ this.at.addRider(this, suppressEvents); // Paper
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -38,7 +38,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+
|
||||
+ private void addRider(Entity entity, boolean suppressEvents) {
|
||||
+ // Paper end
|
||||
if (entity.by() != this) {
|
||||
if (entity.bz() != this) {
|
||||
throw new IllegalStateException("Use x.startRiding(y), not y.addPassenger(x)");
|
||||
} else {
|
||||
// CraftBukkit start
|
||||
@@ -55,7 +55,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
// Spigot end
|
||||
+ // =============================================================
|
||||
+ } // Paper - end suppressible block
|
||||
if (!this.world.isClientSide && entity instanceof EntityHuman && !(this.bt() instanceof EntityHuman)) {
|
||||
if (!this.world.isClientSide && entity instanceof EntityHuman && !(this.bu() instanceof EntityHuman)) {
|
||||
this.passengers.add(0, entity);
|
||||
} else {
|
||||
@@ -0,0 +0,0 @@ public abstract class Entity implements ICommandListener {
|
||||
@@ -82,11 +82,11 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ // Paper start
|
||||
+ private void cancelDismount(Entity dismounter) {
|
||||
+ this.passengers.remove(dismounter);
|
||||
+ dismounter.a(this, false, true);
|
||||
+ dismounter.mountEntity(this, false, true);
|
||||
+ }
|
||||
+ // Paper end
|
||||
+
|
||||
protected boolean q(Entity entity) {
|
||||
return this.bu().size() < 1;
|
||||
return this.bv().size() < 1;
|
||||
}
|
||||
--
|
||||
Reference in New Issue
Block a user