geforkt von Mirrors/Paper
#1065: Add missing calls for BlockSpreadEvent when Sculk spreads
By: Brokkonaut <hannos17@gmx.de>
Dieser Commit ist enthalten in:
Ursprung
46523c1525
Commit
52f9281656
@ -0,0 +1,16 @@
|
|||||||
|
--- a/net/minecraft/world/level/block/SculkBlock.java
|
||||||
|
+++ b/net/minecraft/world/level/block/SculkBlock.java
|
||||||
|
@@ -35,8 +35,11 @@
|
||||||
|
BlockPosition blockposition2 = blockposition1.above();
|
||||||
|
IBlockData iblockdata = this.getRandomGrowthState(generatoraccess, blockposition2, randomsource, sculkspreader.isWorldGeneration());
|
||||||
|
|
||||||
|
- generatoraccess.setBlock(blockposition2, iblockdata, 3);
|
||||||
|
- generatoraccess.playSound((EntityHuman) null, blockposition1, iblockdata.getSoundType().getPlaceSound(), SoundCategory.BLOCKS, 1.0F, 1.0F);
|
||||||
|
+ // CraftBukkit start - Call BlockSpreadEvent
|
||||||
|
+ if (org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockSpreadEvent(generatoraccess, blockposition1, blockposition2, iblockdata, 3)) {
|
||||||
|
+ generatoraccess.playSound((EntityHuman) null, blockposition1, iblockdata.getSoundType().getPlaceSound(), SoundCategory.BLOCKS, 1.0F, 1.0F);
|
||||||
|
+ }
|
||||||
|
+ // CraftBukkit end
|
||||||
|
}
|
||||||
|
|
||||||
|
return Math.max(0, i - j);
|
@ -0,0 +1,15 @@
|
|||||||
|
--- a/net/minecraft/world/level/block/SculkVeinBlock.java
|
||||||
|
+++ b/net/minecraft/world/level/block/SculkVeinBlock.java
|
||||||
|
@@ -121,7 +121,11 @@
|
||||||
|
if (iblockdata1.is(tagkey)) {
|
||||||
|
IBlockData iblockdata2 = Blocks.SCULK.defaultBlockState();
|
||||||
|
|
||||||
|
- generatoraccess.setBlock(blockposition1, iblockdata2, 3);
|
||||||
|
+ // CraftBukkit start - Call BlockSpreadEvent
|
||||||
|
+ if (!org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockSpreadEvent(generatoraccess, blockposition, blockposition1, iblockdata2, 3)) {
|
||||||
|
+ return false;
|
||||||
|
+ }
|
||||||
|
+ // CraftBukkit end
|
||||||
|
Block.pushEntitiesUp(iblockdata1, iblockdata2, generatoraccess, blockposition1);
|
||||||
|
generatoraccess.playSound((EntityHuman) null, blockposition1, SoundEffects.SCULK_BLOCK_SPREAD, SoundCategory.BLOCKS, 1.0F, 1.0F);
|
||||||
|
this.veinSpreader.spreadAll(iblockdata2, generatoraccess, blockposition1, sculkspreader.isWorldGeneration());
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren