Added Pixie model and texture

This commit is contained in:
Matt Caughey 2013-11-16 06:23:07 -05:00
parent 1d1b989ae4
commit a289ac8249
3 changed files with 66 additions and 0 deletions

View file

@ -102,6 +102,8 @@ public class BlockBOPFoliage extends BlockFlower implements IShearable
case 1:
case 2:
case 3:
case 10:
case 11:
if (world.rand.nextInt(8) != 0)
return ret;

View file

@ -0,0 +1,64 @@
package biomesoplenty.entities.models;
import net.minecraft.client.model.ModelBase;
import net.minecraft.client.model.ModelRenderer;
import net.minecraft.entity.Entity;
import net.minecraft.util.MathHelper;
public class ModelPixie extends ModelBase
{
//fields
ModelRenderer Body;
ModelRenderer LeftWing;
ModelRenderer RightWing;
public ModelPixie()
{
textureWidth = 64;
textureHeight = 32;
Body = new ModelRenderer(this, 0, 0);
Body.addBox(0F, 0F, 0F, 4, 4, 4);
Body.setRotationPoint(-2F, 16F, -2F);
Body.setTextureSize(64, 32);
Body.mirror = true;
setRotation(Body, 0F, 0F, 0F);
LeftWing.mirror = true;
LeftWing = new ModelRenderer(this, 32, 0);
LeftWing.addBox(0F, 0F, 0F, 0, 4, 7);
LeftWing.setRotationPoint(2F, 15F, -1F);
LeftWing.setTextureSize(64, 32);
LeftWing.mirror = true;
setRotation(LeftWing, 0.5061455F, 0.5061455F, 0.3316126F);
LeftWing.mirror = false;
RightWing = new ModelRenderer(this, 50, 0);
RightWing.addBox(0F, 0F, 0F, 0, 4, 7);
RightWing.setRotationPoint(-2F, 15F, -1F);
RightWing.setTextureSize(64, 32);
RightWing.mirror = true;
setRotation(RightWing, 0.5061455F, -0.5061455F, -0.3316126F);
}
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5)
{
super.render(entity, f, f1, f2, f3, f4, f5);
setRotationAngles(f, f1, f2, f3, f4, f5, entity);
Body.render(f5);
LeftWing.render(f5);
RightWing.render(f5);
}
private void setRotation(ModelRenderer model, float x, float y, float z)
{
model.rotateAngleX = x;
model.rotateAngleY = y;
model.rotateAngleZ = z;
}
@Override
public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity)
{
super.setRotationAngles(f, f1, f2, f3, f4, f5, entity);
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 505 B