geforkt von Mirrors/Paper
f6969b6374
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: 09b1c123 PR-916: Add more lightning API c085f3de PR-859: Add Entity#getTrackedBy CraftBukkit Changes: 1bf30a4e9 SPIGOT-7495: Spawning bee entity in asynchronous BlockPopulator causes IllegalStateException - Accessing LegacyRandomSource from multiple threads 476c5bccd PR-1267: Add more lightning API 40d5e6c02 PR-1190: Add Entity#getTrackedBy 40d41acc1 SPIGOT-7491: Downgrade bundled SQLite to be updated next release 44b31da38 PR-1264: Load Bukkit class before creating Registry item dc45a6738 SPIGOT-7496: Failure to load datapacks with multiple identical predicates f508657d6 Fix decompile error affecting javac ef7a4743d PR-1265: Ensure UTF-8 used in new test resource Spigot Changes: 224dad51 Rebuild patches
54 Zeilen
2.0 KiB
Diff
54 Zeilen
2.0 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: SoSeDiK <mrsosedik@gmail.com>
|
|
Date: Wed, 11 Jan 2023 20:59:02 +0200
|
|
Subject: [PATCH] Expand Pose API
|
|
|
|
|
|
diff --git a/src/main/java/org/bukkit/entity/Entity.java b/src/main/java/org/bukkit/entity/Entity.java
|
|
index 2177eb74ab50b30b100aa8f35fc1d99b860ea7fd..d340ddcf6924cc834455de3acbbac91ab9c66e39 100644
|
|
--- a/src/main/java/org/bukkit/entity/Entity.java
|
|
+++ b/src/main/java/org/bukkit/entity/Entity.java
|
|
@@ -796,6 +796,42 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent
|
|
* @param sneak true if the entity should be sneaking
|
|
*/
|
|
void setSneaking(boolean sneak);
|
|
+
|
|
+ /**
|
|
+ * Sets the entity's current {@link Pose}.
|
|
+ *
|
|
+ * <p>Note: While poses affect some things like hitboxes, they do not change the entity's state
|
|
+ * (e.g. having {@link Pose#SNEAKING} does not guarantee {@link #isSneaking()} being {@code true}).
|
|
+ *
|
|
+ * <p>If applied to the {@link Player}, they might see a different pose client-side.
|
|
+ *
|
|
+ * @param pose a new {@link Pose}
|
|
+ * @see #setPose(Pose, boolean)
|
|
+ */
|
|
+ default void setPose(@NotNull Pose pose) {
|
|
+ setPose(pose, false);
|
|
+ }
|
|
+
|
|
+ /**
|
|
+ * Sets the entity's current {@link Pose}.
|
|
+ *
|
|
+ * <p>Note: While poses affect some things like hitboxes, they do not change the entity's state
|
|
+ * (e.g. having {@link Pose#SNEAKING} does not guarantee {@link #isSneaking()} being {@code true}).
|
|
+ *
|
|
+ * <p>If applied to the {@link Player}, they might see a different pose client-side.
|
|
+ *
|
|
+ * @param pose a new {@link Pose}
|
|
+ * @param fixed whether the new {@link Pose} should stay until manually changed
|
|
+ */
|
|
+ void setPose(@NotNull Pose pose, boolean fixed);
|
|
+
|
|
+ /**
|
|
+ * Checks whether the entity has a fixed {@link Pose}
|
|
+ *
|
|
+ * @see #setPose(Pose, boolean)
|
|
+ * @return whether the entity has a fixed {@link Pose}
|
|
+ */
|
|
+ boolean hasFixedPose();
|
|
// Paper end
|
|
|
|
/**
|