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

Posted

Hello! I'm currently working on a mod that will expand upon the underwater changes 1.13 introduced, and as part of that I want to make growing crops underwater a possibility (Vanilla crops won't be able to grow under water though).

I've made it so that you can till soil under water, but I'm not sure how crops breaking under water is implemented (and how to get around it).

 

I'm wondering if crops breaking due to water is implemented in the water fluid system or if it's implemented by the parent class of all crops?

I've looked around a bit but due to searge names (i think that's what they're called) it's not super clear what each function does.

Anyone know roughly how it works?

 

EDIT

I'm obviously going to have to waterlog all crops that can exist under water, but I'm not sure if that will solve it.

Edited by peter1745

I think FlowingFluid.class and more precisely the method getFlow()

At one point, it check getMaterial().blocksMovement())

This basically check if the water can move in.

You just have to set blocksMovement to true in your crops I think.

Not sure, you have to test

  • Author
12 minutes ago, uiytt said:

I think FlowingFluid.class and more precisely the method getFlow()

At one point, it check getMaterial().blocksMovement())

This basically check if the water can move in.

You just have to set blocksMovement to true in your crops I think.

Not sure, you have to test

I tried making a crop that could be waterlogged and that worked. I don't think blocksMovement affects whether or not water pops a crop off since things like kelp doesn't block movement. But thank you either way for the suggestion!

  • peter1745 changed the title to [SOLVED][1.15.2] Underwater Crops
2 hours ago, peter1745 said:

I tried making a crop that could be waterlogged and that worked.

That's basically all you should need as far as I understand it.

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

  • Author
4 hours ago, Draco18s said:

That's basically all you should need as far as I understand it.

Yeah it is. I wasn't sure how that functionality was implemented in the game initially but water logging crops prevents water from breaking them.

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.