Reimplement maxDamage setter
jtgibson01 opened this issue ยท 0 comments
I would like the maxDamage setter from 1.12 versions of CraftTweaker to be reimplemented for the new CraftTweaker versions (1.16 at the very least, as it's my current use case =)).
Feature request reason
I currently have a very simple script (rewritten here using 1.14+ API):
import crafttweaker.api.item.IIngredient;
import crafttweaker.api.item.IItemStack;
<item:minecraft:wooden_axe>.maxDamage = 3;
<item:minecraft:wooden_hoe>.maxDamage = 12;
<item:minecraft:wooden_pickaxe>.maxDamage = 3;
<item:minecraft:wooden_shovel>.maxDamage = 32;
<item:minecraft:stone_axe>.maxDamage = 48;
<item:minecraft:stone_hoe>.maxDamage = 24;
<item:minecraft:stone_pickaxe>.maxDamage = 16;
<item:minecraft:stone_shovel>.maxDamage = 64;
<item:minecraft:iron_hoe>.maxDamage = 511;
<item:minecraft:diamond_hoe>.maxDamage = 4087;
which works flawlessly in 1.12, but does not work in 1.16 as there are no equivalent setters for maxDamage after the rewrite.
Feature request dependencies
Delving into the 1.12 source, it does seem as though the setter is non-trivial -- it involves calling an ActionSetStackMaxDamage action and stuff'n'such. Is this doable in the newer Minecraft versions at all?
Game Version
1.14+