mirror of
https://github.com/PixelGuys/Cubyz.git
synced 2025-09-15 07:20:09 -04:00
parent
337e014d88
commit
45fed30069
@ -128,8 +128,13 @@ pub const BaseItem = struct {
|
||||
|
||||
pub fn getTexture(self: *BaseItem) graphics.Texture {
|
||||
if(self.texture == null) {
|
||||
if(self.block) |blockType| {
|
||||
self.texture = graphics.generateBlockTexture(blockType);
|
||||
if(self.image.imageData.ptr == graphics.Image.defaultImage.imageData.ptr) {
|
||||
if(self.block) |blockType| {
|
||||
self.texture = graphics.generateBlockTexture(blockType);
|
||||
} else {
|
||||
self.texture = graphics.Texture.init();
|
||||
self.texture.?.generate(self.image);
|
||||
}
|
||||
} else {
|
||||
self.texture = graphics.Texture.init();
|
||||
self.texture.?.generate(self.image);
|
||||
|
Loading…
x
Reference in New Issue
Block a user