initial commit
This commit is contained in:
parent
3c9ee26b06
commit
22186c33b9
1458 changed files with 282792 additions and 0 deletions
59
java/src/game/renderer/model/ModelCrystal.java
Executable file
59
java/src/game/renderer/model/ModelCrystal.java
Executable file
|
@ -0,0 +1,59 @@
|
|||
package game.renderer.model;
|
||||
|
||||
import game.WCF;
|
||||
import game.entity.Entity;
|
||||
|
||||
public class ModelCrystal extends ModelBase
|
||||
{
|
||||
/** The cube model for the Crystal. */
|
||||
private ModelRenderer cube;
|
||||
|
||||
/** The glass model for the Crystal. */
|
||||
private ModelRenderer glass = new ModelRenderer(this, "glass");
|
||||
|
||||
/** The base model for the Crystal. */
|
||||
private ModelRenderer base;
|
||||
|
||||
public ModelCrystal(float p_i1170_1_, boolean p_i1170_2_)
|
||||
{
|
||||
this.glass.setTextureOffset(0, 0).addBox(-4.0F, -4.0F, -4.0F, 8, 8, 8);
|
||||
this.cube = new ModelRenderer(this, "cube");
|
||||
this.cube.setTextureOffset(32, 0).addBox(-4.0F, -4.0F, -4.0F, 8, 8, 8);
|
||||
|
||||
if (p_i1170_2_)
|
||||
{
|
||||
this.base = new ModelRenderer(this, "base");
|
||||
this.base.setTextureOffset(0, 16).addBox(-6.0F, 0.0F, -6.0F, 12, 4, 12);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the models various rotation angles then renders the model.
|
||||
*/
|
||||
public void render(Entity entityIn, float p_78088_2_, float p_78088_3_, float p_78088_4_, float p_78088_5_, float p_78088_6_, float scale)
|
||||
{
|
||||
WCF.glPushMatrix();
|
||||
WCF.glScalef(2.0F, 2.0F, 2.0F);
|
||||
WCF.glTranslatef(0.0F, -0.5F, 0.0F);
|
||||
|
||||
if (this.base != null)
|
||||
{
|
||||
this.base.render(scale);
|
||||
}
|
||||
|
||||
WCF.glRotatef(p_78088_3_, 0.0F, 1.0F, 0.0F);
|
||||
WCF.glTranslatef(0.0F, 0.8F + p_78088_4_, 0.0F);
|
||||
WCF.glRotatef(60.0F, 0.7071F, 0.0F, 0.7071F);
|
||||
this.glass.render(scale);
|
||||
float f = 0.875F;
|
||||
WCF.glScalef(f, f, f);
|
||||
WCF.glRotatef(60.0F, 0.7071F, 0.0F, 0.7071F);
|
||||
WCF.glRotatef(p_78088_3_, 0.0F, 1.0F, 0.0F);
|
||||
this.glass.render(scale);
|
||||
WCF.glScalef(f, f, f);
|
||||
WCF.glRotatef(60.0F, 0.7071F, 0.0F, 0.7071F);
|
||||
WCF.glRotatef(p_78088_3_, 0.0F, 1.0F, 0.0F);
|
||||
this.cube.render(scale);
|
||||
WCF.glPopMatrix();
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue