geforkt von Mirrors/Paper
use BlockFormEvent for mud converting into clay
Dieser Commit ist enthalten in:
Ursprung
1695d7c138
Commit
074f19e7fb
@ -21,7 +21,22 @@
|
|||||||
} else {
|
} else {
|
||||||
super.fallOn(world, state, pos, entity, fallDistance);
|
super.fallOn(world, state, pos, entity, fallDistance);
|
||||||
}
|
}
|
||||||
@@ -391,15 +396,15 @@
|
@@ -214,10 +219,13 @@
|
||||||
|
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((Holder) 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);
|
||||||
|
|
||||||
|
@@ -391,15 +399,15 @@
|
||||||
if (PointedDripstoneBlock.isUnmergedTipWithDirection(iblockdata, direction.getOpposite())) {
|
if (PointedDripstoneBlock.isUnmergedTipWithDirection(iblockdata, direction.getOpposite())) {
|
||||||
PointedDripstoneBlock.createMergedTips(iblockdata, world, blockposition1);
|
PointedDripstoneBlock.createMergedTips(iblockdata, world, blockposition1);
|
||||||
} else if (iblockdata.isAir() || iblockdata.is(Blocks.WATER)) {
|
} else if (iblockdata.isAir() || iblockdata.is(Blocks.WATER)) {
|
||||||
@ -41,7 +56,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static void createMergedTips(BlockState state, LevelAccessor world, BlockPos pos) {
|
private static void createMergedTips(BlockState state, LevelAccessor world, BlockPos pos) {
|
||||||
@@ -414,8 +419,8 @@
|
@@ -414,8 +422,8 @@
|
||||||
blockposition1 = pos.below();
|
blockposition1 = pos.below();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -52,7 +67,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static void spawnDripParticle(Level world, BlockPos pos, BlockState state) {
|
public static void spawnDripParticle(Level world, BlockPos pos, BlockState state) {
|
||||||
@@ -448,7 +453,7 @@
|
@@ -448,7 +456,7 @@
|
||||||
|
|
||||||
return (BlockPos) PointedDripstoneBlock.findBlockVertical(world, pos, enumdirection.getAxisDirection(), bipredicate, (iblockdata1) -> {
|
return (BlockPos) PointedDripstoneBlock.findBlockVertical(world, pos, enumdirection.getAxisDirection(), bipredicate, (iblockdata1) -> {
|
||||||
return PointedDripstoneBlock.isTip(iblockdata1, allowMerged);
|
return PointedDripstoneBlock.isTip(iblockdata1, allowMerged);
|
||||||
@ -61,7 +76,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -564,7 +569,7 @@
|
@@ -564,7 +572,7 @@
|
||||||
return PointedDripstoneBlock.canDripThrough(world, blockposition1, iblockdata);
|
return PointedDripstoneBlock.canDripThrough(world, blockposition1, iblockdata);
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -70,7 +85,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Nullable
|
@Nullable
|
||||||
@@ -573,7 +578,7 @@
|
@@ -573,7 +581,7 @@
|
||||||
return PointedDripstoneBlock.canDripThrough(world, blockposition1, iblockdata);
|
return PointedDripstoneBlock.canDripThrough(world, blockposition1, iblockdata);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren