mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-28 07:20:24 +01:00
Use target pitch in teleport (generally the same thing)
This commit is contained in:
parent
7dc7d6ef96
commit
46b5013fc3
1 changed files with 1 additions and 3 deletions
|
@ -12,12 +12,10 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
if (!this.isRemoved()) {
|
||||
// CraftBukkit start
|
||||
PositionMoveRotation absolutePosition = PositionMoveRotation.calculateAbsolute(PositionMoveRotation.of(this), PositionMoveRotation.of(teleportTarget), teleportTarget.relatives());
|
||||
- Location to = CraftLocation.toBukkit(absolutePosition.position(), teleportTarget.newLevel().getWorld(), absolutePosition.yRot(), absolutePosition.xRot());
|
||||
+ Vec3 velocity = absolutePosition.deltaMovement(); // Paper
|
||||
+ Location to = CraftLocation.toBukkit(absolutePosition.position(), teleportTarget.newLevel().getWorld(), absolutePosition.yRot(), this.getXRot()); // Paper - use getXRot (doesn't respect DimensionTransition pitch) // Why?
|
||||
Location to = CraftLocation.toBukkit(absolutePosition.position(), teleportTarget.newLevel().getWorld(), absolutePosition.yRot(), absolutePosition.xRot());
|
||||
// Paper start - gateway-specific teleport event
|
||||
final EntityTeleportEvent teleEvent;
|
||||
if (this.portalProcess != null && this.portalProcess.isSamePortal(((net.minecraft.world.level.block.EndGatewayBlock) net.minecraft.world.level.block.Blocks.END_GATEWAY)) && this.level.getBlockEntity(this.portalProcess.getEntryPosition()) instanceof net.minecraft.world.level.block.entity.TheEndGatewayBlockEntity theEndGatewayBlockEntity) {
|
||||
@@ -0,0 +0,0 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
if (!to.equals(teleEvent.getTo())) {
|
||||
to = teleEvent.getTo();
|
||||
|
|
Loading…
Reference in a new issue