summaryrefslogtreecommitdiffstats
path: root/nms-patches
diff options
context:
space:
mode:
authormd_5 <git@md-5.net>2018-02-09 18:02:53 +1100
committermd_5 <git@md-5.net>2018-02-09 18:04:44 +1100
commitaa34e9bddd42ce8a58b67fa29c7c1a835a03e5a6 (patch)
treefed50c61f1181d75c188b737eaa050b3eb312319 /nms-patches
parente3b4cf5c282c04edb644a9cf499d021bd76edc9a (diff)
downloadcraftbukkit-aa34e9bddd42ce8a58b67fa29c7c1a835a03e5a6.tar
craftbukkit-aa34e9bddd42ce8a58b67fa29c7c1a835a03e5a6.tar.gz
craftbukkit-aa34e9bddd42ce8a58b67fa29c7c1a835a03e5a6.tar.lz
craftbukkit-aa34e9bddd42ce8a58b67fa29c7c1a835a03e5a6.tar.xz
craftbukkit-aa34e9bddd42ce8a58b67fa29c7c1a835a03e5a6.zip
SPIGOT-3805: Minecart does not teleport through Nether Portal
Diffstat (limited to 'nms-patches')
-rw-r--r--nms-patches/EntityMinecartAbstract.patch40
1 files changed, 24 insertions, 16 deletions
diff --git a/nms-patches/EntityMinecartAbstract.patch b/nms-patches/EntityMinecartAbstract.patch
index 5f5d0706..cff91691 100644
--- a/nms-patches/EntityMinecartAbstract.patch
+++ b/nms-patches/EntityMinecartAbstract.patch
@@ -85,16 +85,24 @@
if (this.getType() > 0) {
this.d(this.getType() - 1);
}
-@@ -166,7 +216,7 @@
-
- i = this.Z();
- if (this.ak) {
-- if (minecraftserver.getAllowNether()) {
-+ if (true || minecraftserver.getAllowNether()) { // CraftBukkit - multi-world should still allow teleport even if default vanilla nether disabled
- if (!this.isPassenger() && this.al++ >= i) {
- this.al = i;
- this.portalCooldown = this.aM();
-@@ -266,6 +316,18 @@
+@@ -160,6 +210,8 @@
+
+ int i;
+
++ // CraftBukkit - handled in postTick
++ /*
+ if (!this.world.isClientSide && this.world instanceof WorldServer) {
+ this.world.methodProfiler.a("portal");
+ MinecraftServer minecraftserver = this.world.getMinecraftServer();
+@@ -199,6 +251,7 @@
+
+ this.world.methodProfiler.b();
+ }
++ */
+
+ if (this.world.isClientSide) {
+ if (this.at > 0) {
+@@ -266,6 +319,18 @@
}
this.setYawPitch(this.yaw, this.pitch);
@@ -113,7 +121,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 +336,24 @@
+@@ -274,8 +339,24 @@
Entity entity = (Entity) list.get(l);
if (!(entity instanceof EntityHuman) && !(entity instanceof EntityIronGolem) && !(entity instanceof EntityMinecartAbstract) && !this.isVehicle() && !entity.isPassenger()) {
@@ -138,7 +146,7 @@
entity.collide(this);
}
}
-@@ -287,6 +365,14 @@
+@@ -287,6 +368,14 @@
Entity entity1 = (Entity) iterator.next();
if (!this.w(entity1) && entity1.isCollidable() && entity1 instanceof EntityMinecartAbstract) {
@@ -153,7 +161,7 @@
entity1.collide(this);
}
}
-@@ -297,7 +383,7 @@
+@@ -297,7 +386,7 @@
}
protected double p() {
@@ -162,7 +170,7 @@
}
public void a(int i, int j, int k, boolean flag) {}
-@@ -308,16 +394,20 @@
+@@ -308,16 +397,20 @@
this.motX = MathHelper.a(this.motX, -d0, d0);
this.motZ = MathHelper.a(this.motZ, -d0, d0);
if (this.onGround) {
@@ -189,7 +197,7 @@
}
}
-@@ -505,7 +595,7 @@
+@@ -505,7 +598,7 @@
}
protected void r() {
@@ -198,7 +206,7 @@
this.motX *= 0.996999979019165D;
this.motY *= 0.0D;
this.motZ *= 0.996999979019165D;
-@@ -780,4 +870,26 @@
+@@ -780,4 +873,26 @@
}
}