Jump to content

Custom Furnace Polishing


skip999

Recommended Posts

Hello,

I have made a custom furnace and now I'm trying to add a couple features to bring it up to standards with most mods. Firstly, how would I implement it to where a player is able to shift-click items in and out of the inventory. I would also like hoppers to be able to interact with the block. Secondly, how would I add JEI integration so players are able to see the recipes the block offers when looking in JEI. I really don't know what to do here as I am new to modding, and all of the existing tutorials on the subject are for 1.12.2.

 

Thanks!

Link to comment
Share on other sites

9 minutes ago, skip999 said:

Hello,

I have made a custom furnace and now I'm trying to add a couple features to bring it up to standards with most mods. Firstly, how would I implement it to where a player is able to shift-click items in and out of the inventory. I would also like hoppers to be able to interact with the block. Secondly, how would I add JEI integration so players are able to see the recipes the block offers when looking in JEI. I really don't know what to do here as I am new to modding, and all of the existing tutorials on the subject are for 1.12.2.

 

Thanks!

* Shift-clicking functionality is done via the transferStackInSlot() method in your custom furnace Container class. You could check out the vanilla furnace container to see an example of how it could be done.

* Hopper interaction should automatically work by returning a LazyOptional with your ItemStackHandler(s) in the getCapability() method in your furnace tile entity.

* Check out the JEI wiki on how to make your mod recipes show up in JEI.

 

Hope this helps!

Edited by vemerion
Link to comment
Share on other sites

Okay so I have put the lines in for the dependencies and the repositories for JEI, but I actually have no idea how to make the gradle import the libraries now that I have done so. I have linked my gradle file. For reference I am using Eclipse. How would I make the gradle import the files?

 

https://gist.github.com/skiprocks999/47927e40b66eee121ab2b30ff71059cb

Link to comment
Share on other sites

9 hours ago, skip999 said:

Okay so I have put the lines in for the dependencies and the repositories for JEI, but I actually have no idea how to make the gradle import the libraries now that I have done so. I have linked my gradle file. For reference I am using Eclipse. How would I make the gradle import the files?

 

https://gist.github.com/skiprocks999/47927e40b66eee121ab2b30ff71059cb

In situations like this, I find it helpful to look at examples. For example, here is the build.gradle for the Botania mod, which has jei as a dependency. Here are the classes related to jei in the Cyclic mod.

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.