2022-09-30 12:33:31 +02:00
|
|
|
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 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
|
|
|
--- a/src/main/java/net/minecraft/world/level/block/PointedDripstoneBlock.java
|
|
|
|
+++ b/src/main/java/net/minecraft/world/level/block/PointedDripstoneBlock.java
|
|
|
|
@@ -0,0 +0,0 @@ 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);
|
2024-01-18 15:56:25 +01:00
|
|
|
+ // Paper start - Call BlockFormEvent
|
2022-09-30 12:33:31 +02:00
|
|
|
+ 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);
|
2024-04-24 23:23:56 +02:00
|
|
|
world.gameEvent((Holder) GameEvent.BLOCK_CHANGE, ((PointedDripstoneBlock.FluidInfo) optional.get()).pos, GameEvent.Context.of(iblockdata1));
|
2022-09-30 12:33:31 +02:00
|
|
|
world.levelEvent(1504, blockposition1, 0);
|
|
|
|
+ }
|
2024-01-18 15:56:25 +01:00
|
|
|
+ // Paper end - Call BlockFormEvent
|
2022-09-30 12:33:31 +02:00
|
|
|
} else {
|
|
|
|
BlockPos blockposition2 = PointedDripstoneBlock.findFillableCauldronBelowStalactiteTip(world, blockposition1, fluidtype);
|
|
|
|
|