Jump to content

[1.7.10] or [1.8] How possible to make infinite custom fluid?


SteveKunG

Recommended Posts

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.

Link to comment
Share on other sites

 

@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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.