From a289ac82498e055acc6768f22b5cf7ebd15659a3 Mon Sep 17 00:00:00 2001 From: Matt Caughey Date: Sat, 16 Nov 2013 06:23:07 -0500 Subject: [PATCH] Added Pixie model and texture --- .../biomesoplenty/blocks/BlockBOPFoliage.java | 2 + .../entities/models/ModelPixie.java | 64 ++++++++++++++++++ .../biomesoplenty/textures/mobs/pixie.png | Bin 0 -> 505 bytes 3 files changed, 66 insertions(+) create mode 100644 common/biomesoplenty/entities/models/ModelPixie.java create mode 100644 resources/assets/biomesoplenty/textures/mobs/pixie.png diff --git a/common/biomesoplenty/blocks/BlockBOPFoliage.java b/common/biomesoplenty/blocks/BlockBOPFoliage.java index cd18ea901..24d83128d 100644 --- a/common/biomesoplenty/blocks/BlockBOPFoliage.java +++ b/common/biomesoplenty/blocks/BlockBOPFoliage.java @@ -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; diff --git a/common/biomesoplenty/entities/models/ModelPixie.java b/common/biomesoplenty/entities/models/ModelPixie.java new file mode 100644 index 000000000..5c3bd351f --- /dev/null +++ b/common/biomesoplenty/entities/models/ModelPixie.java @@ -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); + } + +} diff --git a/resources/assets/biomesoplenty/textures/mobs/pixie.png b/resources/assets/biomesoplenty/textures/mobs/pixie.png new file mode 100644 index 0000000000000000000000000000000000000000..a5b5befce3fe77ee65cb4c7d0256d4e1f175e08f GIT binary patch literal 505 zcmeAS@N?(olHy`uVBq!ia0vp^4nVBH!3HE3&8=$zQY`6?zK#qG8~eHcB(eheoCO|{ z#S9F5hd`K7RKu$QC@59p8c`CQpH@FNsoPmL{ z)YHW=B*XdbR8RlI1_G_W|NC=nRQ|#F=CcO(ArybCk!T8vNYi&(GV6R>qX z5XO3A2fLI*0Oyn2GoOmzs|o2!`4GM7AoHQq0v~VX{$qaN|IT~Y?5EjVj(xu{*ZQX> z=d@B`h!_R+j5fsCb!HFF`QrfK-WKiiA`ji*UvNWqGtaqwh{1Fq#-VUHx3vIVCg!0H^oSa{vGU literal 0 HcmV?d00001