Skip to content

[1.12.2] Use resource packs when creating items #277

@zfms4188

Description

@zfms4188

`#loader contenttweaker
import mods.contenttweaker.CreativeTab;
import mods.contenttweaker.VanillaFactory;
import mods.contenttweaker.Item;
import mods.contenttweaker.ResourceLocation;

VanillaFactory.createCreativeTab("other", item:minecraft:experience_bottle).register();

function cjwp(name as string) {
val item = VanillaFactory.createItem(name) as Item;
item.setCreativeTab(creativetab:other);
var path = ResourceLocation.create("contenttweaker:items/i");
item.textureLocation = path;
item.register();
}

for a in 0 .. 30 {
cjwp("i" ~ a);
}`
It doesn't work properly and textures are missing after entering the game

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions