mirror of
https://github.com/GTNewHorizons/TinkersConstruct.git
synced 2026-11-24 22:14:31 +00:00
Last commit for 1.4.7
This commit is contained in:
1 parent
01c4a785eb
commit
2f5d798753
87 files changed
+818
-413
No files matched your search
@@ -22,107 +22,11 @@ public class SkylaRender extends RenderLiving
|
||||
super(new SkylaModel(), 0.5F);
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates creeper scale in prerender callback
|
||||
*/
|
||||
protected void updateCreeperScale(Skyla par1EntityCreeper, float par2)
|
||||
{
|
||||
float var4 = par1EntityCreeper.getCreeperFlashIntensity(par2);
|
||||
float var5 = 1.0F + MathHelper.sin(var4 * 100.0F) * var4 * 0.01F;
|
||||
|
||||
if (var4 < 0.0F)
|
||||
{
|
||||
var4 = 0.0F;
|
||||
}
|
||||
|
||||
if (var4 > 1.0F)
|
||||
{
|
||||
var4 = 1.0F;
|
||||
}
|
||||
|
||||
var4 *= var4;
|
||||
var4 *= var4;
|
||||
float var6 = (1.0F + var4 * 0.4F) * var5;
|
||||
float var7 = (1.0F + var4 * 0.1F) / var5;
|
||||
GL11.glScalef(var6, var7, var6);
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates color multiplier based on creeper state called by getColorMultiplier
|
||||
*/
|
||||
protected int updateCreeperColorMultiplier(Skyla par1EntityCreeper, float par2, float par3)
|
||||
{
|
||||
float var5 = par1EntityCreeper.getCreeperFlashIntensity(par3);
|
||||
|
||||
if ((int)(var5 * 10.0F) % 2 == 0)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
int var6 = (int)(var5 * 0.2F * 255.0F);
|
||||
|
||||
if (var6 < 0)
|
||||
{
|
||||
var6 = 0;
|
||||
}
|
||||
|
||||
if (var6 > 255)
|
||||
{
|
||||
var6 = 255;
|
||||
}
|
||||
|
||||
short var7 = 255;
|
||||
short var8 = 255;
|
||||
short var9 = 255;
|
||||
return var6 << 24 | var7 << 16 | var8 << 8 | var9;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* A method used to render a creeper's powered form as a pass model.
|
||||
*/
|
||||
protected int renderCreeperPassModel(Skyla par1EntityCreeper, int par2, float par3)
|
||||
{
|
||||
if (par1EntityCreeper.getPowered())
|
||||
{
|
||||
if (par1EntityCreeper.getHasActivePotion())
|
||||
{
|
||||
GL11.glDepthMask(false);
|
||||
}
|
||||
else
|
||||
{
|
||||
GL11.glDepthMask(true);
|
||||
}
|
||||
|
||||
if (par2 == 1)
|
||||
{
|
||||
float var4 = (float)par1EntityCreeper.ticksExisted + par3;
|
||||
this.loadTexture("/armor/power.png");
|
||||
GL11.glMatrixMode(GL11.GL_TEXTURE);
|
||||
GL11.glLoadIdentity();
|
||||
float var5 = var4 * 0.01F;
|
||||
float var6 = var4 * 0.01F;
|
||||
GL11.glTranslatef(var5, var6, 0.0F);
|
||||
this.setRenderPassModel(this.creeperModel);
|
||||
GL11.glMatrixMode(GL11.GL_MODELVIEW);
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
float var7 = 0.5F;
|
||||
GL11.glColor4f(var7, var7, var7, 1.0F);
|
||||
GL11.glDisable(GL11.GL_LIGHTING);
|
||||
GL11.glBlendFunc(GL11.GL_ONE, GL11.GL_ONE);
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (par2 == 2)
|
||||
{
|
||||
GL11.glMatrixMode(GL11.GL_TEXTURE);
|
||||
GL11.glLoadIdentity();
|
||||
GL11.glMatrixMode(GL11.GL_MODELVIEW);
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
GL11.glDisable(GL11.GL_BLEND);
|
||||
}
|
||||
}
|
||||
|
||||
return -1;
|
||||
}
|
||||
@@ -136,17 +40,17 @@ public class SkylaRender extends RenderLiving
|
||||
* Allows the render to do any OpenGL state modifications necessary before the model is rendered. Args:
|
||||
* entityLiving, partialTickTime
|
||||
*/
|
||||
protected void preRenderCallback(EntityLiving par1EntityLiving, float par2)
|
||||
/*protected void preRenderCallback(EntityLiving par1EntityLiving, float par2)
|
||||
{
|
||||
this.updateCreeperScale((Skyla)par1EntityLiving, par2);
|
||||
}
|
||||
}*/
|
||||
|
||||
/**
|
||||
* Returns an ARGB int color back. Args: entityLiving, lightBrightness, partialTickTime
|
||||
*/
|
||||
protected int getColorMultiplier(EntityLiving par1EntityLiving, float par2, float par3)
|
||||
{
|
||||
return this.updateCreeperColorMultiplier((Skyla)par1EntityLiving, par2, par3);
|
||||
return super.getColorMultiplier(par1EntityLiving, par2, par3);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in new issue
Block a user