I found a bit of a solution, although it’s a bit “hacky”
What you have to do is run .toContainer()
on the ItemStack.
Then, with that DataView, run .set(DataQuery.of("UnsafeDamage"),3)
That will set the damage value to 3. Then, you can either…
- Replace it by…
ItemStack.builder().fromContainer(dataView).build()
- Put it in place of what you were returning?
- Or just update the dataview…
itemStack.setRawData(dataView);