Skip to content

5 Modifying My Code

HydraheadHunter edited this page Mar 15, 2025 · 1 revision

Do whatever you want forever, but if you're gonna modify my code, here are some things you would probably like to know.

Increasing the max_stack_size cap

Why anyone would need an item to stack to more than 2048 is beyond me, but if you're eldrich like that, I've made it both straight forward and easy.

In src/main/java/hydraheadhunter.datastacks.DataDrivenStacks, change the value of MAX_STACK_SIZE_CAP.

Stack Count Rendering

The Vanilla fontsize for stack counts runs off it's slot and into the neighboring slot. I over-ride this behavior by mixinto minecraft.gui.DrawContext through client/java/hydraheadhunter.datastacks.mixin.client.DrawContextMixin. If you'd have strayed so far from Batman that you increase the max stack cap to over 9999, you will need to render things slightly differently. This is gon' be the easiest spot in the code.

Shulker Boxes

Shulker Boxes' unique behavior of having two stack counts for empty and non-empty boxes is controlled by the boolean SMALLER_STACK_FULL_SHULKER in src/main/java/hydraheadhunter.datastacks.DataDrivenStacks. Note that setting it to false will invert the behavior rather than disabling it. If you want to disable it entirely (rather than just configure your datapack to not use it), the behavior is defined and carried out in ItemStack_SizeMixin#updateMaxStackSizeWithTag().

Clone this wiki locally