Stackable is a mod that allows People to force any Item to a specific stack size. When installed it will default to 64 for every Items (including Totems, Tools and Armor). Moddeveloper can set a Maximum stacksize that will be used. This can be disabled by the User. Moddeveloper can also print a warning if this Mod does not work correctly with there Mod. They can also set a Warning when the User forces the stacksize. These warnings can be disabled.
ModMenu
Requires Cloth Config and Fabric API Recommended but not needed is Mod Menu
Default Config:
stackSize = 64 = false
forceStackSize = false
turnWarningsOff = false
useMultiplier = false
stackMultiplier = 1
Apply the stackSize only to unstackables Items like Totems or Tools:
stackSize = 64 = false
forceStackSize = false
turnWarningsOff = false
useMultiplier = false
stackMultiplier = 1
Apply only to stackables:
stackSize = 64 = true
forceStackSize = false
turnWarningsOff = false
useMultiplier = false
stackMultiplier = 1
Force the stacksize to every item of a Mod that sets a Max stacksize:
stackSize = 64 = false
forceStackSize = true
turnWarningsOff = false
useMultiplier = false
stackMultiplier = 1
Turn off any Warning in Chat on joining:
stackSize = 64 = false
forceStackSize = false
turnWarningsOff = true
useMultiplier = false
stackMultiplier = 1
Use multiplier of 8:
stackSize = 64 = false
forceStackSize = false
turnWarningsOff = false
useMultiplier = true
stackMultiplier = 8
First add jitpack to the repositories as an Repo:
repositories {
...
maven { url "https://jitpack.io" }
}
Then in dependencies:
dependencies {
modImplementation 'com.github.robaertschi:stackable:${project.stackable_version}'
}
Then in gradle.properties:
stackable_version = version
Replace version with the Mod Version which you find here on Modrinth or on the GitHub Releases.
Then implement IDefinedStackableItem for your Item. There could be an easier way in the Future without needing to create a complete new Item class but for now it is only this way.