Skip to content
This repository was archived by the owner on May 9, 2022. It is now read-only.

Releases: GoldenDelicios/box_stack

Version 1.1

16 Aug 17:59
d1d1d10

Choose a tag to compare

v1.1 changes:

Optimizations:

  • Only one shulker box color will attempt to stack per tick (spread out among 17 of the 20 ticks, formerly would attempt all 17 colors in 1 of the 20 ticks).
  • A maximum of 8 players and 8 armorstands, ordered randomly, will attempt to search for a chest (previously no maximum set).
  • Added a new setting Optimize: defaults to 0.
    • If Optimize is set to 1, once a player or armor stand finds a chest, no other entities of the respective type may search for one for 20 ticks -- a limit of 2 chests per 20 ticks.
    • Info on recommended settings below.

Other changes:

  • EnableChestSearch can now be set to 2, which will allow all survival-placed armor stands to check for chests. (Survival-placed armor stands are defined as an armor stand that has none of the following NBT tags set to true: Marker, Invisible, NoGravity.)

Recommended Optimize settings:

  • If EnableChestSearch is off, or you plan on using very few armor stands for searching chests, set Optimize to 0.
  • If EnableChestSearch is on, or your server has lots of players online at the same time, or your tick rate is low, set Optimize to 1.

Version 1.0 (The first one!)

15 Aug 21:47
d318879

Choose a tag to compare

This datapack stacks empty shulker boxes inside chests.

There are two options under scoreboard BSConfig:

  • MaxStackSize: Defaults to 64, this is the maximum number of shulker boxes the datapack will fit into a slot
  • EnableChestSearch: Defaults to 0, if set to 1, armor stands name-tagged "ChestSearch" can detect chests they are facing, just like players.
    This can be useful for contraptions like shulker box unloaders.
    They may be renamed to anything else afterwards and still keep their properties.

Notes:

  • Stacking is attempted every 20 ticks
  • Player (or armor stand) must be facing chest for stacking to occur; it is possible to open a chest and not be facing it (e.g. latency, being pushed away by water/mobs)
  • Double chests work as you'd expect
  • Shulker boxes that maintain their slot position after stacking will keep any extra tags (e.g. tooltip name) unchanged

Issues:

  • Datapack does not work with containers other than normal chests, including trapped chests
  • Chest will only use slots previously occupied by shulker boxes when stacking.
    If datapack attempts to stack and can't refit all the shulker boxes using the original occupied slots,
    any extra items that can't fit into a slot will be lost.
    This can happen if you previously stacked boxes using a higher MaxStackingSize setting, and then lowered it
  • Datapack temporarily fills chest with structure void blocks to help with counting shulker boxes and removes all of them when no longer needed.
    If this is an issue and you need to be able to store structure void blocks,
    you can use other containers (e.g. trapped chests),
    ensure to not store shulker boxes in the same chest as structure void blocks,
    or modify the functions to use some other item

Lastly, I included a bonus creative tool/debug function boxstack:debug/maxstacksize which will modify each item count in the container underneath the executor to the MaxStackSize. May be useful for some creative projects.