Posted April 22, 20205 yr I've implemented a custom survival inventory with a custom itemhandler, with the end goal being something like this: The player's inventory has different tabs for different categories of items, like the creative tab, except each tab would be its own container and be able to keep track of item stacks. One for swords, tools food, etc. Most importantly, there is a "General" tab for misc items, but also so that the player inventory can still interact with crafting tables, furnaces, etc without breaking the vanilla containers. The problem I've run into so far is when adding slots for the various containers, I'm not sure how I should be handling the player hotbar. It obviously needs to be tied to the default player inventory with 3x9 slots, but I don't know how I should be handling that vs the custom inventory. Currently when I pick up items, it goes straight to the default inventory even though it's canceled. Edited April 22, 20205 yr by Turtledove
April 22, 20205 yr Author 21 minutes ago, diesieben07 said: Subscribe to EntityItemPickupEvent, cancel it and then do your own pick-up processing. Would you recommend taking items from the default inventory out from within the itemhandler or container instead? As in, after a player picks up an item, have it appear first in the default inventory, and if it fits within a certain category, it will move to another container. This way, if a player is using a vanilla furnace or crafting table and needs to place recipe items into the default inventory, they can do so. Edited April 22, 20205 yr by Turtledove
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.