Techguns

Techguns

9M Downloads

Cannot use crafttweaker to set the maximum stack size of techgun items?

wormzjl opened this issue ยท 3 comments

commented

For reference: https://crafttweaker.readthedocs.io/en/latest/#Vanilla/Items/IItemStack/#maximum-stack-size

Such functions works well for other mods, but does not work on techguns items.
My guess is that there is some sort of system in TG that overrides original method?

I have the following script:

val coil = <techguns:itemshared:68>;
coil.maxStackSize = 1;

val motor = <techguns:itemshared:70>;
motor.maxStackSize = 1;

commented

Another mod is needed to tweak the internal data that defines each of the shared item.

public int getItemStackLimit(ItemStack stack) {

commented

Shared item is an item where many items get compressed into 1 item (saving item ids). Shared item overrides getMaxStackSize and therefore it is not be possible to change the maxStackSize.

commented

Normally I think one can set the stack size for each meta?