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

Hi, is there a way to understand if an item is a crop? (plantable on  a farmland)

I think yes i mean probably use a boolean with instanceof BlockNamedItem it should work altough i'm not sure if the BlockNamedItem class is only used for plantables but it should work!

  • Author
1 minute ago, Crazzy4999 said:

I think yes i mean probably use a boolean with instanceof BlockNamedItem it should work altough i'm not sure if the BlockNamedItem class is only used for plantables but it should work!

Some crops have no seed in the name

XD that's doesn't mean that the code isn't almost the same bruuuh the potato and wheat seed item extends to the same class

  • Author
3 minutes ago, Crazzy4999 said:

XD, ciò non significa che il codice non sia quasi lo stesso bruuuh che l'elemento di seme di patata e grano si estende alla stessa classe

Also for modded seed?

Not really i mean it's just a class you know what i'm saying basically there is no seed at all just a class but anyway what are you trying to do? i might can help you

 

  • Author
1 minute ago, Crazzy4999 said:

Not really i mean it's just a class you know what i'm saying basically there is no seed at all just a class but anyway what are you trying to do? i might can help you

 

A bonsai pot mod for crops

 

For only crops? if so you can check when you right click the bonsai pot if the item the player currently holding is an instanceof BlockNamedItem if so you can plant it if not than it will not let you i guess this is the concept right?

Yeah of course not but i told he/she wants to make the bonsai pot for only vanilla or for his/her mod but if he/she wants to be compatible with other mods tags are the way to go

 

  • Author
1 hour ago, poopoodice said:

You can't guarantee that other mods inherits from vanilla classes, I'll say use tags

Not every crops have the right tags

  • Author
21 hours ago, diesieben07 said:

The correct way is to check if the Block implements IPlantable. If it does, and IPlantable#getPlantType returns CROP then it can be planted on farmland.

But I can't execute it on an existing block in the world I have to execute it on an item

And not all things that plant crops are items that are BlockItems.

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.

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.