Jump to content

Recommended Posts

Posted

I'm looking to make the items hay and wheat edible, but I'm not sure how to go about doing it. The only way I can think of would be to stop those items from being generated or crafted, and creating entirely new items and blocks to replace them, but if possible I do not want to do that as it sounds extremely complicated and messy. Is there another way to make hay and wheat edible?

 

Any help is appreciated. A link to another forum post I missed or pointing me to a certain area in the code would be helpful.

Thanks in advance! :)

Posted

Hi

 

I think that creating your own new items & blocks for an edible hay and wheat is probably the best way to do it.  It's not as difficult as you might think, and actually- is there a particular reason you couldn't have both edible hay and (vanilla) non-edible hay in the game?

 

-TGG

Posted

Thank you for the reply!

 

It's not recreating the blocks and items that I wanted to avoid, it was blocking out the old hay and wheat. But if that is the best way of going about it then I'm willing to.

Posted

Might take some tricks and hacks, but this might work.

 

Try using PlayerInteractEvent, check if the player is right-clicking and holding I guess "hay or wheat." That's what you want isn't it?

It would be difficult to create an eating animation, but I think there's a method for that.

If not, you can try using Java Reflection.

 

Upon consuming it, create some kind of timer (if you want) and add the effects you want.

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.