From ab309d78c687f70b0e2c05cd2179cecb82d44cb4 Mon Sep 17 00:00:00 2001 From: Thinkofdeath Date: Thu, 16 Apr 2015 21:23:26 +0100 Subject: [PATCH] Fix NPE that could happen on teleporting --- nms-patches/PortalTravelAgent.patch | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/nms-patches/PortalTravelAgent.patch b/nms-patches/PortalTravelAgent.patch index 43fa3a29c2..a955a31795 100644 --- a/nms-patches/PortalTravelAgent.patch +++ b/nms-patches/PortalTravelAgent.patch @@ -1,5 +1,5 @@ ---- /home/matt/mc-dev-private//net/minecraft/server/PortalTravelAgent.java 2015-03-04 09:48:49.303820658 +0000 -+++ src/main/java/net/minecraft/server/PortalTravelAgent.java 2015-03-04 09:48:49.311820658 +0000 +--- /home/matt/mc-dev-private//net/minecraft/server/PortalTravelAgent.java 2015-04-16 21:22:47.467439143 +0100 ++++ src/main/java/net/minecraft/server/PortalTravelAgent.java 2015-04-16 21:22:47.471439143 +0100 @@ -5,6 +5,12 @@ import java.util.List; import java.util.Random; @@ -129,7 +129,7 @@ + BlockPosition object = new BlockPosition(position.getBlockX(), position.getBlockY(), position.getBlockZ()); + float f = position.getYaw(); + -+ if (this.a.getWorld().getEnvironment() == org.bukkit.World.Environment.THE_END || entity.getBukkitEntity().getWorld().getEnvironment() == org.bukkit.World.Environment.THE_END) { ++ if (this.a.getWorld().getEnvironment() == org.bukkit.World.Environment.THE_END || entity.getBukkitEntity().getWorld().getEnvironment() == org.bukkit.World.Environment.THE_END || entity.aG() == null) { + // entity.setPositionRotation((double) i, (double) j, (double) k, entity.yaw, 0.0F); + // entity.motX = entity.motY = entity.motZ = 0.0D; + position.setPitch(0.0F);