mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-28 07:20:24 +01:00
Use correct source for mushroom block spread event
This commit is contained in:
parent
36ae0bcfea
commit
d2f251cc5c
1 changed files with 11 additions and 3 deletions
|
@ -19,16 +19,24 @@
|
|||
int i = 5;
|
||||
boolean flag = true;
|
||||
Iterator iterator = BlockPos.betweenClosed(pos.offset(-4, -1, -4), pos.offset(4, 1, 4)).iterator();
|
||||
@@ -75,7 +78,7 @@
|
||||
@@ -65,6 +68,7 @@
|
||||
}
|
||||
|
||||
BlockPos blockposition2 = pos.offset(random.nextInt(3) - 1, random.nextInt(2) - random.nextInt(2), random.nextInt(3) - 1);
|
||||
+ final BlockPos sourcePos = pos; // Paper - Use correct source for mushroom block spread event
|
||||
|
||||
for (int j = 0; j < 4; ++j) {
|
||||
if (world.isEmptyBlock(blockposition2) && state.canSurvive(world, blockposition2)) {
|
||||
@@ -75,7 +79,7 @@
|
||||
}
|
||||
|
||||
if (world.isEmptyBlock(blockposition2) && state.canSurvive(world, blockposition2)) {
|
||||
- world.setBlock(blockposition2, state, 2);
|
||||
+ org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockSpreadEvent(world, pos, blockposition2, state, 2); // CraftBukkit
|
||||
+ org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockSpreadEvent(world, sourcePos, blockposition2, state, 2); // CraftBukkit // Paper - Use correct source for mushroom block spread event
|
||||
}
|
||||
}
|
||||
|
||||
@@ -101,6 +104,7 @@
|
||||
@@ -101,6 +105,7 @@
|
||||
return false;
|
||||
} else {
|
||||
world.removeBlock(pos, false);
|
||||
|
|
Loading…
Reference in a new issue