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.

pcblockgermany

Members
  • Joined

  • Last visited

  1. I did, but it didn't help me a lot. I think I did find how Minecraft calculates where the fluid flows to, but I don't know how to apply that to the placed fluid block, b/c it theoretically should do that on its own.
  2. Hello, I've recently begun to get into modding and want to make a block that can register if there's a fluid block next to it and then make a copy of the fluid on free sides of the block, but with a reduced liquid height, as if the liquid would flow through it. Currently I'm having some problems though, at the moment it does create a copy of the fluid with a reduced liquid height (on the opposite site, I've reduced it to this case atm), this liquid, however, doesn't flow. Here's a picture of the problem: (I'll add the textures later, right now I'm just trying to get the main concept to work) And here's what I've come up with so far: public void neighborChanged(IBlockState state, World worldIn, BlockPos pos, Block blockIn, BlockPos fromPos) { for (EnumFacing enumfacing : EnumFacing.Plane.HORIZONTAL) { if (worldIn.getBlockState(pos.offset(enumfacing)).getMaterial().isLiquid() && worldIn.getBlockState(pos.offset(enumfacing.getOpposite())).getMaterial() == Material.AIR) { //Block BlockFacing = worldIn.getBlockState(pos.offset(enumfacing)).getBlock(); IBlockState blockstate = worldIn.getBlockState(pos.offset(enumfacing)); int LiquidHeightInt = (int) worldIn.getBlockState(pos.offset(enumfacing)).getProperties().get(BlockLiquid.LEVEL); if(LiquidHeightInt <= 3) { //sets the blockstate on the opposite side of the block to be the one of the source, but with decreased fluid level by 2 worldIn.setBlockState(pos.offset(enumfacing.getOpposite()), blockstate.cycleProperty(BlockLiquid.LEVEL).cycleProperty(BlockLiquid.LEVEL), 2); //updates the neighbouring blocks so that there will be no fluid on a side of the block if the initial source has been removed worldIn.getBlockState(pos.offset(enumfacing.getOpposite())).neighborChanged(worldIn, pos.offset(enumfacing.getOpposite()), worldIn.getBlockState(pos.offset(enumfacing.getOpposite())).getBlock(), pos); } } // TODO add cases } } I will probably later make a tileentity do this, so that the liquid can flow through multiple block etc., but I'd first like to get it to work at all. If you need it, here is my GitHub Repo. I think the problem may be that the source fluid block creates other "flow" blocks, and b/c I'm not placing a fluid source block, it doesn't place the other "fllow" blocks. If this is the case, I have no idea though how to fix it. I've tried looking at BlockDynamicLiquid and BlockLiquid, but wasn't able to come up with a solution. Am I maybe approaching this wrong and should try to make a block that doesn't have a collision box so that a fluid can flow through it, but still somehow make it so that entities can't pass through it? Is it even possible to have two blocks in the same space? Anyway, thanks in advance!

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.