Posted September 30, 201510 yr Hi. I have a problem. It can make infinite fluid like water in Minecraft?
September 30, 201510 yr Hi. I have a problem. It can make infinite fluid like water in Minecraft? on the update, do a check of the blocks x+1 x-1 z+1 z-1 and if at least 2 of them are the correct fluids then turn the block location into the source block. I have not done this myself so unsure exactly how to implement it but I think it should work.
October 1, 201510 yr Author @Override public void updateTick(World world, int x, int y, int z, Random rand) { super.updateTick(world, x, y, z, rand); if ((world.getBlock(x + 1, y, z + 1) == this && world.getBlockMetadata(x + 1, y, z + 1) == 0) || (world.getBlock(x - 1, y, z - 1) == this && world.getBlockMetadata(x - 1, y, z - 1) == 0) || (world.getBlock(x - 1, y, z + 1) == this && world.getBlockMetadata(x - 1, y, z + 1) == 0) || (world.getBlock(x + 1, y, z - 1) == this && world.getBlockMetadata(x + 1, y, z - 1) == 0)) { world.setBlock(x, y, z, EuropaBlocks.europa_ice); } } Something wrong? It not checking metadata 0.
October 1, 201510 yr You may want to write a private method to simplify that abomination of an if statement. Also, I take that could should ONLY run if the metadata of the current block ISN'T 0? The processing time saved there will add up. Also, it's rather odd that it doesn't trigger. In fact, the way you've set that up your fluid should spread to completely cover any flat surface it's placed on! This, assuming it's not flowing in any specific direction. Also, you probably want to set the metadata, not the block. If anyone has a comprehensive, visual guide to GUIs - don't hesitate to message me. They make my head spin.
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.