diff options
author | Spottedleaf <[email protected]> | 2023-09-22 15:33:14 -0700 |
---|---|---|
committer | Spottedleaf <[email protected]> | 2023-09-22 15:33:14 -0700 |
commit | ea01aa335a46dd38e8f240f56ed7f5a6a3f7f625 (patch) | |
tree | 7d41c2c843579dcf75db5faf28b602cc9a313cb9 /patches/server/0898-Add-Sneaking-API-for-Entities.patch | |
parent | e88856dd75de742fa10099af4fe06a07500b34fd (diff) | |
download | Paper-ea01aa335a46dd38e8f240f56ed7f5a6a3f7f625.tar.gz Paper-ea01aa335a46dd38e8f240f56ed7f5a6a3f7f625.zip |
Add some patches, fix compile
Diffstat (limited to 'patches/server/0898-Add-Sneaking-API-for-Entities.patch')
-rw-r--r-- | patches/server/0898-Add-Sneaking-API-for-Entities.patch | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/patches/server/0898-Add-Sneaking-API-for-Entities.patch b/patches/server/0898-Add-Sneaking-API-for-Entities.patch new file mode 100644 index 0000000000..e2081bc135 --- /dev/null +++ b/patches/server/0898-Add-Sneaking-API-for-Entities.patch @@ -0,0 +1,29 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: dawon <[email protected]> +Date: Wed, 19 Oct 2022 23:31:53 +0200 +Subject: [PATCH] Add Sneaking API for Entities + + +diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java +index ba0c1be4f5303bd6a33fd27f4e8c9910a8325695..6915da7ef7f1179f1efb3a959194c573e6b362e9 100644 +--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java ++++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java +@@ -1202,6 +1202,18 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { + return Pose.values()[this.getHandle().getPose().ordinal()]; + } + ++ // Paper start ++ @Override ++ public void setSneaking(boolean sneak) { ++ this.getHandle().setShiftKeyDown(sneak); ++ } ++ ++ @Override ++ public boolean isSneaking() { ++ return this.getHandle().isShiftKeyDown(); ++ } ++ // Paper end ++ + @Override + public SpawnCategory getSpawnCategory() { + return CraftSpawnCategory.toBukkit(this.getHandle().getType().getCategory()); |