mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
Fixed bug where the mushroom cloud's renderer is always the same until restart
This commit is contained in:
parent
f86e116a81
commit
8357d03ebd
@ -1,5 +1,7 @@
|
|||||||
package com.hbm.entity;
|
package com.hbm.entity;
|
||||||
|
|
||||||
|
import org.lwjgl.opengl.GL11;
|
||||||
|
|
||||||
import cpw.mods.fml.relauncher.Side;
|
import cpw.mods.fml.relauncher.Side;
|
||||||
import cpw.mods.fml.relauncher.SideOnly;
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
import net.minecraft.entity.Entity;
|
import net.minecraft.entity.Entity;
|
||||||
@ -11,6 +13,9 @@ public class EntityNukeCloudSmall extends Entity {
|
|||||||
|
|
||||||
public int maxAge = 1000;
|
public int maxAge = 1000;
|
||||||
public int age;
|
public int age;
|
||||||
|
public float scale = 0;
|
||||||
|
public float ring = 0;
|
||||||
|
public float height = 0;
|
||||||
|
|
||||||
public EntityNukeCloudSmall(World p_i1582_1_) {
|
public EntityNukeCloudSmall(World p_i1582_1_) {
|
||||||
super(p_i1582_1_);
|
super(p_i1582_1_);
|
||||||
@ -18,6 +23,9 @@ public class EntityNukeCloudSmall extends Entity {
|
|||||||
this.ignoreFrustumCheck = true;
|
this.ignoreFrustumCheck = true;
|
||||||
this.isImmuneToFire = true;
|
this.isImmuneToFire = true;
|
||||||
this.age = 0;
|
this.age = 0;
|
||||||
|
scale = 0;
|
||||||
|
ring = 0;
|
||||||
|
height = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -51,6 +59,26 @@ public class EntityNukeCloudSmall extends Entity {
|
|||||||
this.age = 0;
|
this.age = 0;
|
||||||
this.setDead();
|
this.setDead();
|
||||||
}
|
}
|
||||||
|
ring += 0.1F;
|
||||||
|
|
||||||
|
if(age < 150)
|
||||||
|
{
|
||||||
|
height = -60F + ((age - 100) * 60 / 50);
|
||||||
|
if(scale < 1.5)
|
||||||
|
{
|
||||||
|
scale += 0.02;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if(age > 100)
|
||||||
|
{
|
||||||
|
if(scale < 1.5)
|
||||||
|
{
|
||||||
|
scale += 0.02;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
scale = 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@ -60,7 +60,8 @@ public class RenderSmallNukeAlt extends Render {
|
|||||||
GL11.glDisable(GL11.GL_CULL_FACE);
|
GL11.glDisable(GL11.GL_CULL_FACE);
|
||||||
if(p_76986_1_.age < 150)
|
if(p_76986_1_.age < 150)
|
||||||
{
|
{
|
||||||
GL11.glTranslatef(0.0F, -60F + ((p_76986_1_.age - 100) * 60 / 50), 0.0F);
|
//GL11.glTranslatef(0.0F, -60F + ((p_76986_1_.age - 100) * 60 / 50), 0.0F);
|
||||||
|
GL11.glTranslatef(0.0F, p_76986_1_.height, 0.0F);
|
||||||
}
|
}
|
||||||
GL11.glScalef(4.0F, 4.0F, 4.0F);
|
GL11.glScalef(4.0F, 4.0F, 4.0F);
|
||||||
|
|
||||||
@ -76,11 +77,11 @@ public class RenderSmallNukeAlt extends Render {
|
|||||||
GL11.glDisable(GL11.GL_LIGHTING);
|
GL11.glDisable(GL11.GL_LIGHTING);
|
||||||
GL11.glDisable(GL11.GL_CULL_FACE);
|
GL11.glDisable(GL11.GL_CULL_FACE);
|
||||||
GL11.glTranslatef(0.0F, 60F, 0.0F);
|
GL11.glTranslatef(0.0F, 60F, 0.0F);
|
||||||
if(scale < 1.5)
|
/*if(scale < 1.5)
|
||||||
{
|
{
|
||||||
scale += 0.02;
|
scale += 0.02;
|
||||||
}
|
}*/
|
||||||
GL11.glScalef(scale, 1.0F, scale);
|
GL11.glScalef(p_76986_1_.scale, 1.0F, p_76986_1_.scale);
|
||||||
GL11.glScalef(50F, 25.0F, 50F);
|
GL11.glScalef(50F, 25.0F, 50F);
|
||||||
|
|
||||||
bindTexture(ringBigTexture);
|
bindTexture(ringBigTexture);
|
||||||
@ -95,8 +96,8 @@ public class RenderSmallNukeAlt extends Render {
|
|||||||
GL11.glDisable(GL11.GL_LIGHTING);
|
GL11.glDisable(GL11.GL_LIGHTING);
|
||||||
GL11.glDisable(GL11.GL_CULL_FACE);
|
GL11.glDisable(GL11.GL_CULL_FACE);
|
||||||
GL11.glTranslatef(0.0F, 18F, 0.0F);
|
GL11.glTranslatef(0.0F, 18F, 0.0F);
|
||||||
ring += 0.1F;
|
//ring += 0.1F;
|
||||||
GL11.glScalef(ring * 10, 30F, ring * 10);
|
GL11.glScalef(p_76986_1_.ring * 10, 30F, p_76986_1_.ring * 10);
|
||||||
|
|
||||||
bindTexture(ringTexture);
|
bindTexture(ringTexture);
|
||||||
ringModel.renderAll();
|
ringModel.renderAll();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user