Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

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.

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

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.

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

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.