const metals = [
['tungsten', '#333333', true],
['tungstensteel', '#5e5e5e'],
['platinum', '#9bd2e8', true]
];
StartupEvents.registry("item", e => {
for (let i of metals) {
e.create(`${i[0]}_ingot`).texture(`minecraft:item/iron_ingot`).color(0, i[1]).tag(`forge:ingots`).tag(`forge:ingots/${i[0]}`);
e.create(`${i[0]}_nugget`).texture(`minecraft:item/iron_nugget`).color(0, i[1]).tag(`forge:nuggets`).tag(`forge:nuggets/${i[0]}`);
};
});
StartupEvents.registry("block", e => {
for (let i of metals) {
e.create(`${i[0]}_block`)
.textureAll(`minecraft:block/iron_block`)
.color(0, i[1])
.hardness(6)
.tagItem(`forge:storage_blocks`)
.tagItem(`forge:storage_blocks/${i[0]}`)
.tagBlock(`minecraft:mineable/pickaxe`)
.tagBlock(`minecraft:needs_iron_tool`)
.requiresTool(true);
if (i[2] == true) {
e.create(`${i[0]}_ore`)
.hardness(6)
.tagItem(`forge:ores`)
.tagItem(`forge:ores/${i[0]}`)
.tagBlock(`minecraft:mineable/pickaxe`)
.tagBlock(`minecraft:needs_iron_tool`)
.requiresTool(true);
};
};
});
#Color in the custom block isn't shown in the inventory, but is shown in the world
4 messages · Page 1 of 1 (latest)