You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey, I maintain OpenInv, which is a plugin for opening other people's inventories. I've had a relatively high number of reports of items being deleted due to sorting plugins. I don't think it's clicksort, but you are one of the most popular sorting plugins. My main worry is a sorting plugin trying to put items into nonexistent slots - the player inventory isn't an even multiple of 9, so there's some filler. Previously this was at the end of the inventory, but in newer versions it will be mixed in with some other special slots for legibility. All fake slots drop items they receive at the inventory owner, but it would be better for that to just not happen in the first place - players aren't allowed to insert into these slots internally.
It would be really great if you could exclude upper player inventories from sorting - either checking for InventoryType.PLAYER or instanceof PlayerInventory will work with OpenInv's inventories.
Alternately, if you do want to explicitly include sorting others' inventories as a feature, on 1.21 (when I finish with 5.0.0, at least) InventoryView#getSlotType(int) will also accurately represent what type of slot is at what index. Using that might be preferable to the magic numbers you currently use - OpenInv puts the hotbar in slots 27-35 so that the layout matches the standard player inventory for legibility. I'm not sure how that compares to other inventory editing plugins - I deliberately avoid looking at competitors so I don't accidentally skid ideas or design.
/e: Alternately, Inventory#getStorageContents/setStorageContents accept normally-organized bulk contents where the hotbar is 0-8.
The text was updated successfully, but these errors were encountered:
Hey, I maintain OpenInv, which is a plugin for opening other people's inventories. I've had a relatively high number of reports of items being deleted due to sorting plugins. I don't think it's clicksort, but you are one of the most popular sorting plugins. My main worry is a sorting plugin trying to put items into nonexistent slots - the player inventory isn't an even multiple of 9, so there's some filler. Previously this was at the end of the inventory, but in newer versions it will be mixed in with some other special slots for legibility. All fake slots drop items they receive at the inventory owner, but it would be better for that to just not happen in the first place - players aren't allowed to insert into these slots internally.
It would be really great if you could exclude upper player inventories from sorting - either checking for
InventoryType.PLAYER
orinstanceof PlayerInventory
will work with OpenInv's inventories.Alternately, if you do want to explicitly include sorting others' inventories as a feature, on 1.21 (when I finish with 5.0.0, at least)
InventoryView#getSlotType(int)
will also accurately represent what type of slot is at what index. Using that might be preferable to the magic numbers you currently use - OpenInv puts the hotbar in slots 27-35 so that the layout matches the standard player inventory for legibility. I'm not sure how that compares to other inventory editing plugins - I deliberately avoid looking at competitors so I don't accidentally skid ideas or design./e: Alternately, Inventory#getStorageContents/setStorageContents accept normally-organized bulk contents where the hotbar is 0-8.
The text was updated successfully, but these errors were encountered: