From 648b6c7cb9a5e78f0ad42192e19402cc9e9bb5f3 Mon Sep 17 00:00:00 2001 From: Matt Caughey Date: Sun, 24 Jan 2016 21:11:09 -0500 Subject: [PATCH] Added snail model and texture --- .../common/entities/ModelSnail.java | 71 ++++++++++++++++++ .../biomesoplenty/textures/entity/snail.png | Bin 0 -> 1065 bytes 2 files changed, 71 insertions(+) create mode 100644 src/main/java/biomesoplenty/common/entities/ModelSnail.java create mode 100644 src/main/resources/assets/biomesoplenty/textures/entity/snail.png diff --git a/src/main/java/biomesoplenty/common/entities/ModelSnail.java b/src/main/java/biomesoplenty/common/entities/ModelSnail.java new file mode 100644 index 000000000..d52568db0 --- /dev/null +++ b/src/main/java/biomesoplenty/common/entities/ModelSnail.java @@ -0,0 +1,71 @@ +package biomesoplenty.common.entities; + +import net.minecraft.client.model.ModelBase; +import net.minecraft.client.model.ModelRenderer; +import net.minecraft.entity.Entity; +import net.minecraft.util.MathHelper; + +public class ModelSnail extends ModelBase +{ + //fields + ModelRenderer Shell; + ModelRenderer Body; + ModelRenderer Left_Eye; + ModelRenderer Right_Eye; + + public ModelSnail() + { + textureWidth = 64; + textureHeight = 32; + + Shell = new ModelRenderer(this, 0, 0); + Shell.addBox(0F, 0F, 0F, 3, 8, 8); + Shell.setRotationPoint(0F, 0F, 0F); + Shell.setTextureSize(64, 32); + Shell.mirror = true; + setRotation(Shell, 0F, 0F, 0F); + Body = new ModelRenderer(this, 0, 16); + Body.addBox(0F, 0F, 0F, 3, 2, 12); + Body.setRotationPoint(0F, 8F, -3F); + Body.setTextureSize(64, 32); + Body.mirror = true; + setRotation(Body, 0F, 0F, 0F); + Left_Eye = new ModelRenderer(this, 22, 12); + Left_Eye.addBox(0F, 0F, 0F, 1, 3, 1); + Left_Eye.setRotationPoint(2F, 5F, -2F); + Left_Eye.setTextureSize(64, 32); + Left_Eye.mirror = true; + setRotation(Left_Eye, 0F, 0F, 0F); + Right_Eye = new ModelRenderer(this, 22, 12); + Right_Eye.addBox(0F, 0F, 0F, 1, 3, 1); + Right_Eye.setRotationPoint(0F, 5F, -2F); + Right_Eye.setTextureSize(64, 32); + Right_Eye.mirror = true; + setRotation(Right_Eye, 0F, 0F, 0F); + } + + @Override + 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); + Shell.render(f5); + Body.render(f5); + Left_Eye.render(f5); + Right_Eye.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); + } + +} \ No newline at end of file diff --git a/src/main/resources/assets/biomesoplenty/textures/entity/snail.png b/src/main/resources/assets/biomesoplenty/textures/entity/snail.png new file mode 100644 index 0000000000000000000000000000000000000000..39ef7013901e58d644e8e8ec2ef87f4bcf6300c3 GIT binary patch literal 1065 zcmV+^1lIeBP)N2bZe?^J zG%heMIczh2P5=M{r%6OXRA@u(S65S0Q4r>5`4@cGCmlhtW5a@lK*~)b>7-Fq6r=^x z6Tlgzgkr$n`yewuIb(USJ*l7PJKmeQIGOQ*Q3KbV**W)|v%4qzo!zsWs^8K5!6TRm zZNc6Cdep36S7Jd`8n0=(exVL?ojdR#cGQ>vJWHLzoxVf3H*naP09-w@Qv$GGgjROFke~~ds=NSo?1Dns%$WxBu?OM;gobjqleg&8=E6an#e(E~*1C5Iei@QXLWZ_616fJEmc`lHjx zMrPr)XAl&fpjTPNRbVJIje*EGl3hg%ohcw2o7K!KrVr@n7T|hiMi-FJ_Qo)I3 zax2kQkN@|?KQlh@uz9SaqqAh;w`Soni&tI|<;|Rh+m?r$4UZ^wKFjDbxs~Xu$NzgO j*LnR7{!bM_RaHL#qkmcSzRoy{00000NkvXXu0mjf`Kb27 literal 0 HcmV?d00001