custom number of slots in a chest /shulker/enderchest

hacku

New member
Joined
Aug 4, 2023
Messages
11
So i've been thinkin how can i make custom number of slots for any storage container, like a 1 row of slots or maybe 2... idk i feel like its impossible but if theres any coding nerd out there help me. reply
 

Ezolile

Member
Joined
May 19, 2023
Messages
40
This depends on what exactly you trying to make. There are different type of containers you can use. Like chests, shulker boxes, droppers, dispensers, hoppers, even crafting table can be used with a bit coding. Also you could fill up unwanted slots in chest with for example black glass panes and code it so they can't be moved (clicked). This way you can have any number of slots you want available to player.
 

hacku

New member
Joined
Aug 4, 2023
Messages
11
This depends on what exactly you trying to make. There are different type of containers you can use. Like chests, shulker boxes, droppers, dispensers, hoppers, even crafting table can be used with a bit coding. Also you could fill up unwanted slots in chest with for example black glass panes and code it so they can't be moved (clicked). This way you can have any number of slots you want available to player.
well i know what you mean but thats not what i meant exactly because lets say im coding a custom crafting system i need a container i choose chest so i need 5 slot rows but normal double chest has 6 so is there a way to customize it rather than using command blocks on a private world (not on the server) and getting gllitched items?

And if u know any coding nerd mention him to help
 

Ezolile

Member
Joined
May 19, 2023
Messages
40
well i know what you mean but thats not what i meant exactly because lets say im coding a custom crafting system i need a container i choose chest so i need 5 slot rows but normal double chest has 6 so is there a way to customize it rather than using command blocks on a private world (not on the server) and getting gllitched items?

And if u know any coding nerd mention him to help
For this do as I mentioned before. Place something (usually players place glass panes) in 6-th row and code it so they cant be clicked. Like for example you have chest named Shop where you want 5 rows. You fill up 6-th row with glass panes and code this: Player clicked on inventory item > If player inventory name = Shop > If player item = glass pane > cancel event. There is no way as far as I know to change default containers slots. You can just disable them like this.
 

hacku

New member
Joined
Aug 4, 2023
Messages
11
For this do as I mentioned before. Place something (usually players place glass panes) in 6-th row and code it so they cant be clicked. Like for example you have chest named Shop where you want 5 rows. You fill up 6-th row with glass panes and code this: Player clicked on inventory item > If player inventory name = Shop > If player item = glass pane > cancel event. There is no way as far as I know to change default containers slots. You can just disable them like this.
what i mean like this, (2nd one has only 5 rows) is there a way i can make them like that cuz I really need them
 

Attachments

  • images.png
    images.png
    2.8 KB · Views: 3
  • images (1).png
    images (1).png
    1.5 KB · Views: 3

Ezolile

Member
Joined
May 19, 2023
Messages
40
what i mean like this, (2nd one has only 5 rows) is there a way i can make them like that cuz I really need them
I already told you there is no obvious way to change default number of containers slots in Mineland C+. You can only do what I proposed before. Everyone is using this method so I do not see any reason (except aesthetics) to make stuff complicated. Functionality will be same. Use container that is closest to number of slots and arrangement you need and fill up unnecessary slots.
 
Top