From 2625df7eb11b16c3aa55ff1099e821cb79d55a8b Mon Sep 17 00:00:00 2001 From: Jordan Byrne Date: Fri, 29 Dec 2017 02:11:59 +1000 Subject: % Localized the Plasma Death Message. $ Fixed electrolyzer recipes for ore dust. $ Fixed bug with material generation system. + Added a custom renderer for the ore blocks. $ Fixed renderer issue where the background texture was incorrect. --- src/Java/gtPlusPlus/core/material/Material.java | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'src/Java/gtPlusPlus/core/material') diff --git a/src/Java/gtPlusPlus/core/material/Material.java b/src/Java/gtPlusPlus/core/material/Material.java index 796d48b967..751a371bdb 100644 --- a/src/Java/gtPlusPlus/core/material/Material.java +++ b/src/Java/gtPlusPlus/core/material/Material.java @@ -104,7 +104,10 @@ public class Material { try { this.unlocalizedName = Utils.sanitizeString(materialName); this.localizedName = materialName; + this.materialState = defaultState; + Logger.MATERIALS(this.getLocalizedName()+" is "+defaultState.name()+"."); + this.RGBA = rgba; this.vGenerateCells = generateCells; @@ -332,12 +335,24 @@ public class Material { return this.materialState; } - final public short[] getRGBA(){ + final public short[] getRGB(){ if (this.RGBA != null) { return this.RGBA; } return new short[] {255,0,0}; } + + final public short[] getRGBA(){ + if (this.RGBA != null) { + if (this.RGBA.length == 4){ + return this.RGBA; + } + else { + return new short[]{this.RGBA[0], this.RGBA[1], this.RGBA[2], 0}; + } + } + return new short[] {255,0,0, 0}; + } final public int getRgbAsHex(){ -- cgit