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.
This commit is contained in:
parent
b21eb4d9a4
commit
89d51d5f29
673 changed files with 157 additions and 189 deletions
|
@ -1,25 +0,0 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Legitimoose <legitimoose@gmail.com>
|
||||
Date: Thu, 29 Sep 2022 16:25:50 -0700
|
||||
Subject: [PATCH] use BlockFormEvent for mud converting into clay
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/PointedDripstoneBlock.java b/src/main/java/net/minecraft/world/level/block/PointedDripstoneBlock.java
|
||||
index 998e43e8dc6bd6b741bdcb77d2b75df8ab2feefc..06a9dd14c7f7954bf9327427de76965be8fe30f4 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/PointedDripstoneBlock.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/PointedDripstoneBlock.java
|
||||
@@ -214,10 +214,13 @@ public class PointedDripstoneBlock extends Block implements Fallable, SimpleWate
|
||||
if (((PointedDripstoneBlock.FluidInfo) optional.get()).sourceState.is(Blocks.MUD) && fluidtype == Fluids.WATER) {
|
||||
BlockState iblockdata1 = Blocks.CLAY.defaultBlockState();
|
||||
|
||||
- world.setBlockAndUpdate(((PointedDripstoneBlock.FluidInfo) optional.get()).pos, iblockdata1);
|
||||
+ // Paper start - Call BlockFormEvent
|
||||
+ if (org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockFormEvent(world, ((PointedDripstoneBlock.FluidInfo) optional.get()).pos, iblockdata1)) {
|
||||
Block.pushEntitiesUp(((PointedDripstoneBlock.FluidInfo) optional.get()).sourceState, iblockdata1, world, ((PointedDripstoneBlock.FluidInfo) optional.get()).pos);
|
||||
world.gameEvent(GameEvent.BLOCK_CHANGE, ((PointedDripstoneBlock.FluidInfo) optional.get()).pos, GameEvent.Context.of(iblockdata1));
|
||||
world.levelEvent(1504, blockposition1, 0);
|
||||
+ }
|
||||
+ // Paper end - Call BlockFormEvent
|
||||
} else {
|
||||
BlockPos blockposition2 = PointedDripstoneBlock.findFillableCauldronBelowStalactiteTip(world, blockposition1, fluidtype);
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue