LegoMaster3650 / Inventory-Crafter

Gives you a portable crafting table button/keybind if you have a crafting table item
MIT License
0 stars 0 forks source link

[compatibility] with Inventorio #7

Open UplandJacob opened 3 months ago

UplandJacob commented 3 months ago

2 things:

In short, it would be great if you could have a crafting table in your extra inventory rows and still be able to use the inventory crafting and have the 'inventory crafting' button available in the Inventorio screen.

LegoMaster3650 commented 3 months ago

I like inventorio so I'll consider this (but if I do I'll have to specifically add and maintain compatibility with this one mod)

UplandJacob commented 3 months ago

May have found what you need to implement this:

https://github.com/RubixDev/Inventorio/blob/main/src/main/kotlin/de/rubixdev/inventorio/player/inventory/PlayerInventoryExtension.kt

Line 191 has “contains(ItemTag)” like what you have used for the vanilla inventory

That code is incredibly confusing, so hopefully I found something useful. :)

LegoMaster3650 commented 3 months ago

Don't worry I'll figure it out if I do it, thanks though! (might take a while to get to this though)

LegoMaster3650 commented 3 months ago

Although yeah that's in kotlin which I've never tried to add compatibility with a kotlin mod so hopefully it won't be too hard.

UplandJacob commented 3 months ago

Yea I noticed that too.

For checking if the current screen is the inventorio screen:

"instanceof InventorioScreen" etc

class is declared here: https://github.com/RubixDev/Inventorio/blob/main/src/main/kotlin/me/lizardofoz/inventorio/client/ui/InventorioScreen.kt

LegoMaster3650 commented 3 months ago

Ok enough I can read the code and the hard part is making sure I don't break the mod for people without inventorio, reading code is the easy part.