Jump to content

Recommended Posts

Posted

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!

Posted
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

Posted
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?

Posted
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

 

Posted

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?

Posted

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

 

Posted
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

Posted
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

Posted

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

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