From 99a3283d8405b8b8140cdeb5e34baf1b5068d782 Mon Sep 17 00:00:00 2001 From: Jared Blackburn Date: Wed, 23 Jun 2021 00:26:08 -0400 Subject: [PATCH] GeckoLib hissing demon model --- .../com/gw/dm/entity/EntityHissingDemon.java | 22 ++- .../com/gw/dm/model/ModelHissingDemon.java | 60 +++++-- ...singDemon.animation => hissing_demon.json} | 0 .../assets/dungeonmobs/geo/hissing_demon.json | 167 ++++++++++++++++++ 4 files changed, 227 insertions(+), 22 deletions(-) rename src/main/resources/assets/dungeonmobs/animations/{HissingDemon.animation => hissing_demon.json} (100%) create mode 100644 src/main/resources/assets/dungeonmobs/geo/hissing_demon.json diff --git a/src/main/java/com/gw/dm/entity/EntityHissingDemon.java b/src/main/java/com/gw/dm/entity/EntityHissingDemon.java index c411d55..244d3e2 100644 --- a/src/main/java/com/gw/dm/entity/EntityHissingDemon.java +++ b/src/main/java/com/gw/dm/entity/EntityHissingDemon.java @@ -40,8 +40,11 @@ import net.minecraft.util.SoundEvent; import net.minecraft.world.DifficultyInstance; import net.minecraft.world.World; +import software.bernie.geckolib3.core.IAnimatable; +import software.bernie.geckolib3.core.manager.AnimationData; +import software.bernie.geckolib3.core.manager.AnimationFactory; -public class EntityHissingDemon extends EntityDungeonMob implements IMob, IRangedAttackMob, IBeMagicMob { +public class EntityHissingDemon extends EntityDungeonMob implements IMob, IRangedAttackMob, IBeMagicMob, IAnimatable { private static String mobName = DungeonMobs.MODID + ":dmmaralith"; private final NonNullList hands = NonNullList.withSize(6, ItemStack.EMPTY); private final List handshuffler = new ArrayList<>(); @@ -49,8 +52,6 @@ public class EntityHissingDemon extends EntityDungeonMob implements IMob, IRange private static final DataParameter SWINGING_ARMS = EntityDataManager.createKey(EntityHissingDemon.class, DataSerializers.BOOLEAN); - private static final DataParameter SWINGING_ARM - = EntityDataManager.createKey(EntityHissingDemon.class, DataSerializers.VARINT); private int armInUse = 0; public EntityHissingDemon(World worldIn) { @@ -61,7 +62,6 @@ public EntityHissingDemon(World worldIn) { for(int i = 0; i < 6; i++) { handshuffler.add(i); } - // TODO Auto-generated constructor stub } @@ -335,4 +335,18 @@ protected void dropEquipment(boolean wasRecentlyHit, int lootingModifier) { super.dropEquipment(wasRecentlyHit, lootingModifier); } + + @Override + public void registerControllers(AnimationData data) { + // TODO Auto-generated method stub + + } + + + @Override + public AnimationFactory getFactory() { + // TODO Auto-generated method stub + return null; + } + } diff --git a/src/main/java/com/gw/dm/model/ModelHissingDemon.java b/src/main/java/com/gw/dm/model/ModelHissingDemon.java index 13b5b26..fc2eb85 100644 --- a/src/main/java/com/gw/dm/model/ModelHissingDemon.java +++ b/src/main/java/com/gw/dm/model/ModelHissingDemon.java @@ -62,58 +62,82 @@ public ModelHissingDemon() { hbone.cubeList.add(new ModelBox(hbone, 0, 0, -6.0F, -22.0F, -3.0F, 12, 12, 12, 0.0F, false)); ab1 = new ModelRenderer(this); - ab1.setRotationPoint(-6.0F, -8.0F, 3.0F); + ab1.setRotationPoint(-6.0F, 2.0F, 0.0F); arm1_r1 = new ModelRenderer(this); - arm1_r1.setRotationPoint(0.0F, 1.0F, 0.0F); + arm1_r1.setRotationPoint(0.0F, -9.0F, 0.0F); ab1.addChild(arm1_r1); - arm1_r1.setTextureOffset(0, 61).addBox(-2.5F, -2.0F, -2.25F, 4.0F, 18.0F, 4.0F, 0.0F, false); + arm1_r1.cubeList.add(new ModelBox(arm1_r1, 0, 61, -2.4289F, -1.9211F, 0.75F, 4, 18, 4, 0.0F, false)); ab2 = new ModelRenderer(this); - ab2.setRotationPoint(-6.0F, -4.0F, 2.0F); + ab2.setRotationPoint(-6.0F, 5.0F, 0.0F); arm2_r1 = new ModelRenderer(this); - arm2_r1.setRotationPoint(0.0F, -0.5F, 1.0F); + arm2_r1.setRotationPoint(0.0F, -9.5F, 0.0F); ab2.addChild(arm2_r1); - arm2_r1.setTextureOffset(21, 61).addBox(-1.75F, 0.25F, -2.25F, 4.0F, 18.0F, 4.0F, 0.0F, false); + arm2_r1.cubeList.add(new ModelBox(arm2_r1, 21, 61, -1.75F, 0.15F, 0.825F, 4, 18, 4, 0.0F, false)); ab3 = new ModelRenderer(this); - ab3.setRotationPoint(-5.0F, -3.0F, 3.0F); + ab3.setRotationPoint(-9.0F, 15.0F, 0.0F); arm3_r1 = new ModelRenderer(this); - arm3_r1.setRotationPoint(-1.0F, 1.0F, 0.0F); + arm3_r1.setRotationPoint(3.0F, -17.0F, 0.0F); ab3.addChild(arm3_r1); - arm3_r1.setTextureOffset(0, 61).addBox(-2.25F, -1.25F, -2.25F, 4.0F, 18.0F, 5.0F, 0.0F, false); + arm3_r1.cubeList.add(new ModelBox(arm3_r1, 0, 61, -2.3431F, -1.1931F, 0.675F, 4, 18, 5, 0.0F, false)); ab4 = new ModelRenderer(this); - ab4.setRotationPoint(6.0F, -7.0F, 3.0F); + ab4.setRotationPoint(-8.0F, 12.0F, 0.0F); arm4_r1 = new ModelRenderer(this); - arm4_r1.setRotationPoint(0.0F, 0.0F, -3.0F); + arm4_r1.setRotationPoint(14.0F, -19.0F, 0.0F); ab4.addChild(arm4_r1); - arm4_r1.setTextureOffset(0, 61).addBox(-2.0F, -2.0F, 0.75F, 4.0F, 18.0F, 5.0F, 0.0F, false); + arm4_r1.cubeList.add(new ModelBox(arm4_r1, 0, 61, -2.0711F, -1.9211F, 0.75F, 4, 18, 5, 0.0F, false)); ab5 = new ModelRenderer(this); - ab5.setRotationPoint(7.0F, -4.0F, 3.0F); + ab5.setRotationPoint(-8.0F, -4.0F, 0.0F); arm5_r1 = new ModelRenderer(this); - arm5_r1.setRotationPoint(-1.0F, -0.5F, -3.0F); + arm5_r1.setRotationPoint(14.0F, -0.5F, 0.0F); ab5.addChild(arm5_r1); - arm5_r1.setTextureOffset(21, 61).addBox(-1.75F, 0.25F, 0.75F, 4.0F, 18.0F, 4.0F, 0.0F, false); + arm5_r1.cubeList.add(new ModelBox(arm5_r1, 21, 61, -1.75F, 0.15F, 0.825F, 4, 18, 4, 0.0F, false)); ab6 = new ModelRenderer(this); - ab6.setRotationPoint(4.0F, -3.0F, 0.0F); + ab6.setRotationPoint(-9.0F, 15.0F, 0.0F); arm6_r1 = new ModelRenderer(this); - arm6_r1.setRotationPoint(2.0F, 1.0F, 3.0F); + arm6_r1.setRotationPoint(15.0F, -17.0F, 0.0F); ab6.addChild(arm6_r1); - arm6_r1.setTextureOffset(0, 61).addBox(-2.25F, -2.25F, -2.25F, 4.0F, 18.0F, 5.0F, 0.0F, false); + arm6_r1.cubeList.add(new ModelBox(arm6_r1, 0, 61, -2.1569F, -2.1931F, 0.675F, 4, 18, 5, 0.0F, false)); + + t1 = new ModelRenderer(this); + t1.setRotationPoint(0.0F, 15.0F, 0.0F); + t1.cubeList.add(new ModelBox(t1, 43, 17, -5.0F, -4.0F, 4.0F, 10, 8, 8, 0.0F, false)); + + t2 = new ModelRenderer(this); + t2.setRotationPoint(0.0F, 15.0F, 0.0F); + t2.cubeList.add(new ModelBox(t2, 0, 44, -4.0F, 1.0F, 6.0F, 8, 8, 8, 0.0F, false)); + + t3 = new ModelRenderer(this); + t3.setRotationPoint(0.0F, 15.0F, 0.0F); + t3.cubeList.add(new ModelBox(t3, 51, 0, -4.0F, 1.0F, 14.0F, 8, 8, 8, 0.0F, false)); + + t4 = new ModelRenderer(this); + t4.setRotationPoint(0.0F, 15.0F, 0.0F); + t4.cubeList.add(new ModelBox(t4, 40, 63, -3.0F, 3.0F, 22.0F, 6, 6, 6, 0.0F, false)); + + t5 = new ModelRenderer(this); + t5.setRotationPoint(0.0F, 24.0F, 0.0F); + t5.cubeList.add(new ModelBox(t5, 65, 63, -2.0F, -4.0F, 28.0F, 4, 4, 4, 0.0F, false)); + + t6 = new ModelRenderer(this); + t6.setRotationPoint(0.0F, 24.0F, 0.0F); + t6.cubeList.add(new ModelBox(t6, 39, 0, -1.5F, -3.0F, 32.0F, 3, 3, 3, 0.0F, false)); t7 = new ModelRenderer(this); t7.setRotationPoint(0.0F, 24.0F, 0.0F); diff --git a/src/main/resources/assets/dungeonmobs/animations/HissingDemon.animation b/src/main/resources/assets/dungeonmobs/animations/hissing_demon.json similarity index 100% rename from src/main/resources/assets/dungeonmobs/animations/HissingDemon.animation rename to src/main/resources/assets/dungeonmobs/animations/hissing_demon.json diff --git a/src/main/resources/assets/dungeonmobs/geo/hissing_demon.json b/src/main/resources/assets/dungeonmobs/geo/hissing_demon.json new file mode 100644 index 0000000..83c9b4f --- /dev/null +++ b/src/main/resources/assets/dungeonmobs/geo/hissing_demon.json @@ -0,0 +1,167 @@ +{ + "format_version": "1.12.0", + "minecraft:geometry": [ + { + "description": { + "identifier": "geometry.unknown", + "texture_width": 96, + "texture_height": 96, + "visible_bounds_width": 6, + "visible_bounds_height": 4.5, + "visible_bounds_offset": [0, 1.75, 0] + }, + "bones": [ + { + "name": "hbone", + "pivot": [0, 33, 3], + "cubes": [ + {"origin": [-6, 33, -3], "size": [12, 12, 12], "uv": [0, 0]} + ] + }, + { + "name": "ab1", + "pivot": [-6, 32, 3], + "rotation": [2.5, -45, 0] + }, + { + "name": "arm1_r1", + "parent": "ab1", + "pivot": [-6, 31, 3], + "rotation": [0, 0, 135.00032], + "cubes": [ + {"origin": [-8.5, 15, 0.75], "size": [4, 18, 4], "uv": [0, 61]} + ] + }, + { + "name": "ab2", + "pivot": [-6, 28, 2], + "rotation": [0, -45, 0] + }, + { + "name": "arm2_r1", + "parent": "ab2", + "pivot": [-6, 28.5, 3], + "rotation": [0, 0, 90.00021], + "cubes": [ + {"origin": [-7.75, 10.25, 0.75], "size": [4, 18, 4], "uv": [21, 61]} + ] + }, + { + "name": "ab3", + "pivot": [-5, 27, 3], + "rotation": [0, -45, 0] + }, + { + "name": "arm3_r1", + "parent": "ab3", + "pivot": [-6, 26, 3], + "rotation": [0, 0, 45.00011], + "cubes": [ + {"origin": [-8.25, 9.25, 0.75], "size": [4, 18, 5], "uv": [0, 61]} + ] + }, + { + "name": "ab4", + "pivot": [6, 31, 3], + "rotation": [0, 45, 0] + }, + { + "name": "arm4_r1", + "parent": "ab4", + "pivot": [6, 31, 0], + "rotation": [0, 0, -135.00032], + "cubes": [ + {"origin": [4, 15, 0.75], "size": [4, 18, 5], "uv": [0, 61]} + ] + }, + { + "name": "ab5", + "pivot": [7, 28, 3], + "rotation": [0, 45, 0] + }, + { + "name": "arm5_r1", + "parent": "ab5", + "pivot": [6, 28.5, 0], + "rotation": [0, 0, -90.00021], + "cubes": [ + {"origin": [4.25, 10.25, 0.75], "size": [4, 18, 4], "uv": [21, 61]} + ] + }, + { + "name": "ab6", + "pivot": [4, 27, 0], + "rotation": [0, 45, 0] + }, + { + "name": "arm6_r1", + "parent": "ab6", + "pivot": [6, 26, 3], + "rotation": [0, 0, -45.00011], + "cubes": [ + {"origin": [3.75, 10.25, 0.75], "size": [4, 18, 5], "uv": [0, 61]} + ] + }, + { + "name": "t1", + "pivot": [0, 9, 6], + "cubes": [ + {"origin": [-5, 5, 4], "size": [10, 8, 8], "uv": [43, 17]} + ] + }, + { + "name": "t2", + "pivot": [0, 4, 10], + "cubes": [ + {"origin": [-4, 0, 6], "size": [8, 8, 8], "uv": [0, 44]} + ] + }, + { + "name": "t3", + "pivot": [0, 0, 14], + "cubes": [ + {"origin": [-4, 0, 14], "size": [8, 8, 8], "uv": [51, 0]} + ] + }, + { + "name": "t4", + "pivot": [0, 0, 24], + "cubes": [ + {"origin": [-3, 0, 22], "size": [6, 6, 6], "uv": [40, 63]} + ] + }, + { + "name": "t5", + "pivot": [0, 0, 28], + "cubes": [ + {"origin": [-2, 0, 28], "size": [4, 4, 4], "uv": [65, 63]} + ] + }, + { + "name": "t6", + "pivot": [0, 0, 32], + "cubes": [ + {"origin": [-1.5, 0, 32], "size": [3, 3, 3], "uv": [39, 0]} + ] + }, + { + "name": "t7", + "pivot": [0, 0, 35], + "cubes": [ + {"origin": [-1, 0, 35], "size": [2, 2, 2], "uv": [0, 0]} + ] + }, + { + "name": "bb_main", + "pivot": [0, 0, 0], + "cubes": [ + {"origin": [-7, 10, 1], "size": [14, 9, 9], "uv": [0, 25]}, + {"origin": [-6, 15, 0], "size": [12, 18, 6], "uv": [41, 38]}, + {"origin": [-5, 27, -1.5], "size": [4, 3, 2], "uv": [27, 44]}, + {"origin": [1, 27, -1.5], "size": [4, 3, 2], "uv": [27, 44], "mirror": true} + ] + } + ] + } + ] +}