aboutsummaryrefslogtreecommitdiff
path: root/src/Java/gtPlusPlus/core/client/renderer
diff options
context:
space:
mode:
authorDraknyte1 <Draknyte1@hotmail.com>2017-08-29 23:29:33 +1000
committerDraknyte1 <Draknyte1@hotmail.com>2017-08-29 23:29:33 +1000
commit73bc357197095e910a3249a5b2f7b99a63a0c26c (patch)
treee34bdc74abf1177108dc925cd69ef56911a7e08c /src/Java/gtPlusPlus/core/client/renderer
parent5e9182a3a3c2c52b798e5e306a5683bf9ac68870 (diff)
downloadGT5-Unofficial-73bc357197095e910a3249a5b2f7b99a63a0c26c.tar.gz
GT5-Unofficial-73bc357197095e910a3249a5b2f7b99a63a0c26c.tar.bz2
GT5-Unofficial-73bc357197095e910a3249a5b2f7b99a63a0c26c.zip
$ Fixed LFTR tooltip not mentioning which casings to use.
% More messing around with entity rendering and some custom mobs.
Diffstat (limited to 'src/Java/gtPlusPlus/core/client/renderer')
-rw-r--r--src/Java/gtPlusPlus/core/client/renderer/RenderSickBlaze.java94
-rw-r--r--src/Java/gtPlusPlus/core/client/renderer/RenderToxinball.java91
2 files changed, 185 insertions, 0 deletions
diff --git a/src/Java/gtPlusPlus/core/client/renderer/RenderSickBlaze.java b/src/Java/gtPlusPlus/core/client/renderer/RenderSickBlaze.java
new file mode 100644
index 0000000000..7ed95bd541
--- /dev/null
+++ b/src/Java/gtPlusPlus/core/client/renderer/RenderSickBlaze.java
@@ -0,0 +1,94 @@
+package gtPlusPlus.core.client.renderer;
+
+import cpw.mods.fml.relauncher.Side;
+import cpw.mods.fml.relauncher.SideOnly;
+import gtPlusPlus.core.client.model.ModelSickBlaze;
+import gtPlusPlus.core.entity.monster.EntitySickBlaze;
+import net.minecraft.client.renderer.entity.RenderLiving;
+import net.minecraft.entity.*;
+import net.minecraft.util.ResourceLocation;
+
+@SideOnly(Side.CLIENT)
+public class RenderSickBlaze extends RenderLiving
+{
+ private static final ResourceLocation blazeTextures = new ResourceLocation("textures/entity/slime.png");
+ private int field_77068_a;
+
+ public RenderSickBlaze()
+ {
+ super(new ModelSickBlaze(), 0.5F);
+ this.field_77068_a = ((ModelSickBlaze)this.mainModel).func_78104_a();
+ }
+
+ /**
+ * Actually renders the given argument. This is a synthetic bridge method, always casting down its argument and then
+ * handing it off to a worker function which does the actual work. In all probabilty, the class Render is generic
+ * (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(EntitySickBlaze p_76986_1_, double p_76986_2_, double p_76986_4_, double p_76986_6_, float p_76986_8_, float p_76986_9_)
+ {
+ int i = ((ModelSickBlaze)this.mainModel).func_78104_a();
+
+ if (i != this.field_77068_a)
+ {
+ this.field_77068_a = i;
+ this.mainModel = new ModelSickBlaze();
+ }
+
+ super.doRender(p_76986_1_, p_76986_2_, p_76986_4_, p_76986_6_, p_76986_8_, p_76986_9_);
+ }
+
+ /**
+ * Returns the location of an entity's texture. Doesn't seem to be called unless you call Render.bindEntityTexture.
+ */
+ protected ResourceLocation getEntityTexture(EntitySickBlaze p_110775_1_)
+ {
+ return blazeTextures;
+ }
+
+ /**
+ * Actually renders the given argument. This is a synthetic bridge method, always casting down its argument and then
+ * handing it off to a worker function which does the actual work. In all probabilty, the class Render is generic
+ * (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.
+ */
+ @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((EntitySickBlaze)p_76986_1_, p_76986_2_, p_76986_4_, p_76986_6_, p_76986_8_, p_76986_9_);
+ }
+
+ /**
+ * Actually renders the given argument. This is a synthetic bridge method, always casting down its argument and then
+ * handing it off to a worker function which does the actual work. In all probabilty, the class Render is generic
+ * (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.
+ */
+ @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((EntitySickBlaze)p_76986_1_, p_76986_2_, p_76986_4_, p_76986_6_, p_76986_8_, p_76986_9_);
+ }
+
+ /**
+ * 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((EntitySickBlaze)p_110775_1_);
+ }
+
+ /**
+ * Actually renders the given argument. This is a synthetic bridge method, always casting down its argument and then
+ * handing it off to a worker function which does the actual work. In all probabilty, the class Render is generic
+ * (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.
+ */
+ @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((EntitySickBlaze)p_76986_1_, p_76986_2_, p_76986_4_, p_76986_6_, p_76986_8_, p_76986_9_);
+ }
+} \ No newline at end of file
diff --git a/src/Java/gtPlusPlus/core/client/renderer/RenderToxinball.java b/src/Java/gtPlusPlus/core/client/renderer/RenderToxinball.java
new file mode 100644
index 0000000000..774e506146
--- /dev/null
+++ b/src/Java/gtPlusPlus/core/client/renderer/RenderToxinball.java
@@ -0,0 +1,91 @@
+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.entity.projectile.EntityToxinball;
+import net.minecraft.client.renderer.Tessellator;
+import net.minecraft.client.renderer.entity.Render;
+import net.minecraft.client.renderer.texture.TextureMap;
+import net.minecraft.entity.Entity;
+import net.minecraft.init.Items;
+import net.minecraft.util.IIcon;
+import net.minecraft.util.ResourceLocation;
+
+@SideOnly(Side.CLIENT)
+public class RenderToxinball extends Render
+{
+ private float mSize;
+
+ public RenderToxinball(float scale)
+ {
+ this.mSize = scale;
+ }
+
+ /**
+ * Actually renders the given argument. This is a synthetic bridge method, always casting down its argument and then
+ * handing it off to a worker function which does the actual work. In all probabilty, the class Render is generic
+ * (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(EntityToxinball entity, double p_76986_2_, double p_76986_4_, double p_76986_6_, float p_76986_8_, float p_76986_9_)
+ {
+ GL11.glPushMatrix();
+ this.bindEntityTexture(entity);
+ GL11.glTranslatef((float)p_76986_2_, (float)p_76986_4_, (float)p_76986_6_);
+ GL11.glEnable(GL12.GL_RESCALE_NORMAL);
+ float f2 = this.mSize;
+ GL11.glScalef(f2 / 1.0F, f2 / 1.0F, f2 / 1.0F);
+ IIcon iicon = Items.slime_ball.getIconFromDamage(0);
+ Tessellator tessellator = Tessellator.instance;
+ float f3 = iicon.getMinU();
+ float f4 = iicon.getMaxU();
+ float f5 = iicon.getMinV();
+ float f6 = iicon.getMaxV();
+ float f7 = 1.0F;
+ float f8 = 0.5F;
+ float f9 = 0.25F;
+ GL11.glRotatef(180.0F - this.renderManager.playerViewY, 0.0F, 1.0F, 0.0F);
+ GL11.glRotatef(-this.renderManager.playerViewX, 1.0F, 0.0F, 0.0F);
+ tessellator.startDrawingQuads();
+ tessellator.setNormal(0.0F, 1.0F, 0.0F);
+ tessellator.addVertexWithUV(0.0F - f8, 0.0F - f9, 0.0D, f3, f6);
+ tessellator.addVertexWithUV(f7 - f8, 0.0F - f9, 0.0D, f4, f6);
+ tessellator.addVertexWithUV(f7 - f8, 1.0F - f9, 0.0D, f4, f5);
+ tessellator.addVertexWithUV(0.0F - f8, 1.0F - f9, 0.0D, f3, f5);
+ tessellator.draw();
+ GL11.glDisable(GL12.GL_RESCALE_NORMAL);
+ GL11.glPopMatrix();
+ }
+
+ /**
+ * Returns the location of an entity's texture. Doesn't seem to be called unless you call Render.bindEntityTexture.
+ */
+ protected ResourceLocation getEntityTexture(EntityToxinball entity)
+ {
+ return TextureMap.locationItemsTexture;
+ }
+
+ /**
+ * Returns the location of an entity's texture. Doesn't seem to be called unless you call Render.bindEntityTexture.
+ */
+ @Override
+ protected ResourceLocation getEntityTexture(Entity entity)
+ {
+ return this.getEntityTexture((EntityToxinball)entity);
+ }
+
+ /**
+ * Actually renders the given argument. This is a synthetic bridge method, always casting down its argument and then
+ * handing it off to a worker function which does the actual work. In all probabilty, the class Render is generic
+ * (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.
+ */
+ @Override
+ public void doRender(Entity entity, double p_76986_2_, double p_76986_4_, double p_76986_6_, float p_76986_8_, float p_76986_9_)
+ {
+ this.doRender((EntityToxinball)entity, p_76986_2_, p_76986_4_, p_76986_6_, p_76986_8_, p_76986_9_);
+ }
+} \ No newline at end of file