Inventory Profiles Next

Inventory Profiles Next

23M Downloads

Allow designating inventory slots in profiles

zwamdurkel opened this issue ยท 7 comments

commented

Just like armor, offhand and hotbar can be designated.
Allow the user define the remaining inventory slots to specific items in the profiles.

These are the current valid slots:
HOT1|HOT2|HOT3|HOT4|HOT5|HOT6|HOT7|HOT8|HOT9|CHESTPLATE|LEGS|FEET|HEAD|OFFHAND
I suggest adding INV1 - INV27

Why should this be added:
I like certain items in specific spots. Back when the mod "Inventory Tweaks" existed, this was possible.
This should be possible even if it is slightly computationally heavy, since it will only be executed on the switch profile event.

eg: enderchest in 1st slot, arrow in 2nd etc

image

commented

I feel like Im missing something. For all slots you need to check if they contain an item that is defined in the profile, and then move it to the correct location. (Or the other way around) that seems like all slots * number of slots in the profile (O(m*n)) to me. In most cases it would be much simpler though, but this is worst case.

If you can somehow make the profiles a hashtable (instant lookup) it would be (O(1*n) = O(n)). but I'm not sure about the details of this mod so it's up to the developer to decide whether that's possible.

commented

worst case scenario is there are no item In the inventory matching the profile
so for every item from the profile we need to check every slot

Of course there are optimisation that can be made and are made in the current implementation.

hashing is used as far as minecraft implements the nbt search properly.

commented

This should be possible even if it is slightly computationally heavy, since it will only be executed on the switch profile event.

It's very computationally heavy especially on servers ( worst case scenario is all slots ^ number of slots in the profile ). It also clashes with the sorting so you will need to lock the slots. But you can probably simulate the behaviour you want with locked slots.
Also switching profiles prefers to put the items in empty locked slots. I have a video in the discord server where you can see it in action.

But I'm open to discussion about it and if locked slots are mostly enough or not

commented

I hope you do add this in the future because until then, this mod isn't really useful to me :/

commented

@LemonShaped this issue is closed with won't fix so no I won't be adding such feature. I hope you find alternative.

commented

I know you say you won't add it, but it would be a really good nice to have, and alot of people would use it. if its because its thought that players would use it and find it slow or broken then just add it hidden in advanced settings for the players who know the cons with using it. Not having this feature in the mod tbh makes it seem half-baked compared to what was possible back in the day, and also makes it seem like 2 steps back 1 step forward again compared to back in the days with inventory tweaks and such

commented

back in the day Inv Tweaks worked server side where this will be very easy to implement.
IPN is pure client side and as such the inventory is not a structure that you rearrange and send to the client.