summaryrefslogtreecommitdiffstats
path: root/nms-patches/EntityMinecartAbstract.patch
diff options
context:
space:
mode:
Diffstat (limited to 'nms-patches/EntityMinecartAbstract.patch')
-rw-r--r--nms-patches/EntityMinecartAbstract.patch18
1 files changed, 9 insertions, 9 deletions
diff --git a/nms-patches/EntityMinecartAbstract.patch b/nms-patches/EntityMinecartAbstract.patch
index 76880d8e..db2ba15a 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-04-13 11:54:43.295977016 +0100
-+++ src/main/java/net/minecraft/server/EntityMinecartAbstract.java 2015-04-13 11:54:43.295977016 +0100
+--- /home/matt/mc-dev-private//net/minecraft/server/EntityMinecartAbstract.java 2015-04-13 12:01:38.387967804 +0100
++++ src/main/java/net/minecraft/server/EntityMinecartAbstract.java 2015-04-13 12:01:38.391967804 +0100
@@ -4,6 +4,15 @@
import java.util.Iterator;
import java.util.Map;
@@ -63,10 +63,10 @@
this.k(-this.r());
this.j(10);
this.ac();
-@@ -102,6 +137,15 @@
- if (this.passenger != null) {
- this.passenger.mount((Entity) null);
- }
+@@ -99,6 +134,15 @@
+ boolean flag = damagesource.getEntity() instanceof EntityHuman && ((EntityHuman) damagesource.getEntity()).abilities.canInstantlyBuild;
+
+ if (flag || this.getDamage() > 40.0F) {
+ // CraftBukkit start
+ VehicleDestroyEvent destroyEvent = new VehicleDestroyEvent(vehicle, passenger);
+ this.world.getServer().getPluginManager().callEvent(destroyEvent);
@@ -76,9 +76,9 @@
+ return true;
+ }
+ // CraftBukkit end
-
- if (flag && !this.hasCustomName()) {
- this.die();
+ if (this.passenger != null) {
+ this.passenger.mount((Entity) null);
+ }
@@ -140,6 +184,14 @@
}