Fixed wire insulation colors
This commit is contained in:
parent
873d7b12cb
commit
df518b2dcd
2 changed files with 15 additions and 4 deletions
|
@ -3,8 +3,10 @@ package resonantinduction.electrical.wire.flat;
|
|||
import java.util.Arrays;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockColored;
|
||||
import net.minecraft.client.renderer.RenderBlocks;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemDye;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
|
@ -20,6 +22,7 @@ import resonantinduction.electrical.wire.EnumWireMaterial;
|
|||
import resonantinduction.electrical.wire.PartAdvancedWire;
|
||||
import calclavia.lib.render.EnumColor;
|
||||
import codechicken.lib.colour.Colour;
|
||||
import codechicken.lib.colour.ColourARGB;
|
||||
import codechicken.lib.colour.ColourRGBA;
|
||||
import codechicken.lib.data.MCDataInput;
|
||||
import codechicken.lib.data.MCDataOutput;
|
||||
|
@ -894,7 +897,14 @@ public class PartFlatWire extends PartAdvancedWire implements TFacePart, JNormal
|
|||
|
||||
public Colour getColour()
|
||||
{
|
||||
return this.isInsulated ? new ColourRGBA(EnumColor.DYES[this.color].toColor().getRGB()) : this.getMaterial().color;
|
||||
if (isInsulated)
|
||||
{
|
||||
Colour color = new ColourARGB(ItemDye.dyeColors[this.color]);
|
||||
color.a = (byte) 255;
|
||||
return color;
|
||||
}
|
||||
|
||||
return getMaterial().color;
|
||||
}
|
||||
|
||||
public boolean useStaticRenderer()
|
||||
|
|
|
@ -4,6 +4,7 @@ import java.nio.FloatBuffer;
|
|||
import java.util.Map;
|
||||
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
import net.minecraft.item.ItemDye;
|
||||
import net.minecraft.util.Icon;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraftforge.common.ForgeDirection;
|
||||
|
@ -13,9 +14,8 @@ import org.lwjgl.opengl.GL11;
|
|||
|
||||
import resonantinduction.core.Reference;
|
||||
import resonantinduction.core.render.InvertX;
|
||||
import calclavia.lib.render.EnumColor;
|
||||
import codechicken.lib.colour.Colour;
|
||||
import codechicken.lib.colour.ColourRGBA;
|
||||
import codechicken.lib.colour.ColourARGB;
|
||||
import codechicken.lib.lighting.LightModel;
|
||||
import codechicken.lib.render.CCModel;
|
||||
import codechicken.lib.render.CCRenderState;
|
||||
|
@ -166,7 +166,8 @@ public class RenderFramedWire
|
|||
|
||||
if (wire.isInsulated())
|
||||
{
|
||||
Colour insulationColour = new ColourRGBA(EnumColor.DYES[wire.getColor()].toColor().getRGB());
|
||||
Colour insulationColour = new ColourARGB(ItemDye.dyeColors[wire.getColor()]);
|
||||
insulationColour.a = (byte) 255;
|
||||
renderPart(insulationIcon, models.get(name + "Insulation"), wire.x(), wire.y(), wire.z(), insulationColour);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue