From 643486f4694adcbb03ea6fab1780af2d6fc57544 Mon Sep 17 00:00:00 2001 From: Thinkofdeath Date: Mon, 13 Apr 2015 11:55:00 +0100 Subject: [PATCH] SPIGOT-694: Fix a mis-placed diff causing the event to fire too early --- nms-patches/EntityBoat.patch | 17 +++++++++-------- nms-patches/EntityMinecartAbstract.patch | 13 ++++++++----- 2 files changed, 17 insertions(+), 13 deletions(-) diff --git a/nms-patches/EntityBoat.patch b/nms-patches/EntityBoat.patch index d8caf34c87..452faea411 100644 --- a/nms-patches/EntityBoat.patch +++ b/nms-patches/EntityBoat.patch @@ -1,5 +1,5 @@ ---- /home/matt/mc-dev-private//net/minecraft/server/EntityBoat.java 2015-02-26 22:40:22.483608141 +0000 -+++ src/main/java/net/minecraft/server/EntityBoat.java 2015-02-26 22:40:22.487608140 +0000 +--- /home/matt/mc-dev-private//net/minecraft/server/EntityBoat.java 2015-04-13 11:54:43.111977020 +0100 ++++ src/main/java/net/minecraft/server/EntityBoat.java 2015-04-13 11:54:43.111977020 +0100 @@ -2,6 +2,16 @@ import java.util.List; @@ -17,7 +17,7 @@ public class EntityBoat extends Entity { private boolean a; -@@ -13,12 +23,35 @@ +@@ -13,6 +23,27 @@ private double g; private double h; @@ -45,14 +45,15 @@ public EntityBoat(World world) { super(world); this.a = true; - this.b = 0.07D; - this.k = true; - this.setSize(1.5F, 0.6F); -+ +@@ -52,6 +83,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 } - protected boolean s_() { + public double an() { @@ -65,6 +98,19 @@ if (this.passenger != null && this.passenger == damagesource.getEntity() && damagesource instanceof EntityDamageSourceIndirect) { return false; diff --git a/nms-patches/EntityMinecartAbstract.patch b/nms-patches/EntityMinecartAbstract.patch index 0efee0f152..76880d8e0a 100644 --- a/nms-patches/EntityMinecartAbstract.patch +++ b/nms-patches/EntityMinecartAbstract.patch @@ -1,5 +1,5 @@ ---- /home/matt/mc-dev-private//net/minecraft/server/EntityMinecartAbstract.java 2015-02-26 22:40:22.623608139 +0000 -+++ src/main/java/net/minecraft/server/EntityMinecartAbstract.java 2015-02-26 22:40:22.623608139 +0000 +--- /home/matt/mc-dev-private//net/minecraft/server/EntityMinecartAbstract.java 2015-04-13 11:54:43.295977016 +0100 ++++ src/main/java/net/minecraft/server/EntityMinecartAbstract.java 2015-04-13 11:54:43.295977016 +0100 @@ -4,6 +4,15 @@ import java.util.Iterator; import java.util.Map; @@ -16,7 +16,7 @@ public abstract class EntityMinecartAbstract extends Entity implements INamableTileEntity { private boolean a; -@@ -16,10 +25,23 @@ +@@ -16,6 +25,17 @@ private double h; private double i; @@ -34,12 +34,15 @@ public EntityMinecartAbstract(World world) { super(world); this.k = true; - this.setSize(0.98F, 0.7F); +@@ -81,6 +101,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 static EntityMinecartAbstract a(World world, double d0, double d1, double d2, EntityMinecartAbstract.EnumMinecartType entityminecartabstract_enumminecarttype) { + public double an() { @@ -92,6 +114,19 @@ if (this.isInvulnerable(damagesource)) { return false;