summaryrefslogtreecommitdiffstats
path: root/nms-patches/EntityMinecartAbstract.patch
diff options
context:
space:
mode:
authormd_5 <git@md-5.net>2017-03-15 20:48:47 +1100
committermd_5 <git@md-5.net>2017-03-15 20:48:47 +1100
commit2aa5ac6c92a0e53ae917cae348d662d014ef9366 (patch)
treeef8c8aff58994d9a2c187864496c7c5689260737 /nms-patches/EntityMinecartAbstract.patch
parent251e4c9215141e01df87308c2faec3bf2e1e9460 (diff)
downloadcraftbukkit-2aa5ac6c92a0e53ae917cae348d662d014ef9366.tar
craftbukkit-2aa5ac6c92a0e53ae917cae348d662d014ef9366.tar.gz
craftbukkit-2aa5ac6c92a0e53ae917cae348d662d014ef9366.tar.lz
craftbukkit-2aa5ac6c92a0e53ae917cae348d662d014ef9366.tar.xz
craftbukkit-2aa5ac6c92a0e53ae917cae348d662d014ef9366.zip
SPIGOT-3128: Shift VehicleCreateEvent calling.
Diffstat (limited to 'nms-patches/EntityMinecartAbstract.patch')
-rw-r--r--nms-patches/EntityMinecartAbstract.patch31
1 files changed, 11 insertions, 20 deletions
diff --git a/nms-patches/EntityMinecartAbstract.patch b/nms-patches/EntityMinecartAbstract.patch
index e7b2a9ad..2760942b 100644
--- a/nms-patches/EntityMinecartAbstract.patch
+++ b/nms-patches/EntityMinecartAbstract.patch
@@ -34,16 +34,7 @@
public EntityMinecartAbstract(World world) {
super(world);
this.i = true;
-@@ -90,6 +110,8 @@
- this.lastX = d0;
- this.lastY = d1;
- this.lastZ = d2;
-+
-+ this.world.getServer().getPluginManager().callEvent(new org.bukkit.event.vehicle.VehicleCreateEvent((Vehicle) this.getBukkitEntity())); // CraftBukkit
- }
-
- public double ay() {
-@@ -101,6 +123,19 @@
+@@ -101,6 +121,19 @@
if (this.isInvulnerable(damagesource)) {
return false;
} else {
@@ -63,7 +54,7 @@
this.e(-this.u());
this.d(10);
this.ap();
-@@ -108,6 +143,15 @@
+@@ -108,6 +141,15 @@
boolean flag = damagesource.getEntity() instanceof EntityHuman && ((EntityHuman) damagesource.getEntity()).abilities.canInstantlyBuild;
if (flag || this.getDamage() > 40.0F) {
@@ -79,7 +70,7 @@
this.az();
if (flag && !this.hasCustomName()) {
this.die();
-@@ -146,6 +190,14 @@
+@@ -146,6 +188,14 @@
}
public void A_() {
@@ -94,7 +85,7 @@
if (this.getType() > 0) {
this.d(this.getType() - 1);
}
-@@ -166,7 +218,7 @@
+@@ -166,7 +216,7 @@
i = this.V();
if (this.ak) {
@@ -103,7 +94,7 @@
if (!this.isPassenger() && this.al++ >= i) {
this.al = i;
this.portalCooldown = this.aE();
-@@ -266,6 +318,18 @@
+@@ -266,6 +316,18 @@
}
this.setYawPitch(this.yaw, this.pitch);
@@ -122,7 +113,7 @@
if (this.v() == EntityMinecartAbstract.EnumMinecartType.RIDEABLE && this.motX * this.motX + this.motZ * this.motZ > 0.01D) {
List list = this.world.getEntities(this, this.getBoundingBox().grow(0.20000000298023224D, 0.0D, 0.20000000298023224D), IEntitySelector.a(this));
-@@ -274,8 +338,24 @@
+@@ -274,8 +336,24 @@
Entity entity = (Entity) list.get(l);
if (!(entity instanceof EntityHuman) && !(entity instanceof EntityIronGolem) && !(entity instanceof EntityMinecartAbstract) && !this.isVehicle() && !entity.isPassenger()) {
@@ -147,7 +138,7 @@
entity.collide(this);
}
}
-@@ -287,6 +367,14 @@
+@@ -287,6 +365,14 @@
Entity entity1 = (Entity) iterator.next();
if (!this.w(entity1) && entity1.isCollidable() && entity1 instanceof EntityMinecartAbstract) {
@@ -162,7 +153,7 @@
entity1.collide(this);
}
}
-@@ -297,7 +385,7 @@
+@@ -297,7 +383,7 @@
}
protected double o() {
@@ -171,7 +162,7 @@
}
public void a(int i, int j, int k, boolean flag) {}
-@@ -308,16 +396,20 @@
+@@ -308,16 +394,20 @@
this.motX = MathHelper.a(this.motX, -d0, d0);
this.motZ = MathHelper.a(this.motZ, -d0, d0);
if (this.onGround) {
@@ -198,7 +189,7 @@
}
}
-@@ -505,7 +597,7 @@
+@@ -505,7 +595,7 @@
}
protected void r() {
@@ -207,7 +198,7 @@
this.motX *= 0.996999979019165D;
this.motY *= 0.0D;
this.motZ *= 0.996999979019165D;
-@@ -780,4 +872,26 @@
+@@ -780,4 +870,26 @@
}
}