geforkt von Mirrors/Paper
SPIGOT-6428: World.generateTree does not generate bee nests
By: md_5 <git@md-5.net>
Dieser Commit ist enthalten in:
Ursprung
17a73066d0
Commit
9d052543d0
@ -751,18 +751,11 @@ public class CraftWorld implements World {
|
||||
@Override
|
||||
public boolean generateTree(Location loc, TreeType type, BlockChangeDelegate delegate) {
|
||||
world.captureTreeGeneration = true;
|
||||
world.captureBlockStates = true;
|
||||
boolean grownTree = generateTree(loc, type);
|
||||
world.captureBlockStates = false;
|
||||
world.captureTreeGeneration = false;
|
||||
if (grownTree) { // Copy block data to delegate
|
||||
for (BlockState blockstate : world.capturedBlockStates.values()) {
|
||||
BlockPosition position = ((CraftBlockState) blockstate).getPosition();
|
||||
net.minecraft.world.level.block.state.IBlockData oldBlock = world.getType(position);
|
||||
int flag = ((CraftBlockState) blockstate).getFlag();
|
||||
delegate.setBlockData(blockstate.getX(), blockstate.getY(), blockstate.getZ(), blockstate.getBlockData());
|
||||
net.minecraft.world.level.block.state.IBlockData newBlock = world.getType(position);
|
||||
world.notifyAndUpdatePhysics(position, null, oldBlock, newBlock, newBlock, flag, 512);
|
||||
blockstate.update(true);
|
||||
}
|
||||
world.capturedBlockStates.clear();
|
||||
return true;
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren