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/0894-Make-Amethyst-throw-both-Spread-and-Grow-Events.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/0894-Make-Amethyst-throw-both-Spread-and-Grow-Events.patch')
-rw-r--r-- | patches/server/0894-Make-Amethyst-throw-both-Spread-and-Grow-Events.patch | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/patches/server/0894-Make-Amethyst-throw-both-Spread-and-Grow-Events.patch b/patches/server/0894-Make-Amethyst-throw-both-Spread-and-Grow-Events.patch new file mode 100644 index 0000000000..96b4aa8c41 --- /dev/null +++ b/patches/server/0894-Make-Amethyst-throw-both-Spread-and-Grow-Events.patch @@ -0,0 +1,24 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Jacob Litewski <[email protected]> +Date: Tue, 13 Jun 2023 19:16:39 -0400 +Subject: [PATCH] Make Amethyst throw both Spread and Grow Events + + +diff --git a/src/main/java/net/minecraft/world/level/block/BuddingAmethystBlock.java b/src/main/java/net/minecraft/world/level/block/BuddingAmethystBlock.java +index 79f1fb45447350b5bedee8ce3efe6c150aa9772c..7f58c9f5935cd14ea1096de14633f653eb486d7e 100644 +--- a/src/main/java/net/minecraft/world/level/block/BuddingAmethystBlock.java ++++ b/src/main/java/net/minecraft/world/level/block/BuddingAmethystBlock.java +@@ -45,7 +45,13 @@ public class BuddingAmethystBlock extends AmethystBlock { + if (block != null) { + BlockState iblockdata2 = (BlockState) ((BlockState) block.defaultBlockState().setValue(AmethystClusterBlock.FACING, enumdirection)).setValue(AmethystClusterBlock.WATERLOGGED, iblockdata1.getFluidState().getType() == Fluids.WATER); + ++ // Paper start - Have Amethyst throw both spread and grow events ++ if (block == Blocks.SMALL_AMETHYST_BUD) { + org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockSpreadEvent(world, pos, blockposition1, iblockdata2); // CraftBukkit ++ } else { ++ org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockGrowEvent(world, blockposition1, iblockdata2); ++ } ++ // Paper end - Have Amethyst throw both spread and grow events + } + + } |