grist: make textures generated through a makefile
This commit is contained in:
@ -5,8 +5,7 @@ StartupEvents.registry('block', e => {
|
||||
e.create(grist.id())
|
||||
.displayName(grist.displayName())
|
||||
.tagBlock('mineable/pickaxe')
|
||||
.textureAll(grist.blockTexture())
|
||||
.color(0, grist.color());
|
||||
.textureAll(grist.blockTexture());
|
||||
});
|
||||
});
|
||||
|
||||
@ -18,8 +17,7 @@ StartupEvents.registry('item', e => {
|
||||
.displayName(grist.displayName())
|
||||
.rarity('rare')
|
||||
.fireResistant(true)
|
||||
.textureJson({layer0: grist.itemTexture()})
|
||||
.color(0, grist.color());
|
||||
.textureJson({layer0: grist.itemTexture()});
|
||||
});
|
||||
});
|
||||
|
||||
|
@ -218,11 +218,11 @@ Grist.prototype.toJson = function() {
|
||||
};
|
||||
|
||||
Grist.prototype.itemTexture = function() {
|
||||
return `malloc:item/grist_${this.tier.name}`;
|
||||
return `malloc:item/grist_${this.tier.name}_${this.element.name}`;
|
||||
};
|
||||
|
||||
Grist.prototype.blockTexture = function() {
|
||||
return 'malloc:block/grist';
|
||||
return `malloc:block/grist_${this.tier.name}_${this.element.name}`;
|
||||
};
|
||||
|
||||
global.Grist = Grist;
|
Reference in New Issue
Block a user