ItemsDefinition
One parsed Java 1.21.4+ items definition file (e.g. assets/elitemobs/items/gear/bronze_sword.json).
Parameters
namespace
the asset namespace (e.g. "elitemobs")
itemsRelPath
the relative path within items/ without extension (e.g. "gear/bronze_sword")
file
the actual file on disk
root
parsed JSON contents
explicitBaseItems
exact base Java item ids when the source format declares them
legacyCustomModelData
the exact pre-1.21.4 custom-model-data value, or null for a modern item-model definition
Constructors
Link copied to clipboard
public void ItemsDefinition(String namespace, String itemsRelPath, File file, JsonObject root, List<String> explicitBaseItems)
public void ItemsDefinition(String namespace, String itemsRelPath, File file, JsonObject root, List<String> explicitBaseItems, BigDecimal legacyCustomModelData)
Functions
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
True for
assets/minecraft/items/<item>.json, which names the vanilla Java item it redefines rather than a custom item model.Link copied to clipboard
The fully-qualified Java item-model identifier this definition declares.
Link copied to clipboard
public static ItemsDefinition legacyCustomModelData(String namespace, String itemsRelPath, File file, JsonObject root, String baseItem, BigDecimal customModelData)