You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

29 lines
1.0 KiB

global.ore_samples = {
coal : { drop: "minecraft:coal" },
copper : { drop: "minecraft:raw_copper" },
iron : { drop: "minecraft:raw_iron" },
gold : { drop: "minecraft:raw_gold" },
lapis : { drop: "minecraft:lapis_lazuli", name: "Lapis Lazuli" },
redstone : { drop: "minecraft:redstone" },
diamond : { },
emerald : { },
zinc : { drop: "create:raw_zinc" },
};
for (const key in global.ore_samples) {
var entry = global.ore_samples[key];
entry.id = `kubejs:${key}_ore_sample`
entry.name = entry.name || `${key[0].toUpperCase()}${key.substring(1)}`;
}
StartupEvents.registry("block", (event) => {
for (const { id, name } of Object.values(global.ore_samples))
event.create(id.split(":")[1])
.displayName(`${name} Sample`)
.stoneSoundType().lightLevel(0.3)
.hardness(0.2).resistance(2.0)
.box(4,0,4, 12,4,12).noCollision()
.waterlogged()
.tagBlock("mineable/pickaxe")
.tagBlock("kubejs:sample");
});