only add repairWith array when it has something in it
This commit is contained in:
@@ -69,7 +69,9 @@ public class ItemsDataGenerator implements IDataGenerator {
|
|||||||
Identifier repairWithName = itemRegistry.getKey(repairWithItem).orElseThrow().getValue();
|
Identifier repairWithName = itemRegistry.getKey(repairWithItem).orElseThrow().getValue();
|
||||||
fixedWithArray.add(repairWithName.getPath());
|
fixedWithArray.add(repairWithName.getPath());
|
||||||
}
|
}
|
||||||
|
if (fixedWithArray.size() > 0) {
|
||||||
itemDesc.add("repairWith", fixedWithArray);
|
itemDesc.add("repairWith", fixedWithArray);
|
||||||
|
}
|
||||||
|
|
||||||
int maxDurability = item.getMaxDamage();
|
int maxDurability = item.getMaxDamage();
|
||||||
itemDesc.addProperty("maxDurability", maxDurability);
|
itemDesc.addProperty("maxDurability", maxDurability);
|
||||||
|
|||||||
Reference in New Issue
Block a user