geforkt von Mirrors/Paper
9df2066642
Upstream has released updates that appear to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing Bukkit Changes: dfe1fb48 PR-906: Add missing MinecraftExperimental annotation to Bundles 825ab30d PR-905: Add missing MapCursor.Type and update documentation e03d10e6 PR-903: Make BARRIER Waterlogged 1961ead6 PR-898: Use Java Consumer instead of Bukkit Consumer CraftBukkit Changes: f71a799f0 Make BARRIER Waterlogged 172f76a45 Upgrade specialsource-maven-plugin f0702775c SPIGOT-7486: Alternate approach to null profile names 069495671 SPIGOT-7485: Allow air entity items since required for Vanilla logic 5dfd33dc2 SPIGOT-7484: Cancelling PlayerEditBookEvent does not update client's book contents 02d490788 PR-1250: Standardize and centralize Bukkit / Minecraft registry conversion 9024a09b9 PR-1251: Use Java Consumer instead of Bukkit Consumer 6d4b25bf1 Increase diff stability
52 Zeilen
2.3 KiB
Diff
52 Zeilen
2.3 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: SoSeDiK <mrsosedik@gmail.com>
|
|
Date: Wed, 11 Jan 2023 20:59:01 +0200
|
|
Subject: [PATCH] Expand Pose API
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
|
index 426023af3cbed9c17048e669c87a1c66bda4ad1b..f20ae9153b7098980ce6c0e75fcbbb4da652661b 100644
|
|
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
|
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
|
@@ -416,6 +416,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
|
private UUID originWorld;
|
|
public boolean freezeLocked = false; // Paper - Freeze Tick Lock API
|
|
public boolean collidingWithWorldBorder; // Paper
|
|
+ public boolean fixedPose = false; // Paper
|
|
|
|
public void setOrigin(@javax.annotation.Nonnull Location location) {
|
|
this.origin = location.toVector();
|
|
@@ -668,6 +669,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
|
public void onClientRemoval() {}
|
|
|
|
public void setPose(net.minecraft.world.entity.Pose pose) {
|
|
+ if (this.fixedPose) return; // Paper
|
|
// CraftBukkit start
|
|
if (pose == this.getPose()) {
|
|
return;
|
|
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
|
index bcd25a26bab436504c58edc1f5fb0a0337459464..e932cfac619c30b8c7444a9fa41e0403a6eadf6a 100644
|
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
|
@@ -1226,6 +1226,20 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
|
|
public boolean isSneaking() {
|
|
return this.getHandle().isShiftKeyDown();
|
|
}
|
|
+
|
|
+ @Override
|
|
+ public void setPose(Pose pose, boolean fixed) {
|
|
+ Preconditions.checkNotNull(pose, "Pose cannot be null");
|
|
+ final Entity handle = this.getHandle();
|
|
+ handle.fixedPose = false;
|
|
+ handle.setPose(net.minecraft.world.entity.Pose.values()[pose.ordinal()]);
|
|
+ handle.fixedPose = fixed;
|
|
+ }
|
|
+
|
|
+ @Override
|
|
+ public boolean hasFixedPose() {
|
|
+ return this.getHandle().fixedPose;
|
|
+ }
|
|
// Paper end
|
|
|
|
@Override
|