35 lines
939 B
JavaScript
Executable File
35 lines
939 B
JavaScript
Executable File
StartupEvents.registry('block', e => {
|
|
console.log('Creating grist blocks');
|
|
Grist.forEachBlock(grist => {
|
|
console.log(`Create ${grist}`);
|
|
e.create(grist.id())
|
|
.displayName(grist.displayName())
|
|
.tagBlock('mineable/pickaxe')
|
|
.textureAll(grist.blockTexture())
|
|
.color(0, grist.color());
|
|
});
|
|
});
|
|
|
|
StartupEvents.registry('item', e => {
|
|
console.log('Creating grist items');
|
|
Grist.forEach(grist => {
|
|
console.log(`Create ${grist}`);
|
|
e.create(grist.id())
|
|
.displayName(grist.displayName())
|
|
.rarity('rare')
|
|
.fireResistant(true)
|
|
.textureJson({layer0: grist.itemTexture()})
|
|
.color(0, grist.color());
|
|
});
|
|
});
|
|
|
|
StartupEvents.registry('fluid', e => {
|
|
console.log('Creating grist fluids');
|
|
Grist.forEachFluid(grist => {
|
|
console.log(`Create ${grist}`);
|
|
e.create(grist.id())
|
|
.bucketColor(grist.color())
|
|
.thickTexture(grist.color())
|
|
.displayName(grist.displayName());
|
|
});
|
|
}); |