[Resolved] How to make a custom chest

Started by Mymann on

Topic category: Help with modding (Java Edition)

Last seen on 07:37, 14. Sep 2024
Joined Jun 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
[Resolved] How to make a custom chest
Thu, 07/25/2024 - 16:47 (edited)

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
Last seen on 07:37, 14. Sep 2024
Joined Jun 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Okay then, good to know I am…
Sun, 07/21/2024 - 16:05

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.

Last seen on 07:37, 14. Sep 2024
Joined Jun 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Can you share with me what…
Wed, 07/24/2024 - 02:11

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

Last seen on 05:55, 16. Sep 2024
Joined Apr 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I didn't look into code, I…
Wed, 07/24/2024 - 02:25

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

Last seen on 07:37, 14. Sep 2024
Joined Jun 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
thank you for your answer,…
Wed, 07/24/2024 - 02:40

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.

Last seen on 05:55, 16. Sep 2024
Joined Apr 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Alright, good luck
Wed, 07/24/2024 - 02:54

Alright, good luck

Last seen on 07:37, 14. Sep 2024
Joined Jun 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Did you also notice that the…
Wed, 07/24/2024 - 03:52

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.

Last seen on 07:37, 14. Sep 2024
Joined Jun 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
This is what I mean by that,…
Wed, 07/24/2024 - 10:49

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

Last seen on 07:37, 14. Sep 2024
Joined Jun 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
https://imgur.com/a/PKPoGpv…
Thu, 07/25/2024 - 14:04

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 :).

Last seen on 05:55, 16. Sep 2024
Joined Apr 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I must say, that's serious…
Thu, 07/25/2024 - 14:08

I must say, that's serious dedication

Last seen on 07:37, 14. Sep 2024
Joined Jun 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
The animation's a bummer lol…
Thu, 07/25/2024 - 15:53

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.

Last seen on 05:55, 16. Sep 2024
Joined Apr 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
It was an honor 
Thu, 07/25/2024 - 16:09

It was an honor 

Last seen on 07:37, 14. Sep 2024
Joined Jun 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I just make the lone chest…
Sun, 08/04/2024 - 15:49

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.

Last seen on 07:37, 14. Sep 2024
Joined Jun 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Okay, this issue is entirely…
Wed, 08/28/2024 - 10:26

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