mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-17 22:47:34 +01:00
Fix NPE that could happen on teleporting
This commit is contained in:
parent
8e5e4c189b
commit
ab309d78c6
@ -1,5 +1,5 @@
|
|||||||
--- /home/matt/mc-dev-private//net/minecraft/server/PortalTravelAgent.java 2015-03-04 09:48:49.303820658 +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-03-04 09:48:49.311820658 +0000
|
+++ src/main/java/net/minecraft/server/PortalTravelAgent.java 2015-04-16 21:22:47.471439143 +0100
|
||||||
@@ -5,6 +5,12 @@
|
@@ -5,6 +5,12 @@
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Random;
|
import java.util.Random;
|
||||||
@ -129,7 +129,7 @@
|
|||||||
+ BlockPosition object = new BlockPosition(position.getBlockX(), position.getBlockY(), position.getBlockZ());
|
+ BlockPosition object = new BlockPosition(position.getBlockX(), position.getBlockY(), position.getBlockZ());
|
||||||
+ float f = position.getYaw();
|
+ 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.setPositionRotation((double) i, (double) j, (double) k, entity.yaw, 0.0F);
|
||||||
+ // entity.motX = entity.motY = entity.motZ = 0.0D;
|
+ // entity.motX = entity.motY = entity.motZ = 0.0D;
|
||||||
+ position.setPitch(0.0F);
|
+ position.setPitch(0.0F);
|
||||||
|
Loading…
Reference in New Issue
Block a user