Skip to content

Making a Multi-Layered Item-Model with Datagen #3496

Discussion options

You must be logged in to vote

Ok i got it.
I added my own model in the same file:

    private final Model HANDHELD_TWO_LAYERS = item("handheld", TextureKey.LAYER0, TextureKey.LAYER1);
    private static Model item(String parent, TextureKey LAYER0, TextureKey LAYER1) {
        return new Model(Optional.of(new Identifier("item/" + parent)), Optional.empty(), LAYER0, LAYER1);
    }

and then i added and item by:

HANDHELD_TWO_LAYERS.upload(new Identifier(TestMod.MOD_ID, "item/nameofitem), TextureMap.layered(new Identifier(TestMod.MOD_ID, "item/firstlayer"), new Identifier(TestMod.MOD_ID, "item/secondlayer")), itemModelGenerator.writer);

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@theoretischer
Comment options

@theoretischer
Comment options

Answer selected by theoretischer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
2 participants