mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-09 19:49:35 +01:00
SPIGOT-3864: Protect against suffocation on world change
By: md_5 <git@md-5.net>
This commit is contained in:
parent
6c0f3574b1
commit
ade15e1627
1 changed files with 1 additions and 1 deletions
|
@ -621,7 +621,7 @@
|
|||
+ exitWorld.getTravelAgent().adjustExit(entityplayer, exit, velocity);
|
||||
+
|
||||
+ entityplayer.worldChangeInvuln = true; // CraftBukkit - Set teleport invulnerability only if player changing worlds
|
||||
+ this.moveToWorld(entityplayer, exitWorld.dimension, true, exit, false); // Vanilla doesn't check for suffocation when handling portals, so neither should we
|
||||
+ this.moveToWorld(entityplayer, exitWorld.dimension, true, exit, true); // SPIGOT-3864
|
||||
+ if (entityplayer.motX != velocity.getX() || entityplayer.motY != velocity.getY() || entityplayer.motZ != velocity.getZ()) {
|
||||
+ entityplayer.getBukkitEntity().setVelocity(velocity);
|
||||
+ }
|
||||
|
|
Loading…
Reference in a new issue