July 6, 201411 yr Author So, how do I get it to work neatly? Member of Aerotech Networks, a Multi-Gaming server. Also Currently porting the "Rise of the Automatons" minecraft mod
July 6, 201411 yr Author anyone? Member of Aerotech Networks, a Multi-Gaming server. Also Currently porting the "Rise of the Automatons" minecraft mod
July 7, 201411 yr Author So I'm still trying to simplify this code within my spreading block: if (world.getBlock(x + 1, y, z) == Blocks.grass && world.getBlockLightValue(x, y + 1, z) >= 4 && world.getBlockLightOpacity(z, y + 1, z) <= 2) { world.setBlock(x + 1, y, z, Blocks.glass); } if (world.getBlock(x - 1, y, z) == Blocks.grass && world.getBlockLightValue(x, y + 1, z) >= 4 && world.getBlockLightOpacity(z, y + 1, z) <= 2) { world.setBlock(x - 1, y, z, Blocks.glass); } if (world.getBlock(x + 1, y, z + 1) == Blocks.grass && world.getBlockLightValue(x, y + 1, z) >= 4 && world.getBlockLightOpacity(z, y + 1, z) <= 2) { world.setBlock(x + 1, y, z + 1, Blocks.glass); } if (world.getBlock(x - 1, y, z - 1) == Blocks.grass && world.getBlockLightValue(x, y + 1, z) >= 4 && world.getBlockLightOpacity(z, y + 1, z) <= 2) { world.setBlock(x - 1, y, z - 1, Blocks.glass); } if (world.getBlock(x + 1, y, z - 1) == Blocks.grass && world.getBlockLightValue(x, y + 1, z) >= 4 && world.getBlockLightOpacity(z, y + 1, z) <= 2) { world.setBlock(x + 1, y, z - 1, Blocks.glass); } if (world.getBlock(x - 1, y, z + 1) == Blocks.grass && world.getBlockLightValue(x, y + 1, z) >= 4 && world.getBlockLightOpacity(z, y + 1, z) <= 2) { world.setBlock(x - 1, y, z + 1, Blocks.glass); } if (world.getBlock(x, y, z + 1) == Blocks.grass && world.getBlockLightValue(x, y + 1, z) >= 4 && world.getBlockLightOpacity(z, y + 1, z) <= 2) { world.setBlock(x, y, z + 1, Blocks.glass); } if (world.getBlock(x, y, z - 1) == Blocks.grass && world.getBlockLightValue(x, y + 1, z) >= 4 && world.getBlockLightOpacity(z, y + 1, z) <= 2) { world.setBlock(x, y, z - 1, Blocks.glass); } And this code is within this after this code in the updateTick method with old vanilla grass spread commented out: public void updateTick(World world, int x, int y, int z, Random random) { if (!world.isRemote) { if (world.getBlockLightValue(x, y + 1, z) >= 9) { for (int l = 0; l < 97; ++l) { /*int i1 = x + random.nextInt(3) - 1; int j1 = y + random.nextInt(5) - 3; int k1 = z + random.nextInt(3) - 1; Block block = world.getBlock(i1, j1 + 1, k1);*/ I would appreciate any help given Member of Aerotech Networks, a Multi-Gaming server. Also Currently porting the "Rise of the Automatons" minecraft mod
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.