Eragonn14900

Untitled

Nov 29th, 2016
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.98 KB | None | 0 0
  1. @SubscribeEvent
  2. public void populateChunk(PopulateChunkEvent.Pre event)
  3. {
  4. System.out.println("this triggered");
  5. Chunk chunk = event.getWorld().getChunkFromChunkCoords(event.getChunkX(), event.getChunkZ());
  6. for (ExtendedBlockStorage storage : chunk.getBlockStorageArray()) {
  7. if (storage != null) {
  8. for (int x = 0; x < 16; ++x) {
  9. for (int y = 0; y < 16; ++y) {
  10. for (int z = 0; z < 16; ++z) {
  11. if (storage.get(x, y, z) == Blocks.STONE) {
  12. storage.set(x, y, z, IntegratedBlocks.DesertBlocks.getDefaultState());
  13. }
  14. }
  15. }
  16. }
  17. }
  18. }
  19. }
Advertisement
Add Comment
Please, Sign In to add comment