package com.hbm.render.entity; import java.util.Random; import org.lwjgl.opengl.GL11; import com.hbm.entity.effect.EntityCloudFleijaRainbow; import com.hbm.entity.effect.EntityNukeCloudSmall; import com.hbm.lib.RefStrings; import com.hbm.main.ResourceManager; 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 RenderSmallNukeMK3 extends Render { private static final ResourceLocation objTesterModelRL = new ResourceLocation(/*"/assets/" + */RefStrings.MODID, "models/NukeCloudSmall.obj"); private IModelCustom blastModel; private ResourceLocation blastTexture; private static final ResourceLocation ringModelRL = new ResourceLocation(/*"/assets/" + */RefStrings.MODID, "models/Ring.obj"); private IModelCustom ringModel; private ResourceLocation ringTexture; private static final ResourceLocation ringBigModelRL = new ResourceLocation(/*"/assets/" + */RefStrings.MODID, "models/RingBig.obj"); private IModelCustom ringBigModel; private ResourceLocation ringBigTexture; public float scale = 0; public float ring = 0; public RenderSmallNukeMK3() { blastModel = AdvancedModelLoader.loadModel(objTesterModelRL); blastTexture = new ResourceLocation(RefStrings.MODID, "textures/models/NukeCloudFire.png"); ringModel = AdvancedModelLoader.loadModel(ringModelRL); ringTexture = new ResourceLocation(RefStrings.MODID, "textures/models/Ring2.png"); ringBigModel = AdvancedModelLoader.loadModel(ringBigModelRL); ringBigTexture = new ResourceLocation(RefStrings.MODID, "textures/models/Ring2.png"); scale = 0; ring = 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((EntityNukeCloudSmall)p_76986_1_, p_76986_2_, p_76986_4_, p_76986_6_, p_76986_8_, p_76986_9_); } public void render(EntityNukeCloudSmall 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.glEnable(GL11.GL_CULL_FACE); GL11.glDisable(GL11.GL_TEXTURE_2D); GL11.glColor4f(0.2F, 0.2F, 0.2F, 0.9F); GL11.glScalef(0.5F, 0.5F, 0.5F); //ResourceManager.sphere_ruv.renderAll(); GL11.glScalef(1/0.5F, 1/0.5F, 1/0.5F); int a = cloud.age; GL11.glEnable(GL11.GL_BLEND); GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_DST_COLOR); GL11.glScalef(a, a, a); ringModel.renderAll(); GL11.glScalef(2, 2, 2); ResourceManager.sphere_ruv.renderAll(); ResourceManager.sphere_iuv.renderAll(); GL11.glDisable(GL11.GL_BLEND); GL11.glEnable(GL11.GL_LIGHTING); GL11.glEnable(GL11.GL_TEXTURE_2D); GL11.glDisable(GL11.GL_CULL_FACE); GL11.glPopMatrix(); } @Override protected ResourceLocation getEntityTexture(Entity p_110775_1_) { return null; } }