Joshie comment!

This commit is contained in:
WayofTime 2014-06-02 15:16:36 -04:00
parent 1c0deadfc6
commit ac943e9d38
753 changed files with 8715 additions and 1184 deletions

View file

@ -0,0 +1,39 @@
package WayofTime.alchemicalWizardry.common.renderer.projectile;
import WayofTime.alchemicalWizardry.common.renderer.model.ModelEnergyBazookaMainProjectile;
import net.minecraft.client.model.ModelBase;
import net.minecraft.client.renderer.entity.Render;
import net.minecraft.entity.Entity;
import net.minecraft.util.ResourceLocation;
import org.lwjgl.opengl.GL11;
import org.lwjgl.opengl.GL12;
public class RenderEnergyBazookaMainProjectile extends Render
{
public ModelBase model = new ModelEnergyBazookaMainProjectile();
private static final ResourceLocation field_110833_a = new ResourceLocation("alchemicalwizardry", "textures/models/EnergyBazookaMainProjectile.png"); //refers to:YourMod/modelsTextureFile/optionalFile/yourTexture.png
private float scale = 1.0f;
@Override
public void doRender(Entity entity, double d0, double d1, double d2, float f, float f1)
{
GL11.glPushMatrix();
GL11.glTranslatef((float) d0, (float) d1, (float) d2);
GL11.glEnable(GL12.GL_RESCALE_NORMAL);
GL11.glScalef(scale, scale, scale);
this.bindTexture(this.getEntityTexture(entity));
GL11.glRotatef(entity.prevRotationYaw + (entity.rotationYaw - entity.prevRotationYaw) * f1, 0.0F, 1.0F, 0.0F);
GL11.glRotatef(180.0f - entity.prevRotationPitch + (entity.rotationPitch - entity.prevRotationPitch) * f1, 1.0F, 0.0F, 0.0f);
model.render(entity, 0, (float) d0, (float) d1, (float) d2, f, f1);
//GL11.glRotatef(entity.getRotationYawHead(), 0.0F, 1.0F, 0.0F);
GL11.glDisable(GL12.GL_RESCALE_NORMAL);
GL11.glPopMatrix();
}
@Override
protected ResourceLocation getEntityTexture(Entity entity)
{
// TODO Auto-generated method stub
return field_110833_a;
}
}

View file

@ -0,0 +1,101 @@
package WayofTime.alchemicalWizardry.common.renderer.projectile;
import net.minecraft.client.renderer.Tessellator;
import net.minecraft.client.renderer.entity.Render;
import net.minecraft.entity.Entity;
import net.minecraft.entity.IProjectile;
import net.minecraft.util.ResourceLocation;
import org.lwjgl.opengl.GL11;
import org.lwjgl.opengl.GL12;
import WayofTime.alchemicalWizardry.common.entity.projectile.ExplosionProjectile;
import WayofTime.alchemicalWizardry.common.entity.projectile.FireProjectile;
import WayofTime.alchemicalWizardry.common.entity.projectile.HolyProjectile;
import WayofTime.alchemicalWizardry.common.entity.projectile.IceProjectile;
import WayofTime.alchemicalWizardry.common.entity.projectile.LightningBoltProjectile;
import WayofTime.alchemicalWizardry.common.entity.projectile.MudProjectile;
import WayofTime.alchemicalWizardry.common.entity.projectile.WaterProjectile;
import WayofTime.alchemicalWizardry.common.entity.projectile.WindGustProjectile;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
@SideOnly(Side.CLIENT)
public class RenderEnergyBlastProjectile extends Render
{
public void doRenderEnergyBlastProjectile(Entity entityShot, double par2, double par4, double par6, float par8, float par9)
{
GL11.glPushMatrix();
GL11.glTranslatef((float) par2, (float) par4, (float) par6);
GL11.glEnable(GL12.GL_RESCALE_NORMAL);
GL11.glScalef(0.1F, 0.1F, 0.1F);
this.bindTexture(this.getEntityTexture(entityShot));
Tessellator var12 = Tessellator.instance;
GL11.glRotatef(180.0F - renderManager.playerViewY, 0.0F, 1.0F, 0.0F);
GL11.glRotatef(-renderManager.playerViewX, 1.0F, 0.0F, 0.0F);
var12.startDrawingQuads();
var12.setNormal(0.0F, 1.0F, 0.0F);
var12.addVertexWithUV(-0.5F, -0.25F, 0.0D, 0, 1);
var12.addVertexWithUV(0.5F, -0.25F, 0.0D, 1, 1);
var12.addVertexWithUV(0.5F, 0.75F, 0.0D, 1, 0);
var12.addVertexWithUV(-0.5F, 0.75F, 0.0D, 0, 0);
var12.draw();
GL11.glDisable(GL12.GL_RESCALE_NORMAL);
GL11.glPopMatrix();
}
@Override
public void doRender(Entity par1Entity, double par2, double par4, double par6, float par8, float par9)
{
if (par1Entity instanceof IProjectile)
{
this.doRenderEnergyBlastProjectile(par1Entity, par2, par4, par6, par8, par9);
}
}
@Override
protected ResourceLocation getEntityTexture(Entity entity)
{
if (entity instanceof IceProjectile)
{
return new ResourceLocation("alchemicalwizardry", "textures/entities/iceProjectile.png");
}
if (entity instanceof FireProjectile)
{
return new ResourceLocation("alchemicalwizardry", "textures/entities/fireProjectile.png");
}
if (entity instanceof ExplosionProjectile)
{
return new ResourceLocation("alchemicalwizardry", "textures/entities/explosionProjectile.png");
}
if (entity instanceof HolyProjectile)
{
return new ResourceLocation("alchemicalwizardry", "textures/entities/holyProjectile.png");
}
if (entity instanceof WindGustProjectile)
{
return new ResourceLocation("alchemicalwizardry", "textures/entities/windGustProjectile.png");
}
if (entity instanceof LightningBoltProjectile)
{
return new ResourceLocation("alchemicalwizardry", "textures/entities/lightningProjectile.png");
}
if (entity instanceof WaterProjectile)
{
return new ResourceLocation("alchemicalwizardry", "textures/entities/waterProjectile.png");
}
if (entity instanceof MudProjectile)
{
return new ResourceLocation("alchemicalwizardry", "textures/entities/mudProjectile.png");
}
return new ResourceLocation("alchemicalwizardry", "textures/entities/energyBlastProjectile.png");
}
}

