2021-07-18 02:14:55 +02:00
|
|
|
--- a/net/minecraft/world/level/block/BlockCauldron.java
|
|
|
|
+++ b/net/minecraft/world/level/block/BlockCauldron.java
|
2023-12-05 17:40:00 +01:00
|
|
|
@@ -12,6 +12,10 @@
|
2021-07-18 02:14:55 +02:00
|
|
|
import net.minecraft.world.level.material.FluidType;
|
|
|
|
import net.minecraft.world.level.material.FluidTypes;
|
|
|
|
|
|
|
|
+// CraftBukkit start
|
|
|
|
+import org.bukkit.event.block.CauldronLevelChangeEvent;
|
|
|
|
+// CraftBukkit end
|
|
|
|
+
|
|
|
|
public class BlockCauldron extends AbstractCauldronBlock {
|
|
|
|
|
2023-12-05 17:40:00 +01:00
|
|
|
public static final MapCodec<BlockCauldron> CODEC = simpleCodec(BlockCauldron::new);
|
|
|
|
@@ -61,13 +65,11 @@
|
2022-06-07 18:00:00 +02:00
|
|
|
|
2021-07-18 02:14:55 +02:00
|
|
|
if (fluidtype == FluidTypes.WATER) {
|
2022-06-07 18:00:00 +02:00
|
|
|
iblockdata1 = Blocks.WATER_CAULDRON.defaultBlockState();
|
|
|
|
- world.setBlockAndUpdate(blockposition, iblockdata1);
|
|
|
|
- world.gameEvent(GameEvent.BLOCK_CHANGE, blockposition, GameEvent.a.of(iblockdata1));
|
|
|
|
+ LayeredCauldronBlock.changeLevel(iblockdata, world, blockposition, iblockdata1, null, CauldronLevelChangeEvent.ChangeReason.NATURAL_FILL); // CraftBukkit
|
2021-11-21 23:00:00 +01:00
|
|
|
world.levelEvent(1047, blockposition, 0);
|
2021-07-18 02:14:55 +02:00
|
|
|
} else if (fluidtype == FluidTypes.LAVA) {
|
2022-06-07 18:00:00 +02:00
|
|
|
iblockdata1 = Blocks.LAVA_CAULDRON.defaultBlockState();
|
|
|
|
- world.setBlockAndUpdate(blockposition, iblockdata1);
|
|
|
|
- world.gameEvent(GameEvent.BLOCK_CHANGE, blockposition, GameEvent.a.of(iblockdata1));
|
|
|
|
+ LayeredCauldronBlock.changeLevel(iblockdata, world, blockposition, iblockdata1, null, CauldronLevelChangeEvent.ChangeReason.NATURAL_FILL); // CraftBukkit
|
2021-11-21 23:00:00 +01:00
|
|
|
world.levelEvent(1046, blockposition, 0);
|
2021-07-18 02:14:55 +02:00
|
|
|
}
|
2022-06-07 18:00:00 +02:00
|
|
|
|