Started by
SupremeHunter2022
on
Topic category: Help with Minecraft modding (Java Edition)
hi. i'm trying to make a custom single and double chest on my mod. i'm currently use mcreator 2023.4 to do my mod. can someone help me please???
Topic category: Help with Minecraft modding (Java Edition)
hi. i'm trying to make a custom single and double chest on my mod. i'm currently use mcreator 2023.4 to do my mod. can someone help me please???
(Friendly advice- try to name your posts something related to the topic, otherwise it's harder to get help!)
The single chest is sort of straightforward: you want to create a block, probably with a custom model since chests aren't a full 1*1*1 block, then give it an inventory of 27 slots, each with 64 item capacity. (By enabling 'block entity' in the item's properties tab.) You then need a procedure which, when right clicked, opens a custom GUI with 27 input slots. (Each of which will be automatically linked to the blocks 27 storage slots.) This will be mildly annoying to make, (MCreator's GUI creation interface isn't the greatest), but shouldn't take too long. A player can then right click on your block, opening the inventory, and exchange items between their inventory and the chest's.
The double chest is substantially harder, though not impossible. You need two separate blocks, (one for the left side, one for the right.) One of the blocks needs to have zero slots, the other needs to have 54. Make the GUI behave like usual, except whenever the player clicks on the side of the chest with no slots, cancel the trigger and simulate a right click on the other block. (Or find another means of opening the GUI for the block that actually has the inventory.) You'll also need a procedure that reverts the block to the single version of your chest and either transfers half of the filled side's inventory to the new single chest, (if the filled side is broken), or ejects half of the double chest's inventory into the broken block, (if the unfilled side is broken.)
like its too complicate for me... i'm at the beggining of this type of block...even if it's been 3 yeras that i try to make workspace i still don't understand how procedure work. maybe i just need to follow some tutorial... thanks for your information.
NorthWestTrees probably has a better explanation than mine, worth checking out on Youtube. Anyways, good luck.