Jump to content

Recommended Posts

Posted

Let me start by saying I have a very basic knowledge of Java and have been learning as I go and I'm still extremely new to Minecraft modding, so I greatly appreciate any help or explanations anyone can provide. I am trying to create a subclass that is going to be assigned to a number of items that will all be used in crafting recipes, basically as a catalyst, with the intention to leave the catalyst item (unaltered, no durability change, no state changes, just the exact item that was used) in the crafting table. I already know that I need to override a method within the subclass, but I'm not well-versed enough to figure out which method to override. I would greatly appreciate it if someone were able to write out a very simple outline of it with placeholders, or tell me the exact method name and the default parameters that belong with it. Thank you in advance for any insight you can provide.

Posted
23 minutes ago, Hipposgrumm said:

You can see how the bucket behaves in this way.

I took a look through the BucketItem subclass and was only able to find that it implemented DispensableContainerItem, however I don't want it to function exactly as a bucket does as well. For some added context, I'm making a knife to process items into finer variants, but want to keep the knife with no durability usage to it so only one ever needs to be made. I did some more research and it seems that there is a Item#getContainerItem method that is called on whenever items are crafted to determine if it should be left, I'm just unsure of how to override it within my own class (Although with the date on the posts and no clarification, I'm not entirely sure if it's for the correct version, so it may have been changed.) 

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.