Started by
Mymann
on
Topic category: Help with Minecraft modding (Java Edition)
Need help with creating a block that function identical to a vanilla chest.
Requirements:
- 27 slots for items
- Can contain items
- Break items when broken
- Doesn't merge with other to create a double chest
- Have animations for opening and closing, can utilize Geckolib if needed (I have already created the model that is just an edit of the single Chest).
- Play vanilla chest sounds for when opening and closing.
Any help would be appreciated.
Edited by Mymann on Thu, 07/25/2024 - 16:47
Okay then, good to know I am just tracing someone's else footsteps on this, then I will make an "ugly workaround with what I got then :))
I have even tried to get in touch with the Geckolib dev and he said that the 1.19.2 version that I am working on wont be supported anymore, but newer versions will be, hopefully that is the version that you make your chest.
Can you share with me what did you tried that didn't work for your custom chest? Did you tried look into coding as well? Bo_bo
I didn't look into code, I tried to do your same thing (when GUI is opened play animation 1, when GUI is closed play animation 2) then I tried making different chests with only 1 animation each and replace them before playing the animation with the GUI triggers but it still didn't work, then I tried assigning NBT tags to the chest (when GUI is opened set NBT tag to true, when is closed set NBT tag to false) and then trigger the animation with those but it didn't work either, I can't give you further informations because I deleted all the failed attempts
thank you for your answer, up to now I have got the open animation to play when user open chest and the closing animation when done using, but I still cannot get the middle animation with the lid staying open while in the use to play, it seems the GUI using have trouble detecting the USING animation of some sort. I will keep looking for the answer, even if I need to reach out to actual modders who can code and will look down on me for using Mcreator mods.
Alright, good luck
Did you also notice that the chest stay open animation also work ONLY IF the player is standing directly on top of it? Yeah I've just noticed it.
This is what I mean by that, the animation does work, it only require you to stand on it, from testing if you are moved by water the animation will also fail.
Link if replay fail: https://imgur.com/HEvqtql
https://imgur.com/a/PKPoGpv
Okay I have done the best in my ability to solve the problem, and I came to the conclusion that Mcreator sucks at logic lmao. The problem to why the chest lid only stay open IF you are on top of it was because of the coord of the GUI using procedure in Mcreator, so for the open and close procedure it checks the xyz of block that the player right-click but the using coord of where the player is present, so normally you must be right on top of it for it to work.
My work around is to have the game to check all the chest in the area to see if there is a block with the GUI is being used, but in actuality there is no way to check if a GUI of a linked block, so I can only check all the block in an area, but if I do that then every chests will open its lid if you right-clicked it, so I limited it to only the chests in the shape of a cross around me will have its lid activated.
Please tell me if you do have any new ideas :).
I must say, that's serious dedication
The animation's a bummer lol, even when the lid open animation play it still jittering and being super glitchy as you can see in the clip, ik I am dedicated to this but dont forget you put 1 week into making one with no avail, I guess this is the final step for the chest saga, thanks for accompany me along the way.
It was an honor
I just make the lone chest to have the GUI of a double chest instead, since the GUI is so big it covered the lid opening so the chest only need the open and close animation.
Okay, this issue is entirely resolved in Mcreator 2024.2, in lower versions the animations will always cut even if set to "Hold on last frame", which got resolved in 2024.2, I no longer need to do the check for all the nearby chests and only need to use the 2 procedures for the lid open animation (1) when GUI is opened and the closing animation when finished using the GUI (2)
Check out my mod, it has a lot of chests.
https://legacy.curseforge.com/minecraft/mc-mods/scavenger-chest