You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Require only textures to have models of item/block
Goals
Simplify development of item/block regular texture-based models
Reduce amount of boilerplate json
Reduce mistake probability by reducing necessary parts
Non Goals
Replace json/baked models system
Motivation
I hate json modding, want to minimize hand writing of json
Description
Most frequently used case of item model in mods is just a regular item model based on texture generated by ItemLayerModel.getQuadsForSprite.
However, you need to always put a few files in special locations: /assets/modid/models/item/registry_name.json /assets/modid/textures/items/registry_name.png
But only the second is providing a visual sense of the item.
First file is always boilerplate like:
And this feels really good.
This example is simplified, but can be extended to support blocks/fluids/metadata.
Also the user can still provide regular json model or coded model if its need to override default model.
Kinda such commonly used default behavior should be in the framework but not in the user space.
Dependencies
No response
References
No response
Guidelines
I have and will continue to adhere to the guidelines
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Summary
Require only textures to have models of item/block
Goals
Non Goals
Motivation
I hate json modding, want to minimize hand writing of json
Description
Most frequently used case of item model in mods is just a regular item model based on texture generated by
ItemLayerModel.getQuadsForSprite.However, you need to always put a few files in special locations:
/assets/modid/models/item/registry_name.json/assets/modid/textures/items/registry_name.pngBut only the second is providing a visual sense of the item.
First file is always boilerplate like:
{ "parent": "minecraft:item/generated", "textures": { "layer0": "modid:items/registry_name" } }It would be nice if you only had to provide the texture.
To solve it, I frequently use code like follow:
And this feels really good.
This example is simplified, but can be extended to support blocks/fluids/metadata.
Also the user can still provide regular json model or coded model if its need to override default model.
Kinda such commonly used default behavior should be in the framework but not in the user space.
Dependencies
No response
References
No response
Guidelines
All reactions