diff options
author | Owen <[email protected]> | 2024-03-03 17:05:34 -0500 |
---|---|---|
committer | GitHub <[email protected]> | 2024-03-03 17:05:34 -0500 |
commit | 89d51d5f298cd25d6f44388970596c6780b5664b (patch) | |
tree | 07f41f4ce7bc466ea5e35faa2575d0ec6f6c4a76 /patches/server/0385-Improve-Arrow-API.patch | |
parent | b21eb4d9a4d0d0bea857675e2186657592df548e (diff) | |
download | Paper-89d51d5f298cd25d6f44388970596c6780b5664b.tar.gz Paper-89d51d5f298cd25d6f44388970596c6780b5664b.zip |
Allow enabling sand duping (#10191)
Because this exploit has been widely known for years and has not been fixed by Mojang, we decided that it was worth allowing people to toggle it on/off due to how easy it is to make it configurable.
It should be noted that this decision does not promise all future exploits will be configurable.
Diffstat (limited to 'patches/server/0385-Improve-Arrow-API.patch')
-rw-r--r-- | patches/server/0385-Improve-Arrow-API.patch | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/patches/server/0385-Improve-Arrow-API.patch b/patches/server/0385-Improve-Arrow-API.patch new file mode 100644 index 0000000000..cbf5d4d815 --- /dev/null +++ b/patches/server/0385-Improve-Arrow-API.patch @@ -0,0 +1,38 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Nesaak <[email protected]> +Date: Sat, 23 May 2020 10:31:11 -0400 +Subject: [PATCH] Improve Arrow API + +Add method to get the arrow's itemstack and a method +to set the arrow's "noclip" status + +Co-authored-by: Jake Potrebic <[email protected]> + +diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftArrow.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftArrow.java +index 35d8fbd9c5751568a1a3b8928017e23cd41bb163..762c395e45a681a11f3fe9d10e7f0ba310786e80 100644 +--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftArrow.java ++++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftArrow.java +@@ -99,6 +99,23 @@ public class CraftArrow extends AbstractProjectile implements AbstractArrow { + this.getHandle().pickup = net.minecraft.world.entity.projectile.AbstractArrow.Pickup.byOrdinal(status.ordinal()); + } + ++ // Paper start ++ @Override ++ public org.bukkit.craftbukkit.inventory.CraftItemStack getItemStack() { ++ return org.bukkit.craftbukkit.inventory.CraftItemStack.asCraftMirror(getHandle().getPickupItem()); ++ } ++ ++ @Override ++ public void setNoPhysics(boolean noPhysics) { ++ this.getHandle().setNoPhysics(noPhysics); ++ } ++ ++ @Override ++ public boolean hasNoPhysics() { ++ return this.getHandle().isNoPhysics(); ++ } ++ // Paper end ++ + @Override + public void setTicksLived(int value) { + super.setTicksLived(value); |