diff options
author | Draknyte1 <Draknyte1@hotmail.com> | 2017-12-20 23:39:49 +1000 |
---|---|---|
committer | Draknyte1 <Draknyte1@hotmail.com> | 2017-12-20 23:39:49 +1000 |
commit | 5715a32d2901922503fd850f3a68503fb77467c3 (patch) | |
tree | 7e12520fbc23844e99493d55af4410a785538e35 /src/Java/gtPlusPlus/core/client/renderer | |
parent | 2a4795f65d98ff60a177d7d6a5552fd687d9f6e8 (diff) | |
download | GT5-Unofficial-5715a32d2901922503fd850f3a68503fb77467c3.tar.gz GT5-Unofficial-5715a32d2901922503fd850f3a68503fb77467c3.tar.bz2 GT5-Unofficial-5715a32d2901922503fd850f3a68503fb77467c3.zip |
- Disabled some logging.
% Minor Project Clean-up, added missing Override annotations to 100+ methods & removed pointless casts.
% Moved Logging to it's own class.
$ Fixed Multi-block handling of Pollution.
$ Fixed the GT 5.09 material enabler system. (From My Side, it's still borked on GTs).
+ Added a Dynamic Proxy invocation for IMaterialHandler.
+ Added an AutoMap data type, which is a Auto-incremental ID'd Hashmap wrapper.
Diffstat (limited to 'src/Java/gtPlusPlus/core/client/renderer')
3 files changed, 30 insertions, 22 deletions
diff --git a/src/Java/gtPlusPlus/core/client/renderer/RenderMiningExplosivesPrimed.java b/src/Java/gtPlusPlus/core/client/renderer/RenderMiningExplosivesPrimed.java index bbbde96c8e..42071428a7 100644 --- a/src/Java/gtPlusPlus/core/client/renderer/RenderMiningExplosivesPrimed.java +++ b/src/Java/gtPlusPlus/core/client/renderer/RenderMiningExplosivesPrimed.java @@ -4,8 +4,8 @@ import org.lwjgl.opengl.GL11; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; +import gtPlusPlus.api.objects.Logger; import gtPlusPlus.core.block.ModBlocks; -import gtPlusPlus.core.util.Utils; import net.minecraft.client.renderer.RenderBlocks; import net.minecraft.client.renderer.entity.Render; import net.minecraft.client.renderer.texture.TextureMap; @@ -19,7 +19,7 @@ public class RenderMiningExplosivesPrimed extends Render { public RenderMiningExplosivesPrimed(){ this.shadowSize = 0.5F; - Utils.LOG_INFO("Rendering Mining Explosion. 1"); + Logger.INFO("Rendering Mining Explosion. 1"); } /** @@ -29,7 +29,7 @@ public class RenderMiningExplosivesPrimed extends Render { * double d2, float f, float f1). But JAD is pre 1.5 so doesn't do that. */ public void doRender(final EntityTNTPrimed entity, final double p_76986_2_, final double p_76986_4_, final double p_76986_6_, final float p_76986_8_, final float p_76986_9_){ - Utils.LOG_INFO("Rendering Mining Explosion. 2"); + Logger.INFO("Rendering Mining Explosion. 2"); GL11.glPushMatrix(); GL11.glTranslatef((float)p_76986_2_, (float)p_76986_4_, (float)p_76986_6_); float f2; diff --git a/src/Java/gtPlusPlus/core/client/renderer/RenderPotionthrow.java b/src/Java/gtPlusPlus/core/client/renderer/RenderPotionthrow.java index 378d03f1df..e86a3fa7ab 100644 --- a/src/Java/gtPlusPlus/core/client/renderer/RenderPotionthrow.java +++ b/src/Java/gtPlusPlus/core/client/renderer/RenderPotionthrow.java @@ -1,5 +1,8 @@ package gtPlusPlus.core.client.renderer; +import org.lwjgl.opengl.GL11; +import org.lwjgl.opengl.GL12; + import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.client.renderer.Tessellator; @@ -12,8 +15,6 @@ import net.minecraft.item.ItemPotion; import net.minecraft.potion.PotionHelper; import net.minecraft.util.IIcon; import net.minecraft.util.ResourceLocation; -import org.lwjgl.opengl.GL11; -import org.lwjgl.opengl.GL12; @SideOnly(Side.CLIENT) public class RenderPotionthrow extends Render @@ -38,7 +39,8 @@ public class RenderPotionthrow extends Render * (Render<T extends Entity) and this method has signature public void func_76986_a(T entity, double d, double d1, * double d2, float f, float f1). But JAD is pre 1.5 so doesn't do that. */ - public void doRender(Entity p_76986_1_, double p_76986_2_, double p_76986_4_, double p_76986_6_, float p_76986_8_, float p_76986_9_) + @Override + public void doRender(Entity p_76986_1_, double p_76986_2_, double p_76986_4_, double p_76986_6_, float p_76986_8_, float p_76986_9_) { IIcon iicon = this.mRenderItem.getIconFromDamage(this.mDamage); @@ -54,9 +56,9 @@ public class RenderPotionthrow extends Render if (iicon == ItemPotion.func_94589_d("bottle_splash")) { int i = PotionHelper.func_77915_a(((EntityPotion)p_76986_1_).getPotionDamage(), false); - float f2 = (float)(i >> 16 & 255) / 255.0F; - float f3 = (float)(i >> 8 & 255) / 255.0F; - float f4 = (float)(i & 255) / 255.0F; + float f2 = (i >> 16 & 255) / 255.0F; + float f3 = (i >> 8 & 255) / 255.0F; + float f4 = (i & 255) / 255.0F; GL11.glColor3f(f2, f3, f4); GL11.glPushMatrix(); this.func_77026_a(tessellator, ItemPotion.func_94589_d("overlay")); @@ -73,7 +75,8 @@ public class RenderPotionthrow extends Render /** * Returns the location of an entity's texture. Doesn't seem to be called unless you call Render.bindEntityTexture. */ - protected ResourceLocation getEntityTexture(Entity p_110775_1_) + @Override + protected ResourceLocation getEntityTexture(Entity p_110775_1_) { return TextureMap.locationItemsTexture; } @@ -91,10 +94,10 @@ public class RenderPotionthrow extends Render GL11.glRotatef(-this.renderManager.playerViewX, 1.0F, 0.0F, 0.0F); p_77026_1_.startDrawingQuads(); p_77026_1_.setNormal(0.0F, 1.0F, 0.0F); - p_77026_1_.addVertexWithUV((double)(0.0F - f5), (double)(0.0F - f6), 0.0D, (double)f, (double)f3); - p_77026_1_.addVertexWithUV((double)(f4 - f5), (double)(0.0F - f6), 0.0D, (double)f1, (double)f3); - p_77026_1_.addVertexWithUV((double)(f4 - f5), (double)(f4 - f6), 0.0D, (double)f1, (double)f2); - p_77026_1_.addVertexWithUV((double)(0.0F - f5), (double)(f4 - f6), 0.0D, (double)f, (double)f2); + p_77026_1_.addVertexWithUV(0.0F - f5, 0.0F - f6, 0.0D, f, f3); + p_77026_1_.addVertexWithUV(f4 - f5, 0.0F - f6, 0.0D, f1, f3); + p_77026_1_.addVertexWithUV(f4 - f5, f4 - f6, 0.0D, f1, f2); + p_77026_1_.addVertexWithUV(0.0F - f5, f4 - f6, 0.0D, f, f2); p_77026_1_.draw(); } }
\ No newline at end of file diff --git a/src/Java/gtPlusPlus/core/client/renderer/RenderStaballoyConstruct.java b/src/Java/gtPlusPlus/core/client/renderer/RenderStaballoyConstruct.java index 20a3a0b2f4..8de64eef26 100644 --- a/src/Java/gtPlusPlus/core/client/renderer/RenderStaballoyConstruct.java +++ b/src/Java/gtPlusPlus/core/client/renderer/RenderStaballoyConstruct.java @@ -1,5 +1,8 @@ package gtPlusPlus.core.client.renderer; +import org.lwjgl.opengl.GL11; +import org.lwjgl.opengl.GL12; + import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import gtPlusPlus.core.client.model.ModelStaballoyConstruct; @@ -8,13 +11,9 @@ import gtPlusPlus.core.lib.CORE; import net.minecraft.client.renderer.OpenGlHelper; import net.minecraft.client.renderer.entity.RenderLiving; import net.minecraft.client.renderer.texture.TextureMap; -import net.minecraft.entity.Entity; -import net.minecraft.entity.EntityLiving; -import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.*; import net.minecraft.init.Blocks; import net.minecraft.util.ResourceLocation; -import org.lwjgl.opengl.GL11; -import org.lwjgl.opengl.GL12; @SideOnly(Side.CLIENT) public class RenderStaballoyConstruct extends RenderLiving { @@ -37,7 +36,7 @@ public class RenderStaballoyConstruct extends RenderLiving { */ public void doRender(EntityStaballoyConstruct p_76986_1_, double p_76986_2_, double p_76986_4_, double p_76986_6_, float p_76986_8_, float p_76986_9_) { - super.doRender((EntityLiving) p_76986_1_, p_76986_2_, p_76986_4_, p_76986_6_, p_76986_8_, p_76986_9_); + super.doRender(p_76986_1_, p_76986_2_, p_76986_4_, p_76986_6_, p_76986_8_, p_76986_9_); } /** @@ -51,7 +50,7 @@ public class RenderStaballoyConstruct extends RenderLiving { protected void rotateCorpse(EntityStaballoyConstruct p_77043_1_, float p_77043_2_, float p_77043_3_, float p_77043_4_) { super.rotateCorpse(p_77043_1_, p_77043_2_, p_77043_3_, p_77043_4_); - if ((double) p_77043_1_.limbSwingAmount >= 0.01D) { + if (p_77043_1_.limbSwingAmount >= 0.01D) { float f3 = 13.0F; float f4 = p_77043_1_.limbSwing - p_77043_1_.limbSwingAmount * (1.0F - p_77043_4_) + 6.0F; float f5 = (Math.abs(f4 % f3 - f3 * 0.5F) - f3 * 0.25F) / (f3 * 0.25F); @@ -74,7 +73,7 @@ public class RenderStaballoyConstruct extends RenderLiving { int i = p_77029_1_.getBrightnessForRender(p_77029_2_); int j = i % 65536; int k = i / 65536; - OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, (float) j / 1.0F, (float) k / 1.0F); + OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, j / 1.0F, k / 1.0F); GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); this.bindTexture(TextureMap.locationBlocksTexture); this.field_147909_c.renderBlockAsItem(Blocks.red_flower, 0, 1.0F); @@ -91,15 +90,18 @@ public class RenderStaballoyConstruct extends RenderLiving { * void func_76986_a(T entity, double d, double d1, double d2, float f, * float f1). But JAD is pre 1.5 so doesn't do that. */ + @Override public void doRender(EntityLiving p_76986_1_, double p_76986_2_, double p_76986_4_, double p_76986_6_, float p_76986_8_, float p_76986_9_) { this.doRender((EntityStaballoyConstruct) p_76986_1_, p_76986_2_, p_76986_4_, p_76986_6_, p_76986_8_, p_76986_9_); } + @Override protected void renderEquippedItems(EntityLivingBase p_77029_1_, float p_77029_2_) { this.renderEquippedItems((EntityStaballoyConstruct) p_77029_1_, p_77029_2_); } + @Override protected void rotateCorpse(EntityLivingBase p_77043_1_, float p_77043_2_, float p_77043_3_, float p_77043_4_) { this.rotateCorpse((EntityStaballoyConstruct) p_77043_1_, p_77043_2_, p_77043_3_, p_77043_4_); } @@ -112,6 +114,7 @@ public class RenderStaballoyConstruct extends RenderLiving { * void func_76986_a(T entity, double d, double d1, double d2, float f, * float f1). But JAD is pre 1.5 so doesn't do that. */ + @Override public void doRender(EntityLivingBase p_76986_1_, double p_76986_2_, double p_76986_4_, double p_76986_6_, float p_76986_8_, float p_76986_9_) { this.doRender((EntityStaballoyConstruct) p_76986_1_, p_76986_2_, p_76986_4_, p_76986_6_, p_76986_8_, p_76986_9_); @@ -121,6 +124,7 @@ public class RenderStaballoyConstruct extends RenderLiving { * Returns the location of an entity's texture. Doesn't seem to be called * unless you call Render.bindEntityTexture. */ + @Override protected ResourceLocation getEntityTexture(Entity p_110775_1_) { return this.getEntityTexture((EntityStaballoyConstruct) p_110775_1_); } @@ -133,6 +137,7 @@ public class RenderStaballoyConstruct extends RenderLiving { * void func_76986_a(T entity, double d, double d1, double d2, float f, * float f1). But JAD is pre 1.5 so doesn't do that. */ + @Override public void doRender(Entity p_76986_1_, double p_76986_2_, double p_76986_4_, double p_76986_6_, float p_76986_8_, float p_76986_9_) { this.doRender((EntityStaballoyConstruct) p_76986_1_, p_76986_2_, p_76986_4_, p_76986_6_, p_76986_8_, p_76986_9_); |