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.

solved [1.16.5 - 36.2.0]ForgeFlowingFluid.Properties... slopFindDistance levelDecreasePerBlock missing

Featured Replies

Posted

So it has been awhile... and I know my brain is like a sieve but...
I'm following a online tutorial on adding custom fluids and it goes ok up until this part...

they are using the old way of doing mappings and I'm using the new stuff [seriously considering swapping back as it makes most tutorials and videos a pain to follow as MS seems to have looked at the mapping in use and renamed everything with a contrarian attitude aimed at making things difficult]....anyway back on topic.
ย 

public static final ForgeFlowingFluid.Properties SLUDGE_PROPERTIES = new ForgeFlowingFluid.Properties(
			() -> ModFluids.SLUDGE_FLUID.get(),
			() -> ModFluids.SLUDGE_FLOWING.get(),
			FluidAttributes.builder(SLUDGE_STILL_RF, SLUDGE_FLOWING_RF)
			.density(15).luminosity(2).viscosity(5).sound(SoundEvents.LAVA_AMBIENT).overlay(SLUDGE_OVERLAY_RF)
			.color(0xbffed0d0)//color is //argb
			);

then they say add.

.slopeFindDistance(2).levelDecreasePerBlock(2)

but properties do not exist... so I go look at the code in ForgeFlowingFluid and those properties are there.. Like I said it has been awhile and maybe I'm overlooking some private somewhere but I did not see a problem.
So is it the mappings playing with me? Maybe I should go take a nap and come back with fresh eyes....
Any and all help appreciated.

Edited by frakier

  • frakier changed the title to solved [1.16.5 - 36.2.0]ForgeFlowingFluid.Properties... slopFindDistance levelDecreasePerBlock missing
  • Author

Solved... found the tutorial online to compare and...

ย 

	public static final ForgeFlowingFluid.Properties SLUDGE_PROPERTIES = new ForgeFlowingFluid.Properties(
			() -> ModFluids.SLUDGE_FLUID.get(),
			() -> ModFluids.SLUDGE_FLOWING.get(),
			FluidAttributes.builder(SLUDGE_STILL_RF, SLUDGE_FLOWING_RF)
			.density(15).luminosity(2).viscosity(5).sound(SoundEvents.LAVA_AMBIENT).overlay(SLUDGE_OVERLAY_RF)
			.color(0xbffed0d0)//color is //argb
			).slopeFindDistance(2).levelDecreasePerBlock(2);

I missed the closing parenthesis before ).slopeFindDistance(2).levelDecreasePerBlock(2);
and just could not see it for the trees. The added problem of using the ms mappings and not knowing if it was that or if it was me did not help.

Edited by frakier

RegistryObjects are Supplier, you don't need to use "() -> " and ".get()" just use the RegistryObject directlyย 

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.