Jump to content

[SOLVED][1.15.2] Underwater Crops


peter1745

Recommended Posts

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
Link to comment
Share on other sites

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

Link to comment
Share on other sites

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!

Link to comment
Share on other sites

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

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.