mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-28 23:38:25 +01:00
Move block farther away for Player#setRotation (#8514)
This commit is contained in:
parent
3621d76d8f
commit
ccb194bbbb
8 changed files with 17 additions and 16 deletions
|
@ -74,10 +74,10 @@ index 8317d5100d16fb242e4ff9f7b965e1dbd147cede..14b97388b89978b1c0997beeebd7c851
|
|||
// Let the server handle cross world teleports
|
||||
if (location.getWorld() != null && !location.getWorld().equals(this.getWorld())) {
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
index 6373c2df3acd6dcae321e9914bea7a6beaa51c5d..e21efd74f8989f00c65c78b2963238aa822f129e 100644
|
||||
index 6373c2df3acd6dcae321e9914bea7a6beaa51c5d..752d701d6e947e9ed446c8679ce6d8d12a2dc82c 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
@@ -1233,13 +1233,100 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
@@ -1233,13 +1233,101 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
|
||||
@Override
|
||||
public void setRotation(float yaw, float pitch) {
|
||||
|
@ -88,6 +88,7 @@ index 6373c2df3acd6dcae321e9914bea7a6beaa51c5d..e21efd74f8989f00c65c78b2963238aa
|
|||
+ targetLocation.setPitch(pitch);
|
||||
+
|
||||
+ org.bukkit.util.Vector direction = targetLocation.getDirection();
|
||||
+ direction.multiply(9999999); // We need to move the target block.. FAR out
|
||||
+ targetLocation.add(direction);
|
||||
+ this.lookAt(targetLocation, io.papermc.paper.entity.LookAnchor.EYES);
|
||||
+ // Paper end
|
||||
|
@ -179,7 +180,7 @@ index 6373c2df3acd6dcae321e9914bea7a6beaa51c5d..e21efd74f8989f00c65c78b2963238aa
|
|||
location.checkFinite();
|
||||
|
||||
ServerPlayer entity = this.getHandle();
|
||||
@@ -1252,7 +1339,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
@@ -1252,7 +1340,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -188,7 +189,7 @@ index 6373c2df3acd6dcae321e9914bea7a6beaa51c5d..e21efd74f8989f00c65c78b2963238aa
|
|||
return false;
|
||||
}
|
||||
|
||||
@@ -1270,7 +1357,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
@@ -1270,7 +1358,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
}
|
||||
|
||||
// If this player is riding another entity, we must dismount before teleporting.
|
||||
|
@ -197,7 +198,7 @@ index 6373c2df3acd6dcae321e9914bea7a6beaa51c5d..e21efd74f8989f00c65c78b2963238aa
|
|||
|
||||
// SPIGOT-5509: Wakeup, similar to riding
|
||||
if (this.isSleeping()) {
|
||||
@@ -1286,13 +1373,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
@@ -1286,13 +1374,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
ServerLevel toWorld = ((CraftWorld) to.getWorld()).getHandle();
|
||||
|
||||
// Close any foreign inventory
|
||||
|
|
|
@ -5,7 +5,7 @@ Subject: [PATCH] Custom Chat Completion Suggestions API
|
|||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
index e21efd74f8989f00c65c78b2963238aa822f129e..2fa044c3433c8c8a8d23f076e1c2e9f4786282ed 100644
|
||||
index 752d701d6e947e9ed446c8679ce6d8d12a2dc82c..27b8dffd5ba6bae22a8a12544d65a00f43394765 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
@@ -642,6 +642,22 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
|
|
|
@ -5,10 +5,10 @@ Subject: [PATCH] Elder Guardian appearance API
|
|||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
index 2fa044c3433c8c8a8d23f076e1c2e9f4786282ed..8ad996a3da13d1c98c892a65d1e02459b422a2eb 100644
|
||||
index 27b8dffd5ba6bae22a8a12544d65a00f43394765..6c452b97429930ff3033d8cb74632923e12de2e3 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
@@ -3108,6 +3108,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
@@ -3109,6 +3109,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
}
|
||||
// Paper end
|
||||
|
||||
|
|
|
@ -10,10 +10,10 @@ public net.minecraft.world.entity.monster.warden.WardenSpawnTracker cooldownTick
|
|||
public net.minecraft.world.entity.monster.warden.WardenSpawnTracker increaseWarningLevel()V
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
index 8ad996a3da13d1c98c892a65d1e02459b422a2eb..6613c04d1812f89fc91dfe16020577ce8dc34703 100644
|
||||
index 6c452b97429930ff3033d8cb74632923e12de2e3..151788d379000ee4d3f5d1d51c014da8e8cd21a5 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
@@ -3113,6 +3113,41 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
@@ -3114,6 +3114,41 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
public void showElderGuardian(boolean silent) {
|
||||
if (getHandle().connection != null) getHandle().connection.send(new ClientboundGameEventPacket(ClientboundGameEventPacket.GUARDIAN_ELDER_EFFECT, silent ? 0F : 1F));
|
||||
}
|
||||
|
|
|
@ -6,7 +6,7 @@ Subject: [PATCH] fix Instruments
|
|||
properly handle Player#playNote
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
index 6613c04d1812f89fc91dfe16020577ce8dc34703..6f0ad2bc2abacf7dd6309eca24694dc2e6f06819 100644
|
||||
index 151788d379000ee4d3f5d1d51c014da8e8cd21a5..3fa3e0bd52bf2f3135f189629a4bd43ad6248fe2 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
@@ -744,62 +744,18 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
|
|
|
@ -26,10 +26,10 @@ index 53487f0a4fe672298c3b83d24a2a603641afcde8..58152160d609d0e9d105153aeb166a56
|
|||
} else {
|
||||
if (fallDistance >= 2.0F) {
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
index 6f0ad2bc2abacf7dd6309eca24694dc2e6f06819..c90c92139277ee95edd5f8ed19d1bb5edc58be9f 100644
|
||||
index 3fa3e0bd52bf2f3135f189629a4bd43ad6248fe2..75f4531222016a8639920ab25f0378c11a62a1f6 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
@@ -2303,6 +2303,19 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
@@ -2304,6 +2304,19 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
this.getHandle().onUpdateAbilities();
|
||||
}
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@ Subject: [PATCH] Win Screen API
|
|||
public net.minecraft.server.level.ServerPlayer seenCredits
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
index c90c92139277ee95edd5f8ed19d1bb5edc58be9f..2eba253e58018ea7ee137cb8e902ed237360019d 100644
|
||||
index 75f4531222016a8639920ab25f0378c11a62a1f6..991f3f947810ebd7e4f2c51a4012115fee8a34ec 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
@@ -1203,6 +1203,25 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
|
|
|
@ -33,10 +33,10 @@ index 000c13afc6bb3acb68b9adcaeefb7bb1cb703702..673327af0f77aeac0d704b0fb6bebebc
|
|||
return k > 0 ? this.repairPlayerItems(player, k) : 0;
|
||||
} else {
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
index 2eba253e58018ea7ee137cb8e902ed237360019d..be933acd3004e7e092be3688d0d9ee97b159ab5a 100644
|
||||
index 991f3f947810ebd7e4f2c51a4012115fee8a34ec..548eddde8b0558b780f672d321507cfcbac92558 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
@@ -1673,11 +1673,11 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
@@ -1674,11 +1674,11 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
orb.setPosRaw(handle.getX(), handle.getY(), handle.getZ());
|
||||
|
||||
int i = Math.min(orb.xpToDurability(amount), itemstack.getDamageValue());
|
||||
|
|
Loading…
Reference in a new issue