Hbm-s-Nuclear-Tech-GIT/com/hbm/render/entity/RenderCloudFleija.java
2017-04-18 20:53:14 +02:00

60 lines
2.1 KiB
Java

package com.hbm.render.entity;
import java.util.Random;
import org.lwjgl.opengl.GL11;
import com.hbm.entity.effect.EntityCloudFleija;
import com.hbm.entity.effect.EntityNukeCloudBig;
import com.hbm.lib.RefStrings;
import net.minecraft.client.renderer.RenderHelper;
import net.minecraft.client.renderer.Tessellator;
import net.minecraft.client.renderer.entity.Render;
import net.minecraft.entity.Entity;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.client.model.AdvancedModelLoader;
import net.minecraftforge.client.model.IModelCustom;
public class RenderCloudFleija extends Render {
private static final ResourceLocation objTesterModelRL = new ResourceLocation(/*"/assets/" + */RefStrings.MODID, "models/Sphere.obj");
private IModelCustom blastModel;
private ResourceLocation blastTexture;
public float scale = 0;
public float ring = 0;
public RenderCloudFleija() {
blastModel = AdvancedModelLoader.loadModel(objTesterModelRL);
blastTexture = new ResourceLocation(RefStrings.MODID, "textures/models/BlastFleija.png");
scale = 0;
}
@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_) {
render((EntityCloudFleija)p_76986_1_, p_76986_2_, p_76986_4_, p_76986_6_, p_76986_8_, p_76986_9_);
}
public void render(EntityCloudFleija cloud, double p_76986_2_, double p_76986_4_, double p_76986_6_, float p_76986_8_, float p_76986_9_) {
GL11.glPushMatrix();
GL11.glTranslatef((float)p_76986_2_, (float)p_76986_4_, (float)p_76986_6_);
GL11.glDisable(GL11.GL_LIGHTING);
GL11.glDisable(GL11.GL_CULL_FACE);
//if(cloud.age < 150)
{
//GL11.glTranslatef(0.0F, -60F + ((p_76986_1_.age - 100) * 60 / 50), 0.0F);
GL11.glTranslatef(0.0F, 0.0F, 0.0F);
}
GL11.glScalef(cloud.age, cloud.age, cloud.age);
bindTexture(blastTexture);
blastModel.renderAll();
GL11.glPopMatrix();
}
@Override
protected ResourceLocation getEntityTexture(Entity p_110775_1_) {
return null;
}
}