Posted March 7, 201510 yr I want to make it so when liquid is placed in my dimension they "freeze". This works fine when i place water from its block, but when i place it from a bucket it does not work... The PlaceBlock event class: @SubscribeEvent public void onBlockPlace(BlockEvent.PlaceEvent event) { EntityPlayer player = event.player; World world = event.world; Block block = event.block; Block placedBlock = event.placedBlock; ItemStack heldItem = event.itemInHand; int x = event.x; int y = event.y; int z = event.z; if(world.provider.dimensionId == Main.dimensionId) { if(block.getMaterial() == Material.water) { world.setBlock(x, y, z, Blocks.ice); } else if(placedBlock.getMaterial() == Material.lava) { world.setBlock(x, y, z, Blocks.obsidian); } } }
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.