mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-07 07:32:03 -07:00
SPIGOT-3286: Call BlockFormEvent for Concrete Powder -> Concrete
This commit is contained in:
22
nms-patches/BlockConcretePowder.patch
Normal file
22
nms-patches/BlockConcretePowder.patch
Normal file
@@ -0,0 +1,22 @@
|
||||
--- a/net/minecraft/server/BlockConcretePowder.java
|
||||
+++ b/net/minecraft/server/BlockConcretePowder.java
|
||||
@@ -11,8 +11,8 @@
|
||||
}
|
||||
|
||||
public void a(World world, BlockPosition blockposition, IBlockData iblockdata, IBlockData iblockdata1) {
|
||||
- if (iblockdata1.getMaterial().isLiquid()) {
|
||||
- world.setTypeAndData(blockposition, Blocks.dR.getBlockData().set(BlockCloth.COLOR, iblockdata.get(BlockConcretePowder.a)), 3);
|
||||
+ if (iblockdata1.getMaterial().isLiquid() && world.getType(blockposition).getBlock() != Blocks.dR) { // CraftBukkit - don't double concrete
|
||||
+ org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockFormEvent(world, blockposition, Blocks.dR.getBlockData().set(BlockCloth.COLOR, iblockdata.get(BlockConcretePowder.a)), null); // CraftBukkit
|
||||
}
|
||||
|
||||
}
|
||||
@@ -36,7 +36,7 @@
|
||||
}
|
||||
|
||||
if (flag) {
|
||||
- world.setTypeAndData(blockposition, Blocks.dR.getBlockData().set(BlockCloth.COLOR, iblockdata.get(BlockConcretePowder.a)), 3);
|
||||
+ org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockFormEvent(world, blockposition, Blocks.dR.getBlockData().set(BlockCloth.COLOR, iblockdata.get(BlockConcretePowder.a)), null); // CraftBukkit
|
||||
}
|
||||
|
||||
return flag;
|
Reference in New Issue
Block a user