From f965cf88704f1e5e674d98308cbe0f4451d7edeb Mon Sep 17 00:00:00 2001 From: OnyxDarkKnight Date: Sun, 13 Apr 2014 18:12:27 +0300 Subject: Fixed stuff --- .../renders/TileEntityDisplayerRender.java | 68 +++++++++++----------- .../TileEntityJewelrsCraftingTableRender.java | 2 +- .../renders/TileEntityMolderRender.java | 2 +- .../renders/TileEntitySmelterRender.java | 2 +- 4 files changed, 37 insertions(+), 37 deletions(-) (limited to 'common/darkknight/jewelrycraft/renders') diff --git a/common/darkknight/jewelrycraft/renders/TileEntityDisplayerRender.java b/common/darkknight/jewelrycraft/renders/TileEntityDisplayerRender.java index daa3147..075b978 100644 --- a/common/darkknight/jewelrycraft/renders/TileEntityDisplayerRender.java +++ b/common/darkknight/jewelrycraft/renders/TileEntityDisplayerRender.java @@ -134,7 +134,7 @@ public class TileEntityDisplayerRender extends TileEntitySpecialRenderer GL11.glPushMatrix(); GL11.glEnable(GL11.GL_TEXTURE_2D); GL11.glScalef(var17*70F, 1F, 0F); - fontrenderer.drawString(par2Str.replaceFirst("§0", "§r").replaceFirst("§1", "§r").replaceFirst("§2", "§r").replaceFirst("§3", "§r").replaceFirst("§4", "§r").replaceFirst("§5", "§r").replaceFirst("§6", "§r").replaceFirst("§7", "§r").replaceFirst("§8", "§r").replaceFirst("§9", "§r").replaceFirst("§a", "§r").replaceFirst("§b", "§r").replaceFirst("§c", "§r").replaceFirst("§d", "§r").replaceFirst("§e", "§r").replaceFirst("§f", "§r"), -j, 0, 65536 * (red/2) + 256 * (green/2) + blue/2); + fontrenderer.drawString(par2Str.replaceFirst("§0", "§r").replaceFirst("§1", "§r").replaceFirst("§2", "§r").replaceFirst("§3", "§r").replaceFirst("§4", "§r").replaceFirst("§5", "§r").replaceFirst("§6", "§r").replaceFirst("§7", "§r").replaceFirst("§8", "§r").replaceFirst("§9", "§r").replaceFirst("§a", "§r").replaceFirst("§b", "§r").replaceFirst("§c", "§r").replaceFirst("§d", "§r").replaceFirst("§e", "§r").replaceFirst("§f", "§r"), -j, 0, 65536 * (red/2) + 256 * (green/2) + blue/2); GL11.glPopMatrix(); GL11.glTranslatef((float)x - 1f, (float)y - 1f, (float)z - 1F); GL11.glScalef(var17*70F, 1F, 0F); @@ -146,85 +146,85 @@ public class TileEntityDisplayerRender extends TileEntitySpecialRenderer public void replaceEnumEnchValues(String str, int color) { - if(str.contains("§0")) + if(str.contains("§0")) { color = Color.BLACK.getRGB(); - str.replace("§0", ""); + str.replace("§0", ""); } - if(str.contains("§1")) + if(str.contains("§1")) { color = 85; - str.replace("§1", ""); + str.replace("§1", ""); } - if(str.contains("§2")) + if(str.contains("§2")) { color = 17920; - str.replace("§2", ""); + str.replace("§2", ""); } - if(str.contains("§3")) + if(str.contains("§3")) { color = 1336183; - str.replace("§3", ""); + str.replace("§3", ""); } - if(str.contains("§4")) + if(str.contains("§4")) { color = 4587520; - str.replace("§4", ""); + str.replace("§4", ""); } - if(str.contains("§5")) + if(str.contains("§5")) { color = 5701759; - str.replace("§5", ""); + str.replace("§5", ""); } - if(str.contains("§6")) + if(str.contains("§6")) { color = 16762880; - str.replace("§6", ""); + str.replace("§6", ""); } - if(str.contains("§7")) + if(str.contains("§7")) { color = Color.GRAY.getRGB(); - str.replace("§7", ""); + str.replace("§7", ""); } - if(str.contains("§8")) + if(str.contains("§8")) { color = Color.DARK_GRAY.getRGB(); - str.replace("§8", ""); + str.replace("§8", ""); } - if(str.contains("§9")) + if(str.contains("§9")) { color = Color.BLUE.getRGB(); - str.replace("§9", ""); + str.replace("§9", ""); } - if(str.contains("§a")) + if(str.contains("§a")) { color = Color.GREEN.getRGB(); - str.replace("§a", ""); + str.replace("§a", ""); } - if(str.contains("§b")) + if(str.contains("§b")) { color = Color.CYAN.getRGB(); - str.replace("§b", ""); + str.replace("§b", ""); } - if(str.contains("§c")) + if(str.contains("§c")) { color = Color.RED.getRGB(); - str.replace("§c", ""); + str.replace("§c", ""); } - if(str.contains("§d")) + if(str.contains("§d")) { color = 11665663; - str.replace("§d", ""); + str.replace("§d", ""); } - if(str.contains("§e")) + if(str.contains("§e")) { color = Color.YELLOW.getRGB(); - str.replace("§e", ""); + str.replace("§e", ""); } - if(str.contains("§f")) + if(str.contains("§f")) { color = Color.WHITE.getRGB(); - str.replace("§f", ""); + str.replace("§f", ""); } } -} +} \ No newline at end of file diff --git a/common/darkknight/jewelrycraft/renders/TileEntityJewelrsCraftingTableRender.java b/common/darkknight/jewelrycraft/renders/TileEntityJewelrsCraftingTableRender.java index 5fb37ba..2a130ac 100644 --- a/common/darkknight/jewelrycraft/renders/TileEntityJewelrsCraftingTableRender.java +++ b/common/darkknight/jewelrycraft/renders/TileEntityJewelrsCraftingTableRender.java @@ -47,7 +47,7 @@ public class TileEntityJewelrsCraftingTableRender extends TileEntitySpecialRende modelTable.render((Entity) null, 0.0F, 0.0F, -0.1F, 0.0F, 0.0F, 0.0625F); if (jt != null) { - if (jt.hasJewelry && jt.jewelry.getIconIndex().getIconName() != "") + if (jt.hasJewelry && jt.jewelry.getIconIndex() != null && jt.jewelry.getIconIndex().getIconName() != "") { GL11.glPushMatrix(); GL11.glDisable(GL11.GL_LIGHTING); diff --git a/common/darkknight/jewelrycraft/renders/TileEntityMolderRender.java b/common/darkknight/jewelrycraft/renders/TileEntityMolderRender.java index 4ff6415..74044fb 100644 --- a/common/darkknight/jewelrycraft/renders/TileEntityMolderRender.java +++ b/common/darkknight/jewelrycraft/renders/TileEntityMolderRender.java @@ -64,7 +64,7 @@ public class TileEntityMolderRender extends TileEntitySpecialRenderer GL11.glEnable(GL11.GL_LIGHTING); GL11.glPopMatrix(); } - if (me.hasJewelBase && me.jewelBase.getIconIndex().getIconName() != "") + if (me.hasJewelBase && me.jewelBase.getIconIndex() != null && me.jewelBase.getIconIndex().getIconName() != "") { GL11.glPushMatrix(); GL11.glDisable(GL11.GL_LIGHTING); diff --git a/common/darkknight/jewelrycraft/renders/TileEntitySmelterRender.java b/common/darkknight/jewelrycraft/renders/TileEntitySmelterRender.java index cf3a9c6..128a254 100644 --- a/common/darkknight/jewelrycraft/renders/TileEntitySmelterRender.java +++ b/common/darkknight/jewelrycraft/renders/TileEntitySmelterRender.java @@ -76,7 +76,7 @@ public class TileEntitySmelterRender extends TileEntitySpecialRenderer GL11.glPopMatrix(); if (st != null) { - if (st.hasMetal && st.metal.getIconIndex().getIconName() != "") + if (st.hasMetal && st.metal != null && st.metal.getIconIndex() != null && st.metal.getIconIndex().getIconName() != "") { GL11.glPushMatrix(); GL11.glDisable(GL11.GL_LIGHTING); -- cgit v1.2.3