正确保存M18烟雾弹烟雾颜色

This commit is contained in:
Light_Quanta 2025-07-07 20:43:19 +08:00
parent b8db249e5d
commit f0642bb279
No known key found for this signature in database
GPG key ID: 11A39A1B8C890959

View file

@ -35,7 +35,9 @@ public class M18SmokeGrenade extends Item implements ProjectileItem {
}
public void setColor(ItemStack stack, int color) {
NBTTool.getTag(stack).putInt(TAG_COLOR, color);
var tag = NBTTool.getTag(stack);
tag.putInt(TAG_COLOR, color);
NBTTool.saveTag(stack, tag);
}
public int getColor(ItemStack stack) {