diff --git a/common/MysticWorld/Client/ClientProxy.java b/common/MysticWorld/Client/ClientProxy.java index 9a8ff63..819e3e9 100644 --- a/common/MysticWorld/Client/ClientProxy.java +++ b/common/MysticWorld/Client/ClientProxy.java @@ -14,22 +14,11 @@ import mysticworld.entity.EntityChargeEnergy; import mysticworld.entity.EntityChargeFire; import mysticworld.entity.EntityChargeWater; import mysticworld.items.ItemHandler; -import mysticworld.renderer.BlockPillarInsertRenderer; -import mysticworld.renderer.ItemOrbAirRenderer; -import mysticworld.renderer.ItemOrbEarthRenderer; -import mysticworld.renderer.ItemOrbEnergyRenderer; -import mysticworld.renderer.ItemOrbFireRenderer; -import mysticworld.renderer.ItemOrbWaterRenderer; -import mysticworld.renderer.ItemStaffAirRenderer; -import mysticworld.renderer.ItemStaffEarthRenderer; -import mysticworld.renderer.ItemStaffEnergyRenderer; -import mysticworld.renderer.ItemStaffFireRenderer; -import mysticworld.renderer.ItemStaffWaterRenderer; -import mysticworld.renderer.RenderStaffPower; -import mysticworld.renderer.TileEntityPillarInsertRenderer; +import mysticworld.renderer.*; import mysticworld.tiles.TileEntityPillarInsert; import mysticworld.util.CommonProxy; import net.minecraft.client.Minecraft; +import net.minecraft.util.ResourceLocation; import net.minecraft.world.World; import net.minecraftforge.client.MinecraftForgeClient; import cpw.mods.fml.client.registry.ClientRegistry; @@ -37,6 +26,7 @@ import cpw.mods.fml.client.registry.RenderingRegistry; public class ClientProxy extends CommonProxy { public final Minecraft mc = Minecraft.getMinecraft(); + public static final ResourceLocation particle = new ResourceLocation("textures/particle/particles.png"); @Override public int addArmor(String armor) { diff --git a/common/MysticWorld/Client/FX/LightCubeFX.java b/common/MysticWorld/Client/FX/LightCubeFX.java index 27afd94..1a86f0b 100644 --- a/common/MysticWorld/Client/FX/LightCubeFX.java +++ b/common/MysticWorld/Client/FX/LightCubeFX.java @@ -1,5 +1,6 @@ package mysticworld.client.fx; +import mysticworld.client.ClientProxy; import net.minecraft.client.particle.EntityFX; import net.minecraft.client.renderer.Tessellator; import net.minecraft.util.ResourceLocation; @@ -10,6 +11,8 @@ import org.lwjgl.opengl.GL11; import cpw.mods.fml.client.FMLClientHandler; public class LightCubeFX extends EntityFX { + public static final ResourceLocation lightFX = new ResourceLocation("mysticmods", "textures/misc/lightCubeFX.png"); + public LightCubeFX(World world, double x, double y, double z) { super(world, x, y, z); } @@ -60,7 +63,7 @@ public class LightCubeFX extends EntityFX { GL11.glDepthMask(false); GL11.glEnable(3042); GL11.glBlendFunc(770, 1); - FMLClientHandler.instance().getClient().renderEngine.bindTexture(new ResourceLocation("MysticMods:textures" + "/misc/lightCubeFX.png")); + FMLClientHandler.instance().getClient().renderEngine.bindTexture(lightFX); GL11.glColor4f(1.0F, 1.0F, 1.0F, 0.75F); float scale = 0.1F * this.particleScale; float xPos = (float) (this.prevPosX + (this.posX - this.prevPosX) * par2 - interpPosX); @@ -77,7 +80,7 @@ public class LightCubeFX extends EntityFX { GL11.glDisable(3042); GL11.glDepthMask(true); GL11.glPopMatrix(); - FMLClientHandler.instance().getClient().renderEngine.bindTexture(new ResourceLocation("minecraft:textures" + "/particle/particles.png")); + FMLClientHandler.instance().getClient().renderEngine.bindTexture(ClientProxy.particle); tessellator.startDrawingQuads(); } } diff --git a/common/MysticWorld/Client/FX/PowerAirFX.java b/common/MysticWorld/Client/FX/PowerAirFX.java index 392f391..376bd01 100644 --- a/common/MysticWorld/Client/FX/PowerAirFX.java +++ b/common/MysticWorld/Client/FX/PowerAirFX.java @@ -1,5 +1,6 @@ package mysticworld.client.fx; +import mysticworld.client.ClientProxy; import net.minecraft.client.particle.EntityFX; import net.minecraft.client.renderer.Tessellator; import net.minecraft.util.MathHelper; @@ -11,6 +12,8 @@ import org.lwjgl.opengl.GL11; import cpw.mods.fml.client.FMLClientHandler; public class PowerAirFX extends EntityFX { + public static final ResourceLocation airFX = new ResourceLocation("mysticmods", "textures/misc/airFX.png"); + public PowerAirFX(World world, double x, double y, double z) { super(world, x, y, z); } @@ -80,7 +83,7 @@ public class PowerAirFX extends EntityFX { GL11.glDepthMask(false); GL11.glEnable(3042); GL11.glBlendFunc(770, 1); - FMLClientHandler.instance().getClient().renderEngine.bindTexture(new ResourceLocation("MysticMods:textures" + "/misc/airFX.png")); + FMLClientHandler.instance().getClient().renderEngine.bindTexture(airFX); GL11.glColor4f(1.0F, 1.0F, 1.0F, 0.75F); float scale = 0.1F * this.particleScale; float xPos = (float) (this.prevPosX + (this.posX - this.prevPosX) * par2 - interpPosX); @@ -97,7 +100,7 @@ public class PowerAirFX extends EntityFX { GL11.glDisable(3042); GL11.glDepthMask(true); GL11.glPopMatrix(); - FMLClientHandler.instance().getClient().renderEngine.bindTexture(new ResourceLocation("minecraft:textures" + "/particle/particles.png")); + FMLClientHandler.instance().getClient().renderEngine.bindTexture(ClientProxy.particle); tessellator.startDrawingQuads(); } } \ No newline at end of file diff --git a/common/MysticWorld/Client/FX/PowerEarthFX.java b/common/MysticWorld/Client/FX/PowerEarthFX.java index c319c31..450ca30 100644 --- a/common/MysticWorld/Client/FX/PowerEarthFX.java +++ b/common/MysticWorld/Client/FX/PowerEarthFX.java @@ -1,5 +1,6 @@ package mysticworld.client.fx; +import mysticworld.client.ClientProxy; import net.minecraft.client.particle.EntityFX; import net.minecraft.client.renderer.Tessellator; import net.minecraft.util.ResourceLocation; @@ -10,6 +11,8 @@ import org.lwjgl.opengl.GL11; import cpw.mods.fml.client.FMLClientHandler; public class PowerEarthFX extends EntityFX { + public static final ResourceLocation earthFX = new ResourceLocation("mysticmods", "textures/misc/earthFX.png"); + public PowerEarthFX(World world, double x, double y, double z) { super(world, x, y, z); } @@ -60,7 +63,7 @@ public class PowerEarthFX extends EntityFX { GL11.glDepthMask(false); GL11.glEnable(3042); GL11.glBlendFunc(770, 1); - FMLClientHandler.instance().getClient().renderEngine.bindTexture(new ResourceLocation("MysticMods:textures" + "/misc/earthFX.png")); + FMLClientHandler.instance().getClient().renderEngine.bindTexture(earthFX); GL11.glColor4f(1.0F, 1.0F, 1.0F, 0.75F); float scale = 0.1F * this.particleScale; float xPos = (float) (this.prevPosX + (this.posX - this.prevPosX) * par2 - interpPosX); @@ -77,7 +80,7 @@ public class PowerEarthFX extends EntityFX { GL11.glDisable(3042); GL11.glDepthMask(true); GL11.glPopMatrix(); - FMLClientHandler.instance().getClient().renderEngine.bindTexture(new ResourceLocation("minecraft:textures" + "/particle/particles.png")); + FMLClientHandler.instance().getClient().renderEngine.bindTexture(ClientProxy.particle); tessellator.startDrawingQuads(); } } diff --git a/common/MysticWorld/Client/FX/PowerEnergyFX.java b/common/MysticWorld/Client/FX/PowerEnergyFX.java index 6df6bde..680d134 100644 --- a/common/MysticWorld/Client/FX/PowerEnergyFX.java +++ b/common/MysticWorld/Client/FX/PowerEnergyFX.java @@ -1,5 +1,6 @@ package mysticworld.client.fx; +import mysticworld.client.ClientProxy; import net.minecraft.client.particle.EntityFX; import net.minecraft.client.renderer.Tessellator; import net.minecraft.util.ResourceLocation; @@ -10,6 +11,8 @@ import org.lwjgl.opengl.GL11; import cpw.mods.fml.client.FMLClientHandler; public class PowerEnergyFX extends EntityFX { + public static final ResourceLocation energyFX = new ResourceLocation("mysticmods", "textures/misc/energyFX.png"); + public PowerEnergyFX(World world, double x, double y, double z) { super(world, x, y, z); } @@ -60,7 +63,7 @@ public class PowerEnergyFX extends EntityFX { GL11.glDepthMask(false); GL11.glEnable(3042); GL11.glBlendFunc(770, 1); - FMLClientHandler.instance().getClient().renderEngine.bindTexture(new ResourceLocation("MysticMods:textures" + "/misc/energyFX.png")); + FMLClientHandler.instance().getClient().renderEngine.bindTexture(energyFX); GL11.glColor4f(1.0F, 1.0F, 1.0F, 0.75F); float scale = 0.1F * this.particleScale; float xPos = (float) (this.prevPosX + (this.posX - this.prevPosX) * par2 - interpPosX); @@ -77,7 +80,7 @@ public class PowerEnergyFX extends EntityFX { GL11.glDisable(3042); GL11.glDepthMask(true); GL11.glPopMatrix(); - FMLClientHandler.instance().getClient().renderEngine.bindTexture(new ResourceLocation("minecraft:textures" + "/particle/particles.png")); + FMLClientHandler.instance().getClient().renderEngine.bindTexture(ClientProxy.particle); tessellator.startDrawingQuads(); } } diff --git a/common/MysticWorld/Client/FX/PowerFireFX.java b/common/MysticWorld/Client/FX/PowerFireFX.java index 1ebdb17..7ddc07e 100644 --- a/common/MysticWorld/Client/FX/PowerFireFX.java +++ b/common/MysticWorld/Client/FX/PowerFireFX.java @@ -1,5 +1,6 @@ package mysticworld.client.fx; +import mysticworld.client.ClientProxy; import net.minecraft.client.particle.EntityFX; import net.minecraft.client.renderer.Tessellator; import net.minecraft.util.ResourceLocation; @@ -10,6 +11,8 @@ import org.lwjgl.opengl.GL11; import cpw.mods.fml.client.FMLClientHandler; public class PowerFireFX extends EntityFX { + public static final ResourceLocation fireFX = new ResourceLocation("mysticmods", "textures/misc/fireFX.png"); + public PowerFireFX(World world, double x, double y, double z) { super(world, x, y, z); } @@ -60,7 +63,7 @@ public class PowerFireFX extends EntityFX { GL11.glDepthMask(false); GL11.glEnable(3042); GL11.glBlendFunc(770, 1); - FMLClientHandler.instance().getClient().renderEngine.bindTexture(new ResourceLocation("MysticMods:textures" + "/misc/fireFX.png")); + FMLClientHandler.instance().getClient().renderEngine.bindTexture(fireFX); GL11.glColor4f(1.0F, 1.0F, 1.0F, 0.75F); float scale = 0.1F * this.particleScale; float xPos = (float) (this.prevPosX + (this.posX - this.prevPosX) * par2 - interpPosX); @@ -77,7 +80,7 @@ public class PowerFireFX extends EntityFX { GL11.glDisable(3042); GL11.glDepthMask(true); GL11.glPopMatrix(); - FMLClientHandler.instance().getClient().renderEngine.bindTexture(new ResourceLocation("minecraft:textures" + "/particle/particles.png")); + FMLClientHandler.instance().getClient().renderEngine.bindTexture(ClientProxy.particle); tessellator.startDrawingQuads(); } } diff --git a/common/MysticWorld/Client/FX/PowerWaterFX.java b/common/MysticWorld/Client/FX/PowerWaterFX.java index a8917de..65a1c1b 100644 --- a/common/MysticWorld/Client/FX/PowerWaterFX.java +++ b/common/MysticWorld/Client/FX/PowerWaterFX.java @@ -1,5 +1,6 @@ package mysticworld.client.fx; +import mysticworld.client.ClientProxy; import net.minecraft.client.particle.EntityFX; import net.minecraft.client.renderer.Tessellator; import net.minecraft.util.ResourceLocation; @@ -10,6 +11,8 @@ import org.lwjgl.opengl.GL11; import cpw.mods.fml.client.FMLClientHandler; public class PowerWaterFX extends EntityFX { + public static final ResourceLocation waterFX = new ResourceLocation("mysticmods", "textures/misc/waterFX.png"); + public PowerWaterFX(World world, double x, double y, double z) { super(world, x, y, z); } @@ -60,7 +63,7 @@ public class PowerWaterFX extends EntityFX { GL11.glDepthMask(false); GL11.glEnable(3042); GL11.glBlendFunc(770, 1); - FMLClientHandler.instance().getClient().renderEngine.bindTexture(new ResourceLocation("MysticMods:textures" + "/misc/waterFX.png")); + FMLClientHandler.instance().getClient().renderEngine.bindTexture(waterFX); GL11.glColor4f(1.0F, 1.0F, 1.0F, 0.75F); float scale = 0.1F * this.particleScale; float xPos = (float) (this.prevPosX + (this.posX - this.prevPosX) * par2 - interpPosX); @@ -77,7 +80,7 @@ public class PowerWaterFX extends EntityFX { GL11.glDisable(3042); GL11.glDepthMask(true); GL11.glPopMatrix(); - FMLClientHandler.instance().getClient().renderEngine.bindTexture(new ResourceLocation("minecraft:textures" + "/particle/particles.png")); + FMLClientHandler.instance().getClient().renderEngine.bindTexture(ClientProxy.particle); tessellator.startDrawingQuads(); } }