Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.kazeyometest.tuto.client;
- import org.lwjgl.opengl.GL11;
- import org.lwjgl.opengl.GL12;
- import com.kazeyometest.tuto.common.EntitySortilege;
- import com.kazeyometest.tuto.common.modTutoriel;
- import net.minecraft.client.renderer.Tessellator;
- import net.minecraft.client.renderer.entity.RenderFireball;
- import net.minecraft.client.renderer.texture.TextureMap;
- import net.minecraft.entity.Entity;
- import net.minecraft.entity.projectile.EntityFireball;
- import net.minecraft.init.Items;
- import net.minecraft.util.IIcon;
- import net.minecraft.util.ResourceLocation;
- public class RenderSortilege extends RenderFireball {
- private float field_77002_a;
- public final ResourceLocation texture = new ResourceLocation(modTutoriel.MODID, "textures/entity/sortilege.png");
- public RenderSortilege(float par1){
- super(par1);
- }
- public void doRender(EntitySortilege par1EntityFireball, double par2, double par4, double par6, float par8, float par9) {
- GL11.glPushMatrix();
- this.bindEntityTexture(par1EntityFireball);
- GL11.glTranslatef((float)par2, (float)par4, (float)par6);
- GL11.glEnable(GL12.GL_RESCALE_NORMAL);
- float f2 = this.field_77002_a;
- GL11.glScalef(f2 / 1.0F, f2 / 1.0F, f2 / 1.0F);
- IIcon iicon = Items.fire_charge.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((double)(0.0F - f8), (double)(0.0F - f9), 0.0D, (double)f3, (double)f6);
- tessellator.addVertexWithUV((double)(f7 - f8), (double)(0.0F - f9), 0.0D, (double)f4, (double)f6);
- tessellator.addVertexWithUV((double)(f7 - f8), (double)(1.0F - f9), 0.0D, (double)f4, (double)f5);
- tessellator.addVertexWithUV((double)(0.0F - f8), (double)(1.0F - f9), 0.0D, (double)f3, (double)f5);
- tessellator.draw();
- GL11.glDisable(GL12.GL_RESCALE_NORMAL);
- GL11.glPopMatrix();
- }
- protected ResourceLocation getEntityTexture(EntityFireball par1EntityFireball) {
- return texture;
- }
- public void doRender(Entity par1Entity, double par2, double par4, double par6, float par8, float par9) {
- this.doRender((EntitySortilege)par1Entity, par2, par4, par6, par8, par9);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement