注意:这个世界的树比较特殊,因为树的藤蔓是草,会掉种子,所以低配电脑可能会造成卡顿。
导致原因代码:
for (int genh = 0; genh < height; genh++) {
BlockPos genhPos = position.up(genh);
state = world.getBlockState(genhPos);
if (state.getBlock().isAir(state, world, genhPos)
|| state.getBlock() == Blocks.DOUBLE_PLANT.getStateFromMeta(2).getBlock()
|| state.getBlock() == Blocks.LEAVES.getDefaultState().getBlock()) {
this.setBlockAndNotifyAdequately(world, position.up(genh), Blocks.COAL_BLOCK.getDefaultState());
if (genh > 0) {
if (rand.nextInt(3) > 0 && world.isAirBlock(position.add(-1, genh, 0)))
this.setBlockAndNotifyAdequately(world, position.add(-1, genh, 0), Blocks.DOUBLE_PLANT.getStateFromMeta(2));
if (rand.nextInt(3) > 0 && world.isAirBlock(position.add(1, genh, 0)))
this.setBlockAndNotifyAdequately(world, position.add(1, genh, 0), Blocks.DOUBLE_PLANT.getStateFromMeta(2));
if (rand.nextInt(3) > 0 && world.isAirBlock(position.add(0, genh, -1)))
this.setBlockAndNotifyAdequately(world, position.add(0, genh, -1), Blocks.DOUBLE_PLANT.getStateFromMeta(2));
if (rand.nextInt(3) > 0 && world.isAirBlock(position.add(0, genh, 1)))
this.setBlockAndNotifyAdequately(world, position.add(0, genh, 1), Blocks.DOUBLE_PLANT.getStateFromMeta(2));
}
}
}
传送门:
风景:
生物:混沌居民,中立。