9
0
mirror of https://github.com/Xiao-MoMi/Custom-Crops.git synced 2025-12-25 18:09:28 +00:00

Fix appearance

This commit is contained in:
XiaoMoMi
2024-04-26 17:39:20 +08:00
parent 8a279bfefd
commit 38d2ede3c0
2 changed files with 4 additions and 1 deletions

View File

@@ -163,6 +163,9 @@ public class WateringCanConfig extends AbstractEventItem implements WateringCan
if (maxDurability != 0) {
nbtItem.setInteger("Damage", (int) (maxDurability * (((double) storage - water) / storage)));
}
if (appearanceMap.containsKey(water)) {
nbtItem.setInteger("CustomModelData", appearanceMap.get(water));
}
itemStack.setItemMeta(nbtItem.getItem().getItemMeta());
}