mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-19 19:59:36 +00:00
Redid the way the flower gen is done, now it's less sporadic and more consistent over areas of the world.
This commit is contained in:
1 parent
e7fed43c72
commit
083a84a31f
1 file changed
+8
-8
@@ -25,17 +25,17 @@ public class BiomeDecorationHandler {
|
||||
public void onWorldDecoration(DecorateBiomeEvent.Decorate event) {
|
||||
if((event.getResult() == Result.ALLOW || event.getResult() == Result.DEFAULT) && event.type == EventType.FLOWERS)
|
||||
for(int i = 0; i < 3; i++) {
|
||||
int x = event.chunkX + event.world.rand.nextInt(16) + 8;
|
||||
int y = event.world.rand.nextInt(128);
|
||||
int z = event.chunkZ + event.world.rand.nextInt(16) + 8;
|
||||
int x = event.chunkX + event.rand.nextInt(16) + 8;
|
||||
int z = event.chunkZ + event.rand.nextInt(16) + 8;
|
||||
int y = event.world.getTopSolidOrLiquidBlock(x, z);
|
||||
|
||||
for (int j = 0; j < 96; j++) {
|
||||
int x1 = x + event.world.rand.nextInt(8) - event.world.rand.nextInt(8);
|
||||
int y1 = y + event.world.rand.nextInt(4) - event.world.rand.nextInt(4);
|
||||
int z1 = z + event.world.rand.nextInt(8) - event.world.rand.nextInt(8);
|
||||
for (int j = 0; j < 32; j++) {
|
||||
int x1 = x + event.rand.nextInt(8) - event.rand.nextInt(8);
|
||||
int y1 = y + event.rand.nextInt(4) - event.rand.nextInt(4);
|
||||
int z1 = z + event.rand.nextInt(8) - event.rand.nextInt(8);
|
||||
|
||||
if (event.world.isAirBlock(x1, y1, z1) && (!event.world.provider.hasNoSky || y1 < 127) && Block.blocksList[ModBlocks.flower.blockID].canBlockStay(event.world, x1, y1, z1))
|
||||
event.world.setBlock(x1, y1, z1, ModBlocks.flower.blockID, event.world.rand.nextInt(16), 2);
|
||||
event.world.setBlock(x1, y1, z1, ModBlocks.flower.blockID, event.rand.nextInt(16), 2);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user