tr7zw / ItemSwapper

Tweaks to the inventory system based on Xisumavoid's video.
Other
98 stars 27 forks source link

Conflict with Inventory Profiles Next's locked slots functionality #198

Open heldheld opened 3 months ago

heldheld commented 3 months ago

Version information

itemswapper-fabric-0.5.5-mc1.20.4

Other relevant installed mods

Inventory Profiles Next 1.10.9

Expected Behavior

When a slot has been locked using the Locked Slot functionality of the mod Inventory Profiles Next, I expect Item Swapper to realise this and not be able to be used to swap items from/to that slot.

Actual Behavior

The locked slots are treated as any other slot.

Reproduction Steps

Lock a slot, that holds an item, in the hotbar. Select that slot and use either of Item Swappers hotkeys to swap the item to another.

Render engine

Additional information

No response

tr7zw commented 3 months ago

I expect Item Swapper to realise this and not be able to be used to swap items from/to that slot.

Since there is no "locked slot" logic in vanilla Minecraft, there is nothing for the mod to realize/check for this. This is not really a bug, more a compatibility request. Will look into it at some later point.

heldheld commented 3 months ago

This is not really a bug, more a compatibility request.

Ah yes, I see what you mean, my mistake.

Will look into it at some later point.

Good luck, hope you can find a way, thanks for wanting to look into it.

blackd commented 3 months ago

IPN has an API that returns the locked slots.

https://github.com/blackd/Inventory-Profiles/blob/all-in-one/shared-sources%2Fsrc%2Fmain%2Fkotlin%2Forg%2Fanti_ad%2Fmc%2Fipn%2Fapi%2Faccess%2FIPN.kt

In java it will be something like this

IPN.getInstance().getLockedSlots()