View file

@ -0,0 +1,41 @@
package WayofTime.alchemicalWizardry.common.renderer.projectile;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
@SideOnly(Side.CLIENT)
public class RenderFireProjectile
{
// public void doRenderProjectile(FireProjectile entityShot, double par2, double par4, double par6, float par8, float par9)
// {
// GL11.glPushMatrix();
// GL11.glTranslatef((float)par2, (float)par4, (float)par6);
// GL11.glEnable(GL12.GL_RESCALE_NORMAL);
// GL11.glScalef(0.1F, 0.1F, 0.1F);
// this.func_110776_a(this.func_110775_a(entityShot));
// Tessellator var12 = Tessellator.instance;
// GL11.glRotatef(180.0F - renderManager.playerViewY, 0.0F, 1.0F, 0.0F);
// GL11.glRotatef(-renderManager.playerViewX, 1.0F, 0.0F, 0.0F);
// var12.startDrawingQuads();
// var12.setNormal(0.0F, 1.0F, 0.0F);
// var12.addVertexWithUV(-0.5F, -0.25F, 0.0D, 0, 1);
// var12.addVertexWithUV(0.5F, -0.25F, 0.0D, 1, 1);
// var12.addVertexWithUV(0.5F, 0.75F, 0.0D, 1, 0);
// var12.addVertexWithUV(-0.5F, 0.75F, 0.0D, 0, 0);
// var12.draw();
// GL11.glDisable(GL12.GL_RESCALE_NORMAL);
// GL11.glPopMatrix();
// }
//
// @Override
// public void doRender(Entity par1Entity, double par2, double par4, double par6, float par8, float par9)
// {
// this.doRenderProjectile((FireProjectile)par1Entity, par2, par4, par6, par8, par9);
// }
//
// @Override
// protected ResourceLocation func_110775_a(Entity entity)
// {
// return new ResourceLocation("alchemicalwizardry:/textures/entities/fireProjectile.png");
// }
}

View file

@ -0,0 +1,39 @@
package WayofTime.alchemicalWizardry.common.renderer.projectile;
import WayofTime.alchemicalWizardry.common.renderer.model.ModelMeteor;
import net.minecraft.client.model.ModelBase;
import net.minecraft.client.renderer.entity.Render;
import net.minecraft.entity.Entity;
import net.minecraft.util.ResourceLocation;
import org.lwjgl.opengl.GL11;
import org.lwjgl.opengl.GL12;
public class RenderMeteor extends Render
{
public ModelBase model = new ModelMeteor();
private static final ResourceLocation field_110833_a = new ResourceLocation("alchemicalwizardry", "textures/models/Meteor.png"); //refers to:YourMod/modelsTextureFile/optionalFile/yourTexture.png
private float scale = 1.0f;
@Override
public void doRender(Entity entity, double d0, double d1, double d2, float f, float f1)
{
GL11.glPushMatrix();
GL11.glTranslatef((float) d0, (float) d1, (float) d2);
GL11.glEnable(GL12.GL_RESCALE_NORMAL);
GL11.glScalef(scale, scale, scale);
this.bindTexture(this.getEntityTexture(entity));
GL11.glRotatef(entity.prevRotationYaw + (entity.rotationYaw - entity.prevRotationYaw) * f1, 0.0F, 1.0F, 0.0F);
GL11.glRotatef(180.0f - entity.prevRotationPitch + (entity.rotationPitch - entity.prevRotationPitch) * f1, 1.0F, 0.0F, 0.0f);
model.render(entity, 0, (float) d0, (float) d1, (float) d2, f, f1);
//GL11.glRotatef(entity.getRotationYawHead(), 0.0F, 1.0F, 0.0F);
GL11.glDisable(GL12.GL_RESCALE_NORMAL);
GL11.glPopMatrix();
}
@Override
protected ResourceLocation getEntityTexture(Entity entity)
{
// TODO Auto-generated method stub
return field_110833_a;
}
}