Listener (Move your mouse to reveal the content) Listener (open) Listener (close) Code: @EventHandler public void OnChunkGen(ChunkPopulateEvent event) { Chunk curchunk = event.getChunk(); for (int x = 0; x < 16; x++) { for (int z = 0; z < 16; z++) { for (int y = 0; y < 255; y++) { Block block = curchunk.getBlock(x, y, z); int id = block.getTypeId(); if (id == Material.GRASS.getId()) { block.setType(Material.DIRT); } if (id == Material.LEAVES.getId()) { block.setType(Material.AIR); } if (id == Material.RED_ROSE.getId()) { block.setType(Material.AIR); } if (id == Material.YELLOW_FLOWER.getId()) { block.setType(Material.AIR); } if (id == 31 || id == 32 || id == 78 || id == 106) { block.setType(Material.AIR); } if (id == Material.SUGAR_CANE.getId() || id == Material.SUGAR_CANE_BLOCK.getId()) { block.setType(Material.AIR); } if (id == Material.ICE.getId()) { block.setType(Material.AIR); } if (id == Material.WATER.getId() || id == Material.STATIONARY_WATER.getId()) { block.setType(Material.AIR); }
try setting the for loops to: Code: for(int x = 0; x <= 16; x++) for(int z = 0; z <= 16; z++) for(int y = 0; y <= 255; y++) Because the water looks like its missing 1 row, no idea what could be the issue with the leaves tho =/
I don't seam to be getting any of that. Any water just disappears after a few seconds. I'm running CB 2175.
do it inside an block populator, as the javadoc from http://jd.bukkit.org/apidocs/index.html?org/bukkit/event/world/ChunkPopulateEvent.html says.
I made a custom popular and I got the same results. Also i'm already using a chunk populate event. That's odd, I will have to change CB versions and see if anything changes. EDIT: Didn't change anything. I'll check that out thanks. EDIT: Didn't change anything.
ChunkPopulateEvent is the wrong place to do it, whit an BlockPopulator users of you pugin can easy use it on 1 world, and not on another,
Bump for the thread Can ANYONE fix this!!! EDIT by Moderator: merged posts, please use the edit button instead of double posting.