-
Notifications
You must be signed in to change notification settings - Fork 0
Simple Item Models
Simple Item Models are the fastest way to register standard items in a resource pack.
Instead of manually creating:
ItemModelsItemModelModelNodeItemModelDefinitionModelTextures
the framework can generate everything automatically from a single ResourceLocation.
Simple Item Models automatically generate:
{
"model": {
"type": "minecraft:model",
"model": "namespace:item/item_name"
}
}{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "namespace:item/item_name"
}
}Both are created from the same item identifier.
Generated items use the vanilla parent:
minecraft:item/generated
These are suitable for:
- Materials
- Food
- Gems
- Components
- Most inventory items
ResourceLocation shrimp =
new ResourceLocation(
"mingcraft",
"shrimp"
);
SimpleItemModels
.generated(shrimp)
.register(pack);Generated assets:
{
"type": "minecraft:model",
"model": "mingcraft:item/shrimp"
}{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "mingcraft:item/shrimp"
}
}Handheld items use:
minecraft:item/handheld
These are suitable for:
- Swords
- Axes
- Pickaxes
- Shovels
- Weapons
- Tools
SimpleItemModels
.handheld(
new ResourceLocation(
"mingcraft",
"steel_sword"
)
)
.register(pack);Generated model:
{
"parent": "minecraft:item/handheld",
"textures": {
"layer0": "mingcraft:item/steel_sword"
}
}Handheld rod items use:
minecraft:item/handheld_rod
These are suitable for:
- Fishing rods
- Wands
- Magic staffs
- Rod-like items
SimpleItemModels
.handheldRod(
new ResourceLocation(
"mingcraft",
"magic_wand"
)
)
.register(pack);Simple Item Models automatically derive the texture path from the item id.
Given:
new ResourceLocation(
"mingcraft",
"ruby"
)The generated texture becomes:
mingcraft:item/ruby
Given:
new ResourceLocation(
"mingcraft",
"steel_sword"
)The generated texture becomes:
mingcraft:item/steel_sword
No additional texture configuration is required.
Simple Item Models still create a standard ItemModels instance internally.
Properties such as:
- Hand animation behavior
- GUI scaling
- Swap animation scale
may be configured before registration.
Example:
SimpleItemModels.generated(
new ResourceLocation(
"mingcraft",
"giant_hammer"
)
)
.oversized()
.swapScale(1.5f)
.register(pack);Use Simple Item Models when:
-
The item uses a single texture
-
The item uses a vanilla parent
-
The item does not require conditional models
-
The item does not require range dispatch
-
The item does not require custom model graph logic
Use the full API when you need:
SelectNodeConditionNodeCompositeNodeRangeDispatchNode- Custom tints
- Dynamic item properties
- Multiple layered model graphs
Example:
ItemModels model =
Models.model()
.root(
Selects.select(
"minecraft:charge_type",
Nodes.empty(),
...
)
)
.build();The full API provides complete access to Minecraft's item model system, while Simple Item Models provide a fast path for common items.