From a02fad87325ae96a90aeab258d4f85057c2503f7 Mon Sep 17 00:00:00 2001 From: Sollace Date: Wed, 11 Dec 2024 21:29:28 +0100 Subject: [PATCH] Update models and fix crashes --- .../com/minelittlepony/client/HorseCam.java | 9 +- .../client/mixin/MixinCamera.java | 3 +- .../client/mixin/MixinDefaultSkinHelper.java | 5 +- .../MixinPlayerPositionLookS2CPacket.java | 9 +- .../render/entity/SkeleponyRenderer.java | 1 + .../render/entity/feature/CapeFeature.java | 5 +- .../render/entity/state/PonyRenderState.java | 4 +- .../minelittlepony/models/entity/allay.json | 70 ++--- .../models/entity/armour_stand.json | 51 +++- .../models/entity/enderman.json | 44 ++- .../minelittlepony/models/entity/piglin.json | 10 +- .../models/entity/races/steve/bat_pony.json | 10 +- .../models/entity/races/steve/gryphon.json | 19 ++ .../models/entity/races/steve/hippogriff.json | 27 ++ .../models/entity/races/steve/kirin.json | 10 +- .../races/steve/reformed_changeling.json | 8 + .../models/entity/races/steve/sea_pony.json | 100 ++++--- .../models/entity/races/steve/unicorn.json | 8 + .../models/entity/races/steve/zebra.json | 8 + .../models/entity/steve_pony.json | 254 +++++++++--------- .../minelittlepony/models/entity/strider.json | 43 ++- .../minelittlepony/models/entity/vex.json | 2 +- .../models/entity/villager.json | 8 + 23 files changed, 447 insertions(+), 261 deletions(-) diff --git a/src/main/java/com/minelittlepony/client/HorseCam.java b/src/main/java/com/minelittlepony/client/HorseCam.java index ec256028..28846711 100644 --- a/src/main/java/com/minelittlepony/client/HorseCam.java +++ b/src/main/java/com/minelittlepony/client/HorseCam.java @@ -2,6 +2,7 @@ package com.minelittlepony.client; import net.minecraft.client.MinecraftClient; import net.minecraft.entity.player.PlayerEntity; +import net.minecraft.entity.player.PlayerPosition; import net.minecraft.util.hit.HitResult; import net.minecraft.util.math.*; @@ -20,11 +21,11 @@ public class HorseCam { * Restores the previous camera (unadjusted) angle for the client when the server sends an update. * This is to prevent issues caused by the server updating our pitch whenever the player leaves a portal. */ - public static float transformIncomingServerCameraAngle(float serverPitch) { - if (MathHelper.approximatelyEquals(serverPitch, lastComputedPitch)) { - return lastOriginalPitch; + public static PlayerPosition transformIncomingServerCameraAngle(PlayerPosition change) { + if (MathHelper.approximatelyEquals(change.pitch(), lastComputedPitch)) { + return new PlayerPosition(change.position(), change.deltaMovement(), change.yaw(), lastOriginalPitch); } - return serverPitch; + return change; } /** diff --git a/src/main/java/com/minelittlepony/client/mixin/MixinCamera.java b/src/main/java/com/minelittlepony/client/mixin/MixinCamera.java index feb5efc7..fcfbaee4 100644 --- a/src/main/java/com/minelittlepony/client/mixin/MixinCamera.java +++ b/src/main/java/com/minelittlepony/client/mixin/MixinCamera.java @@ -2,7 +2,6 @@ package com.minelittlepony.client.mixin; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.injection.At; -import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; import com.llamalad7.mixinextras.injector.ModifyReturnValue; import com.minelittlepony.api.pony.Pony; @@ -13,7 +12,7 @@ import net.minecraft.client.render.Camera; @Mixin(Camera.class) abstract class MixinCamera { @ModifyReturnValue(method = "clipToSpace(F)F", at = @At("RETURN")) - private float redirectCameraDistance(float value, float initial, CallbackInfoReturnable info) { + private float redirectCameraDistance(float value) { if (MinecraftClient.getInstance().player != null) { Pony pony = Pony.getManager().getPony(MinecraftClient.getInstance().player); diff --git a/src/main/java/com/minelittlepony/client/mixin/MixinDefaultSkinHelper.java b/src/main/java/com/minelittlepony/client/mixin/MixinDefaultSkinHelper.java index 11eadf77..93e48ba8 100644 --- a/src/main/java/com/minelittlepony/client/mixin/MixinDefaultSkinHelper.java +++ b/src/main/java/com/minelittlepony/client/mixin/MixinDefaultSkinHelper.java @@ -11,9 +11,6 @@ import net.minecraft.util.Identifier; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.injection.At; -import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; - -import java.util.UUID; @Mixin(DefaultSkinHelper.class) abstract class MixinDefaultSkinHelper { @@ -23,7 +20,7 @@ abstract class MixinDefaultSkinHelper { } @ModifyReturnValue(method = "getSkinTextures(Ljava/util/UUID;)Lnet/minecraft/client/util/SkinTextures;", at = @At("RETURN")) - private static SkinTextures onGetTexture(SkinTextures returnValue, UUID uuid, CallbackInfoReturnable cir) { + private static SkinTextures onGetTexture(SkinTextures returnValue) { return PonyConfig.getInstance().ponyLevel.get() == PonyLevel.PONIES ? DefaultPonySkinHelper.getTextures(returnValue) : returnValue; } } diff --git a/src/main/java/com/minelittlepony/client/mixin/MixinPlayerPositionLookS2CPacket.java b/src/main/java/com/minelittlepony/client/mixin/MixinPlayerPositionLookS2CPacket.java index 1e7a4949..1e7cb555 100644 --- a/src/main/java/com/minelittlepony/client/mixin/MixinPlayerPositionLookS2CPacket.java +++ b/src/main/java/com/minelittlepony/client/mixin/MixinPlayerPositionLookS2CPacket.java @@ -4,6 +4,7 @@ import com.minelittlepony.client.HorseCam; import java.util.Set; +import net.minecraft.entity.player.PlayerPosition; import net.minecraft.network.listener.ClientPlayPacketListener; import net.minecraft.network.packet.Packet; import net.minecraft.network.packet.s2c.play.PlayerPositionLookS2CPacket; @@ -17,15 +18,15 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; @Mixin(PlayerPositionLookS2CPacket.class) abstract class MixinPlayerPositionLookS2CPacket implements Packet { @Shadow @Mutable - private @Final float pitch; + private @Final PlayerPosition change; @Shadow - private @Final Set flags; + private @Final Set relatives; @Inject(method = "apply(Lnet/minecraft/network/listener/ClientPlayPacketListener;)V", at = @At("HEAD")) private void onApply(ClientPlayPacketListener clientPlayPacketListener, CallbackInfo info) { - if (!flags.contains(PositionFlag.Y_ROT)) { - pitch = HorseCam.transformIncomingServerCameraAngle(pitch); + if (!relatives.contains(PositionFlag.Y_ROT)) { + change = HorseCam.transformIncomingServerCameraAngle(change); } } } diff --git a/src/main/java/com/minelittlepony/client/render/entity/SkeleponyRenderer.java b/src/main/java/com/minelittlepony/client/render/entity/SkeleponyRenderer.java index 98e7b814..1c677404 100644 --- a/src/main/java/com/minelittlepony/client/render/entity/SkeleponyRenderer.java +++ b/src/main/java/com/minelittlepony/client/render/entity/SkeleponyRenderer.java @@ -70,6 +70,7 @@ public class SkeleponyRenderer extends PonyRen public boolean isAttacking; public void updateState(LivingEntity entity, PonyModel model, Pony pony, ModelAttributes.Mode mode) { + super.updateState(entity, model, pony, mode); isAttacking = entity instanceof HostileEntity h && h.isAttacking(); if (entity.getUuid().getLeastSignificantBits() % 3 == 0) { race = Race.EARTH; diff --git a/src/main/java/com/minelittlepony/client/render/entity/feature/CapeFeature.java b/src/main/java/com/minelittlepony/client/render/entity/feature/CapeFeature.java index 090c0eb4..3ee60025 100644 --- a/src/main/java/com/minelittlepony/client/render/entity/feature/CapeFeature.java +++ b/src/main/java/com/minelittlepony/client/render/entity/feature/CapeFeature.java @@ -35,7 +35,10 @@ public class CapeFeature extends CapeFeatureRenderer { ArmourRendererPlugin plugin = ArmourRendererPlugin.INSTANCE.get(); Identifier capeTexture = player.skinTextures.capeTexture(); - VertexConsumer buffer = plugin.getCapeConsumer(player, vertices, player.skinTextures.capeTexture()); + if (capeTexture == null) { + return; + } + VertexConsumer buffer = plugin.getCapeConsumer(player, vertices, capeTexture); if (buffer == null) { return; } diff --git a/src/main/java/com/minelittlepony/client/render/entity/state/PonyRenderState.java b/src/main/java/com/minelittlepony/client/render/entity/state/PonyRenderState.java index 135fd228..74b5b255 100644 --- a/src/main/java/com/minelittlepony/client/render/entity/state/PonyRenderState.java +++ b/src/main/java/com/minelittlepony/client/render/entity/state/PonyRenderState.java @@ -39,6 +39,8 @@ public class PonyRenderState extends PlayerEntityRenderState implements PonyMode this.pony = pony; attributes.updateLivingState(entity, pony, mode); attributes.checkRainboom(entity, model, age); + size = baby ? SizePreset.FOAL : PonyConfig.getEffectiveSize(attributes.metadata.size()); + race = PonyConfig.getEffectiveRace(attributes.metadata.race()); vehicleOffset = hasVehicle ? entity.getVehicle().getEyeHeight(pose) : 0; riderOffset = getRiderYOffset(); nameplateYOffset = getNamePlateYOffset(entity); @@ -57,8 +59,6 @@ public class PonyRenderState extends PlayerEntityRenderState implements PonyMode || entity instanceof ZombifiedPiglinEntity ) && entity.hasCustomName() && entity.getCustomName().getString().equalsIgnoreCase("technoblade") ); - size = baby ? SizePreset.FOAL : PonyConfig.getEffectiveSize(attributes.metadata.size()); - race = PonyConfig.getEffectiveRace(attributes.metadata.race()); PonyPosture.of(attributes).updateState(entity, this); PonyModelPrepareCallback.EVENT.invoker().onPonyModelPrepared(attributes, model, ModelAttributes.Mode.OTHER); diff --git a/src/main/resources/assets/minelittlepony/models/entity/allay.json b/src/main/resources/assets/minelittlepony/models/entity/allay.json index d2ba0ba5..e80b96bf 100644 --- a/src/main/resources/assets/minelittlepony/models/entity/allay.json +++ b/src/main/resources/assets/minelittlepony/models/entity/allay.json @@ -3,19 +3,6 @@ "texture": { "w": 64, "h": 64 }, - "skeleton": { - "body": { - "neck": { - "head": {} - }, - "left_arm": {}, - "right_arm": {}, - "left_leg": {}, - "right_leg": {}, - "left_wing": {}, - "right_wing": {} - } - }, "data": { "head": { "pivot": [0, 1, -4], @@ -32,19 +19,19 @@ {"from": [ 1, -11, -3], "size": [1, 6, 1], "texture": {"u": 28, "v": 2} }, {"from": [-2, -11, -3], "size": [1, 6, 1], "texture": {"u": 24, "v": 2} } ] - } - } - }, - "hat": { - "texture": { "u": 40, "v": 27 }, - "pivot": [0, 1, -4], - "children": { - "hat_parts": { - "pivot": [0, 2, 0], - "cubes": [ - {"from": [-3, -8, -3], "size": [6, 6, 6], "dilate": 0.2 } - ] - } + }, + "hat": { + "texture": { "u": 40, "v": 27 }, + "pivot": [0, 1, -4], + "children": { + "hat_parts": { + "pivot": [0, 2, 0], + "cubes": [ + {"from": [-3, -8, -3], "size": [6, 6, 6], "dilate": 0.2 } + ] + } + } + } } }, "neck": { @@ -63,6 +50,9 @@ {"from": [0, 0, 0], "size": [6, 7, 14] } ], "children": { + "jacket": { + "visible": false + }, "tail": { "texture": {"u": 40, "v": 7 }, "pivot": [3, 0, 13], @@ -88,7 +78,12 @@ "texture": { "u": 36, "v": 12 }, "cubes": [ { "from": [0, 0, 0], "size": [ 2, 12, 2] } - ] + ], + "children": { + "right_sleeve": { + "visible": false + } + } }, "left_arm": { "pivot": [1, 8, -5], @@ -96,14 +91,24 @@ "mirror": true, "cubes": [ { "from": [0, 0, 0], "size": [ 2, 12, 2] } - ] + ], + "children": { + "left_sleeve": { + "visible": false + } + } }, "right_leg": { "pivot": [-3, 12, 3], "texture": { "u": 0, "v": 12 }, "cubes": [ { "from": [0, 0, 0], "size": [ 2, 12, 2] } - ] + ], + "children": { + "right_pants": { + "visible": false + } + } }, "left_leg": { "pivot": [1, 12, 3], @@ -111,7 +116,12 @@ "mirror": true, "cubes": [ { "from": [0, 0, 0], "size": [ 2, 12, 2] } - ] + ], + "children": { + "left_pants": { + "visible": false + } + } }, "left_wing": { "pivot": [2, 3, 1], diff --git a/src/main/resources/assets/minelittlepony/models/entity/armour_stand.json b/src/main/resources/assets/minelittlepony/models/entity/armour_stand.json index 21cf4ddc..f9bf9284 100644 --- a/src/main/resources/assets/minelittlepony/models/entity/armour_stand.json +++ b/src/main/resources/assets/minelittlepony/models/entity/armour_stand.json @@ -5,48 +5,75 @@ "pivot": [ 0, 5, 0 ], "cubes": [ { "from": [ -1, -7, -1 ], "size": [ 2, 7, 2 ] } - ] - }, - "hat": { - "pivot": [ 0, 5, 0 ], - "cubes": [ - { "from": [ -1, -7, -1 ], "size": [ 2, 7, 2 ], "dilate": 0.5 } - ] + ], + "children": { + "hat": { + "pivot": [ 0, 5, 0 ], + "cubes": [ + { "from": [ -1, -7, -1 ], "size": [ 2, 7, 2 ], "dilate": 0.5 } + ] + } + } }, "body": { "texture": { "u": 0, "v": 48 }, "pivot": [ 0, 0, 1 ], "cubes": [ { "from": [ -4, 10, -1 ], "size": [ 8, 2, 2 ] } - ] + ], + "children": { + "jacket": { + "visible": false + } + } }, "right_arm": { "texture": { "u": 8 }, "pivot": [ -1.9, 12, 1 ], "cubes": [ { "from": [ -1, 0, -1 ], "size": [ 2, 11, 2 ] } - ] + ], + "children": { + "right_sleeve": { + "visible": false + } + } }, "left_arm": { "texture": { "u": 40, "v": 16 }, "pivot": [ 1.9, 12, 1 ], "cubes": [ { "from": [ -1, 0, -1 ], "size": [ 2, 11, 2 ] } - ] + ], + "children": { + "left_sleeve": { + "visible": false + } + } }, "right_leg": { "texture": { "u": 8 }, "pivot": [ -1.9, 12, 10 ], "cubes": [ { "from": [ -1, 0, -1 ], "size": [2, 11, 2 ] } - ] + ], + "children": { + "right_pants": { + "visible": false + } + } }, "left_leg": { "texture": { "u": 40, "v": 16 }, "pivot": [ 1.9, 12, 10 ], "cubes": [ { "from": [ -1, 0, -1 ], "size": [2, 11, 2 ] } - ] + ], + "children": { + "left_pants": { + "visible": false + } + } }, "right_body_stick": { "texture": { "u": 16 }, diff --git a/src/main/resources/assets/minelittlepony/models/entity/enderman.json b/src/main/resources/assets/minelittlepony/models/entity/enderman.json index 7f943b13..74a57953 100644 --- a/src/main/resources/assets/minelittlepony/models/entity/enderman.json +++ b/src/main/resources/assets/minelittlepony/models/entity/enderman.json @@ -25,6 +25,14 @@ "locals": { "ear_shortening": "#global_ear_shortening" } + }, + "hat": { + "texture": { "u": 32, "v": 0 }, + "visible": false, + "pivot": [0, 0, -2], + "cubes": [ + { "from": [-4, -6, -6], "size": [ 8, 8, 8], "dilate": -0.5 } + ] }, "horn": { "data": "minelittlepony:components/horn", "implementation": "com.minelittlepony.client.model.part.UnicornHorn" }, "left_horn": { @@ -66,14 +74,6 @@ } } }, - "hat": { - "texture": { "u": 32, "v": 0 }, - "visible": false, - "pivot": [0, 0, -2], - "cubes": [ - { "from": [-4, -6, -6], "size": [ 8, 8, 8], "dilate": -0.5 } - ] - }, "right_arm": { "pivot": ["#arm_rotation_x_neg", "#arm_rotation_y", 0], "texture": { "u": 0, "v": 20 }, @@ -82,7 +82,12 @@ "from": [ "#arm_x_neg", 4, "#arm_z"], "size": [ "#arm_width", "#arm_length", "#arm_depth" ] } - ] + ], + "children": { + "right_sleeve": { + "visible": false + } + } }, "left_arm": { "pivot": ["#arm_rotation_x", "#arm_rotation_y", 0], @@ -92,7 +97,12 @@ "from": [ "#arm_x", 4, "#arm_z"], "size": [ "#arm_width", "#arm_length", "#arm_depth" ] } - ] + ], + "children": { + "left_sleeve": { + "visible": false + } + } }, "right_leg": { "pivot": ["#arm_rotation_x_neg", "#arm_rotation_y", 11], @@ -102,7 +112,12 @@ "from": [ "#arm_x_neg", 4, "#arm_z"], "size": [ "#arm_width", "#arm_length", "#arm_depth" ] } - ] + ], + "children": { + "right_pants": { + "visible": false + } + } }, "left_leg": { "pivot": ["#arm_rotation_x", "#arm_rotation_y", 11], @@ -112,7 +127,12 @@ "from": [ "#arm_x", 4, "#arm_z"], "size": [ "#arm_width", "#arm_length", "#arm_depth" ] } - ] + ], + "children": { + "left_pants": { + "visible": false + } + } }, "tail": { "type": "mson:slot", diff --git a/src/main/resources/assets/minelittlepony/models/entity/piglin.json b/src/main/resources/assets/minelittlepony/models/entity/piglin.json index c96f31c7..58b00df8 100644 --- a/src/main/resources/assets/minelittlepony/models/entity/piglin.json +++ b/src/main/resources/assets/minelittlepony/models/entity/piglin.json @@ -48,7 +48,15 @@ "texture": {"w": 128, "h": 64}, "implementation": "com.minelittlepony.client.model.part.UnicornHorn", "data": "minelittlepony:components/horn" - } + }, + "hat": { + "texture": { "u": 32, "v": 0 }, + "dilate": ["#head_elongation", "#head_elongation", 0], + "pivot": [ 0, "#head_pivot_y", 0 ], + "cubes": [ + { "from": [-4, -6, -6], "size": [ 8, 8, 8], "dilate": 0.5 } + ] + } } }, "wings": { diff --git a/src/main/resources/assets/minelittlepony/models/entity/races/steve/bat_pony.json b/src/main/resources/assets/minelittlepony/models/entity/races/steve/bat_pony.json index 32041634..534f4871 100644 --- a/src/main/resources/assets/minelittlepony/models/entity/races/steve/bat_pony.json +++ b/src/main/resources/assets/minelittlepony/models/entity/races/steve/bat_pony.json @@ -25,7 +25,15 @@ "locals": { "ear_shortening": "#global_ear_shortening" } - } + }, + "hat": { + "texture": { "u": 32, "v": 0 }, + "dilate": ["#head_elongation", "#head_elongation", 0], + "pivot": [ 0, "#head_pivot_y", 0 ], + "cubes": [ + { "from": [-4, -6, -6], "size": [ 8, 8, 8], "dilate": 0.5 } + ] + } } }, "wings": { diff --git a/src/main/resources/assets/minelittlepony/models/entity/races/steve/gryphon.json b/src/main/resources/assets/minelittlepony/models/entity/races/steve/gryphon.json index 1916e712..72df2899 100644 --- a/src/main/resources/assets/minelittlepony/models/entity/races/steve/gryphon.json +++ b/src/main/resources/assets/minelittlepony/models/entity/races/steve/gryphon.json @@ -48,6 +48,18 @@ "height": 1, "depth": "#arm_depth" } + }, + "left_sleeve": { + "pivot": ["#arm_rotation_x", "#arm_rotation_y", "#arm_rotation_z"], + "visible": false, + "texture": { "u": 48, "v": 48 }, + "cubes": [ + { + "from": [ "#arm_x", 4, "#arm_z"], + "size": [ "#arm_width", "#arm_length", "#arm_depth" ], + "dilate": 0.25 + } + ] } } }, @@ -91,6 +103,13 @@ "height": 1, "depth": "#arm_depth" } + }, + "right_sleeve": { + "visible": false, + "texture": { "u": 40, "v": 32 }, + "cubes": [ + { "from": [-3, -2, -2], "size": [ 4, 12, 4], "dilate": [0.25, 0.25, 0.25] } + ] } } } diff --git a/src/main/resources/assets/minelittlepony/models/entity/races/steve/hippogriff.json b/src/main/resources/assets/minelittlepony/models/entity/races/steve/hippogriff.json index 432b3730..940e8c5c 100644 --- a/src/main/resources/assets/minelittlepony/models/entity/races/steve/hippogriff.json +++ b/src/main/resources/assets/minelittlepony/models/entity/races/steve/hippogriff.json @@ -35,6 +35,14 @@ "ears": { "implementation": "com.minelittlepony.client.model.part.PonyEars", "data": "minelittlepony:components/ears" + }, + "hat": { + "texture": { "u": 32, "v": 0 }, + "dilate": ["#head_elongation", "#head_elongation", 0], + "pivot": [ 0, "#head_pivot_y", 0 ], + "cubes": [ + { "from": [-4, -6, -6], "size": [ 8, 8, 8], "dilate": 0.5 } + ] } } }, @@ -67,6 +75,18 @@ "height": "#fore_arm_length", "depth": "#arm_depth" } + }, + "left_sleeve": { + "pivot": ["#arm_rotation_x", "#arm_rotation_y", "#arm_rotation_z"], + "visible": false, + "texture": { "u": 48, "v": 48 }, + "cubes": [ + { + "from": [ "#arm_x", 4, "#arm_z"], + "size": [ "#arm_width", "#arm_length", "#arm_depth" ], + "dilate": 0.25 + } + ] } } }, @@ -151,6 +171,13 @@ "height": "#fore_leg_length", "depth": "#arm_depth" } + }, + "right_sleeve": { + "visible": false, + "texture": { "u": 40, "v": 32 }, + "cubes": [ + { "from": [-3, -2, -2], "size": [ 4, 12, 4], "dilate": [0.25, 0.25, 0.25] } + ] } } } diff --git a/src/main/resources/assets/minelittlepony/models/entity/races/steve/kirin.json b/src/main/resources/assets/minelittlepony/models/entity/races/steve/kirin.json index 8bda412d..3735db7c 100644 --- a/src/main/resources/assets/minelittlepony/models/entity/races/steve/kirin.json +++ b/src/main/resources/assets/minelittlepony/models/entity/races/steve/kirin.json @@ -34,7 +34,15 @@ }, "data": "minelittlepony:components/horn", "implementation": "com.minelittlepony.client.model.part.UnicornHorn" - } + }, + "hat": { + "texture": { "u": 32, "v": 0 }, + "dilate": ["#head_elongation", "#head_elongation", 0], + "pivot": [ 0, "#head_pivot_y", 0 ], + "cubes": [ + { "from": [-4, -6, -6], "size": [ 8, 8, 8], "dilate": 0.5 } + ] + } } }, "neck": { diff --git a/src/main/resources/assets/minelittlepony/models/entity/races/steve/reformed_changeling.json b/src/main/resources/assets/minelittlepony/models/entity/races/steve/reformed_changeling.json index eb5e5f92..32d84076 100644 --- a/src/main/resources/assets/minelittlepony/models/entity/races/steve/reformed_changeling.json +++ b/src/main/resources/assets/minelittlepony/models/entity/races/steve/reformed_changeling.json @@ -28,6 +28,14 @@ "data": "minelittlepony:components/horn", "implementation": "com.minelittlepony.client.model.part.UnicornHorn" }, + "hat": { + "texture": { "u": 32, "v": 0 }, + "dilate": ["#head_elongation", "#head_elongation", 0], + "pivot": [ 0, "#head_pivot_y", 0 ], + "cubes": [ + { "from": [-4, -6, -6], "size": [ 8, 8, 8], "dilate": 0.5 } + ] + }, "right_antler": { "pivot": [-2, -6, -2], "rotate": [0, 0, 120], diff --git a/src/main/resources/assets/minelittlepony/models/entity/races/steve/sea_pony.json b/src/main/resources/assets/minelittlepony/models/entity/races/steve/sea_pony.json index 377c3912..6cb31ecd 100644 --- a/src/main/resources/assets/minelittlepony/models/entity/races/steve/sea_pony.json +++ b/src/main/resources/assets/minelittlepony/models/entity/races/steve/sea_pony.json @@ -33,17 +33,17 @@ } ], "children": { - "tail_stub": {} + "tail_stub": {}, + "jacket": { + "texture": { "u": 24, "v": 0 }, + "visible": false, + "dilate": 0.25, + "cubes": [ + { "from": [-4, 4, -2], "size": [ 8, 8, 4 ], "texture": { "u": 16, "v": 32 }, "dilate": 0.25 } + ] + } } }, - "jacket": { - "texture": { "u": 24, "v": 0 }, - "visible": false, - "dilate": 0.25, - "cubes": [ - { "from": [-4, 4, -2], "size": [ 8, 8, 4 ], "texture": { "u": 16, "v": 32 }, "dilate": 0.25 } - ] - }, "right_arm": { "pivot": ["#arm_rotation_x_neg", "#arm_rotation_y", "#arm_rotation_z"], "rotate": [-80, 29, 0], @@ -53,7 +53,22 @@ "from": [ "#arm_x_neg", 4, "#arm_z"], "size": [ "#arm_width", "#arm_length", "#arm_depth" ] } - ] + ], + "children": { + "right_sleeve": { + "pivot": ["#arm_rotation_x_neg", "#arm_rotation_y", "#arm_rotation_z"], + "rotate": [-80, 29, 0], + "visible": false, + "texture": { "u": 40, "v": 32 }, + "cubes": [ + { + "from": [ "#arm_x_neg", 4, "#arm_z"], + "size": [ "#arm_width", "#arm_length", "#arm_depth" ], + "dilate": 0.25 + } + ] + } + } }, "left_arm": { "pivot": ["#arm_rotation_x", "#arm_rotation_y", "#arm_rotation_z"], @@ -64,55 +79,34 @@ "from": [ "#arm_x", 4, "#arm_z"], "size": [ "#arm_width", "#arm_length", "#arm_depth" ] } - ] + ], + "children": { + "left_sleeve": { + "pivot": ["#arm_rotation_x", "#arm_rotation_y", "#arm_rotation_z"], + "rotate": [-80, -29, 0], + "visible": false, + "texture": { "u": 48, "v": 48 }, + "cubes": [ + { + "from": [ "#arm_x", 4, "#arm_z"], + "size": [ "#arm_width", "#arm_length", "#arm_depth" ], + "dilate": 0.25 + } + ] + } + } }, "right_leg": { - "pivot": ["#arm_rotation_x_neg", "#arm_rotation_y", 11], "visible": false, - "texture": { "u": 0, "v": 16 }, - "cubes": [ - { - "from": [ "#arm_x_neg", 4, "#arm_z"], - "size": [ "#arm_width", "#arm_length", "#arm_depth" ] - } - ] + "children": { + "right_pants": {} + } }, "left_leg": { - "pivot": ["#arm_rotation_x", "#arm_rotation_y", 11], "visible": false, - "texture": { "u": 16, "v": 48 }, - "cubes": [ - { - "from": [ "#arm_x", 4, "#arm_z"], - "size": [ "#arm_width", "#arm_length", "#arm_depth" ] - } - ] - }, - "right_sleeve": { - "pivot": ["#arm_rotation_x_neg", "#arm_rotation_y", "#arm_rotation_z"], - "rotate": [-80, 29, 0], - "visible": false, - "texture": { "u": 40, "v": 32 }, - "cubes": [ - { - "from": [ "#arm_x_neg", 4, "#arm_z"], - "size": [ "#arm_width", "#arm_length", "#arm_depth" ], - "dilate": 0.25 - } - ] - }, - "left_sleeve": { - "pivot": ["#arm_rotation_x", "#arm_rotation_y", "#arm_rotation_z"], - "rotate": [-80, -29, 0], - "visible": false, - "texture": { "u": 48, "v": 48 }, - "cubes": [ - { - "from": [ "#arm_x", 4, "#arm_z"], - "size": [ "#arm_width", "#arm_length", "#arm_depth" ], - "dilate": 0.25 - } - ] + "children": { + "left_pants": {} + } }, "tail": { "implementation": "com.minelittlepony.client.model.part.SeaponyTail", diff --git a/src/main/resources/assets/minelittlepony/models/entity/races/steve/unicorn.json b/src/main/resources/assets/minelittlepony/models/entity/races/steve/unicorn.json index 0a274852..d5a06ccc 100644 --- a/src/main/resources/assets/minelittlepony/models/entity/races/steve/unicorn.json +++ b/src/main/resources/assets/minelittlepony/models/entity/races/steve/unicorn.json @@ -23,6 +23,14 @@ "ear_shortening": "#global_ear_shortening" } }, + "hat": { + "texture": { "u": 32, "v": 0 }, + "dilate": ["#head_elongation", "#head_elongation", 0], + "pivot": [ 0, "#head_pivot_y", 0 ], + "cubes": [ + { "from": [-4, -6, -6], "size": [ 8, 8, 8], "dilate": 0.5 } + ] + }, "horn": { "data": "minelittlepony:components/horn", "implementation": "com.minelittlepony.client.model.part.UnicornHorn" } } }, diff --git a/src/main/resources/assets/minelittlepony/models/entity/races/steve/zebra.json b/src/main/resources/assets/minelittlepony/models/entity/races/steve/zebra.json index c0c73ad8..3036a2f9 100644 --- a/src/main/resources/assets/minelittlepony/models/entity/races/steve/zebra.json +++ b/src/main/resources/assets/minelittlepony/models/entity/races/steve/zebra.json @@ -25,6 +25,14 @@ "ear_shortening": "#global_ear_shortening" } }, + "hat": { + "texture": { "u": 32, "v": 0 }, + "dilate": ["#head_elongation", "#head_elongation", 0], + "pivot": [ 0, "#head_pivot_y", 0 ], + "cubes": [ + { "from": [-4, -6, -6], "size": [ 8, 8, 8], "dilate": 0.5 } + ] + }, "bristles": { "texture": {"u": 56, "v": 32}, "rotate": [17, 0, 0], diff --git a/src/main/resources/assets/minelittlepony/models/entity/steve_pony.json b/src/main/resources/assets/minelittlepony/models/entity/steve_pony.json index ee00fa8f..9be871d6 100644 --- a/src/main/resources/assets/minelittlepony/models/entity/steve_pony.json +++ b/src/main/resources/assets/minelittlepony/models/entity/steve_pony.json @@ -45,17 +45,17 @@ "locals": { "ear_shortening": "#global_ear_shortening" } - } + }, + "hat": { + "texture": { "u": 32, "v": 0 }, + "dilate": ["#head_elongation", "#head_elongation", 0], + "pivot": [ 0, "#head_pivot_y", 0 ], + "cubes": [ + { "from": [-4, -6, -6], "size": [ 8, 8, 8], "dilate": 0.5 } + ] + } } }, - "hat": { - "texture": { "u": 32, "v": 0 }, - "dilate": ["#head_elongation", "#head_elongation", 0], - "pivot": [ 0, "#head_pivot_y", 0 ], - "cubes": [ - { "from": [-4, -6, -6], "size": [ 8, 8, 8], "dilate": 0.5 } - ] - }, "body": { "texture": { "u": 24, "v": 0 }, "cubes": [ @@ -173,7 +173,68 @@ "position": [ -1, 10, 10 ], "size": [ 6, 2 ] } ] - } + }, + "jacket": { + "texture": { "u": 24, "v": 0 }, + "visible": false, + "dilate": 0.25, + "cubes": [ + { "from": [-4, 4, -2], "size": [ 8, 8, 4 ], "texture": { "u": 16, "v": 32 }, "dilate": 0.25 } + ], + "children": { + "left_side": { + "type": "mson:planar", + "__comment": [ + "body sides a", "body sides b", "qt mark a", "qt mark b", + "stomach a", "stomach b", + "back" + ], + "east": [ + [ 4, 4, 2, 8, 4, 12, 32 ], + [ 4, 8, 2, 8, 4, 12, 48 ], + [ 4, 4, 10, 4, 4, 0, 32 ], + [ 4, 8, 10, 4, 4, 0, 48 ] + ], + "down": [ + [ -4, 12, 2, 8, 4, 28, 48 ], + [ -4, 12, 6, 8, 4, 44, 48 ] + ], + "up": [ + [ -4, 4, 2, 8, 12, 32, 36 ] + ] + }, + "right_side": { + "type": "mson:planar", + "__comment": [ + "body sides a", "body sides b", "qt mark a", "qt mark b" + ], + "west": [ + [ -4, 4, 2, 8, 4, 12, 32, true, false ], + [ -4, 8, 2, 8, 4, 12, 48, true, false ], + [ -4, 4, 10, 4, 4, 0, 32, true, false ], + [ -4, 8, 10, 4, 4, 0, 48, true, false ] + ] + }, + "butt": { + "pivot": [8, 8, 0], + "rotate": [0, 0, 90], + "type": "mson:planar", + "south": [ + [ -4, 4, 14, 8, 4, 36, 32 ], + [ -4, 8, 14, 8, 4, 36, 32, false, true ] + ] + }, + "butt_buttom": { + "pivot": [-2, 11.9999, 14], + "rotate": [0, 90, 0], + "type": "mson:planar", + "down": [ + [ 0, 0, 2, 4, 4, 36, 32 ], + [ 0, 0, -2, 4, 4, 36, 32, false, true ] + ] + } + } + } } }, "neck": { @@ -200,67 +261,6 @@ } } }, - "jacket": { - "texture": { "u": 24, "v": 0 }, - "visible": false, - "dilate": 0.25, - "cubes": [ - { "from": [-4, 4, -2], "size": [ 8, 8, 4 ], "texture": { "u": 16, "v": 32 }, "dilate": 0.25 } - ], - "children": { - "left_side": { - "type": "mson:planar", - "__comment": [ - "body sides a", "body sides b", "qt mark a", "qt mark b", - "stomach a", "stomach b", - "back" - ], - "east": [ - [ 4, 4, 2, 8, 4, 12, 32 ], - [ 4, 8, 2, 8, 4, 12, 48 ], - [ 4, 4, 10, 4, 4, 0, 32 ], - [ 4, 8, 10, 4, 4, 0, 48 ] - ], - "down": [ - [ -4, 12, 2, 8, 4, 28, 48 ], - [ -4, 12, 6, 8, 4, 44, 48 ] - ], - "up": [ - [ -4, 4, 2, 8, 12, 32, 36 ] - ] - }, - "right_side": { - "type": "mson:planar", - "__comment": [ - "body sides a", "body sides b", "qt mark a", "qt mark b" - ], - "west": [ - [ -4, 4, 2, 8, 4, 12, 32, true, false ], - [ -4, 8, 2, 8, 4, 12, 48, true, false ], - [ -4, 4, 10, 4, 4, 0, 32, true, false ], - [ -4, 8, 10, 4, 4, 0, 48, true, false ] - ] - }, - "butt": { - "pivot": [8, 8, 0], - "rotate": [0, 0, 90], - "type": "mson:planar", - "south": [ - [ -4, 4, 14, 8, 4, 36, 32 ], - [ -4, 8, 14, 8, 4, 36, 32, false, true ] - ] - }, - "butt_buttom": { - "pivot": [-2, 11.9999, 14], - "rotate": [0, 90, 0], - "type": "mson:planar", - "down": [ - [ 0, 0, 2, 4, 4, 36, 32 ], - [ 0, 0, -2, 4, 4, 36, 32, false, true ] - ] - } - } - }, "tail": { "type": "mson:slot", "name": "tail", @@ -275,7 +275,21 @@ "from": [ "#arm_x_neg", 4, "#arm_z"], "size": [ "#arm_width", "#arm_length", "#arm_depth" ] } - ] + ], + "children": { + "right_sleeve": { + "pivot": ["#arm_rotation_x_neg", "#arm_rotation_y", "#arm_rotation_z"], + "visible": false, + "texture": { "u": 40, "v": 32 }, + "cubes": [ + { + "from": [ "#arm_x_neg", 4, "#arm_z"], + "size": [ "#arm_width", "#arm_length", "#arm_depth" ], + "dilate": 0.25 + } + ] + } + } }, "left_arm": { "pivot": ["#arm_rotation_x", "#arm_rotation_y", "#arm_rotation_z"], @@ -285,7 +299,21 @@ "from": [ "#arm_x", 4, "#arm_z"], "size": [ "#arm_width", "#arm_length", "#arm_depth" ] } - ] + ], + "children": { + "left_sleeve": { + "pivot": ["#arm_rotation_x", "#arm_rotation_y", "#arm_rotation_z"], + "visible": false, + "texture": { "u": 48, "v": 48 }, + "cubes": [ + { + "from": [ "#arm_x", 4, "#arm_z"], + "size": [ "#arm_width", "#arm_length", "#arm_depth" ], + "dilate": 0.25 + } + ] + } + } }, "right_leg": { "pivot": ["#arm_rotation_x_neg", "#arm_rotation_y", 11], @@ -295,7 +323,21 @@ "from": [ "#arm_x_neg", 4, "#arm_z"], "size": [ "#arm_width", "#arm_length", "#arm_depth" ] } - ] + ], + "children": { + "right_pants": { + "pivot": ["#arm_rotation_x_neg", "#arm_rotation_y", 11], + "visible": false, + "texture": { "u": 0, "v": 32 }, + "cubes": [ + { + "from": [ "#arm_x_neg", 4, "#arm_z"], + "size": [ "#arm_width", "#arm_length", "#arm_depth" ], + "dilate": 0.25 + } + ] + } + } }, "left_leg": { "pivot": ["#arm_rotation_x", "#arm_rotation_y", 11], @@ -305,55 +347,21 @@ "from": [ "#arm_x", 4, "#arm_z"], "size": [ "#arm_width", "#arm_length", "#arm_depth" ] } - ] - }, - "right_sleeve": { - "pivot": ["#arm_rotation_x_neg", "#arm_rotation_y", "#arm_rotation_z"], - "visible": false, - "texture": { "u": 40, "v": 32 }, - "cubes": [ - { - "from": [ "#arm_x_neg", 4, "#arm_z"], - "size": [ "#arm_width", "#arm_length", "#arm_depth" ], - "dilate": 0.25 - } - ] - }, - "left_sleeve": { - "pivot": ["#arm_rotation_x", "#arm_rotation_y", "#arm_rotation_z"], - "visible": false, - "texture": { "u": 48, "v": 48 }, - "cubes": [ - { - "from": [ "#arm_x", 4, "#arm_z"], - "size": [ "#arm_width", "#arm_length", "#arm_depth" ], - "dilate": 0.25 - } - ] - }, - "right_pants": { - "pivot": ["#arm_rotation_x_neg", "#arm_rotation_y", 11], - "visible": false, - "texture": { "u": 0, "v": 32 }, - "cubes": [ - { - "from": [ "#arm_x_neg", 4, "#arm_z"], - "size": [ "#arm_width", "#arm_length", "#arm_depth" ], - "dilate": 0.25 - } - ] - }, - "left_pants": { - "pivot": ["#arm_rotation_x_neg", "#arm_rotation_y", 11], - "visible": false, - "texture": { "u": 0, "v": 48 }, - "cubes": [ - { - "from": [ "#arm_x", 4, "#arm_z"], - "size": [ "#arm_width", "#arm_length", "#arm_depth" ], - "dilate": 0.25 - } - ] + ], + "children": { + "left_pants": { + "pivot": ["#arm_rotation_x_neg", "#arm_rotation_y", 11], + "visible": false, + "texture": { "u": 0, "v": 48 }, + "cubes": [ + { + "from": [ "#arm_x", 4, "#arm_z"], + "size": [ "#arm_width", "#arm_length", "#arm_depth" ], + "dilate": 0.25 + } + ] + } + } } } } diff --git a/src/main/resources/assets/minelittlepony/models/entity/strider.json b/src/main/resources/assets/minelittlepony/models/entity/strider.json index 118ae182..a80f5ac5 100644 --- a/src/main/resources/assets/minelittlepony/models/entity/strider.json +++ b/src/main/resources/assets/minelittlepony/models/entity/strider.json @@ -10,6 +10,12 @@ { "from": [-2, -3, -4.5], "size": [ 4, 2, 2], "texture": { "v": 12 } } ], "children": { + "hat": { + "texture": { "u": 24, "v": 0 }, + "cubes": [ + { "from": [-3, -7, -3], "size": [ 6, 6, 6], "dilate": [0.5, 0.5, 0.5] } + ] + }, "left_ear": { "texture": { "u": 18 }, "pivot": [2.5, -4, 0], @@ -58,12 +64,6 @@ } } }, - "hat": { - "texture": { "u": 24, "v": 0 }, - "cubes": [ - { "from": [-3, -7, -3], "size": [ 6, 6, 6], "dilate": [0.5, 0.5, 0.5] } - ] - }, "body": { "cubes": [ { "from": [-2, -1, -2], "size": [ 4, 2, 3], "texture": { "v": 21 } }, @@ -71,6 +71,9 @@ { "from": [-4, 5, -3], "size": [ 8, 8, 8], "texture": { "v": 35 } } ], "children": { + "jacket": { + "visible": false + }, "spines": { "texture": { "u": 8, "v": 12 }, "pivot": [-1, 0, 0], @@ -135,7 +138,12 @@ "cubes": [ { "from": [-1, -2, -2], "size": [ 3, 3, 3], "texture": { "v": 12 }, "dilate": -0.25 }, { "from": [-0.5, 0.75, -1.5], "size": [ 2, 6, 2], "texture": { "v": 18 } } - ] + ], + "children": { + "right_sleeve": { + "visible": false + } + } }, "left_arm": { "pivot": [5, 3, 0], @@ -144,7 +152,12 @@ "cubes": [ { "from": [-2, -2, -2], "size": [ 3, 3, 3], "texture": { "v": 12 }, "dilate": -0.25 }, { "from": [-1.5, 0.75, -1.5], "size": [ 2, 6, 2], "texture": { "v": 18 } } - ] + ], + "children": { + "left_sleeve": { + "visible": false + } + } }, "right_leg": { "pivot": [-1.9, 3, 0], @@ -152,7 +165,12 @@ "cubes": [ { "from": [-2, 0, -2], "size": [ 3, 4, 3], "texture": { "v": 28 } }, { "from": [-2, 4, -3], "size": [ 3, 1, 4], "texture": { "v": 35 } } - ] + ], + "children": { + "right_pants": { + "visible": false + } + } }, "left_leg": { "pivot": [1.9, 3, 0], @@ -161,7 +179,12 @@ "cubes": [ { "from": [-1, 0, -2], "size": [ 3, 4, 3 ], "texture": { "v": 28 } }, { "from": [-1, 4, -3], "size": [ 3, 1, 4], "texture": { "v": 35 } } - ] + ], + "children": { + "left_pants": { + "visible": false + } + } } } } diff --git a/src/main/resources/assets/minelittlepony/models/entity/vex.json b/src/main/resources/assets/minelittlepony/models/entity/vex.json index 5c79f082..a7eb2ba6 100644 --- a/src/main/resources/assets/minelittlepony/models/entity/vex.json +++ b/src/main/resources/assets/minelittlepony/models/entity/vex.json @@ -8,7 +8,7 @@ {"from": [-4, -4, -4], "size": [8, 5, 8] } ], "children": { - "lips": { + "lips": { "pivot": [0, 0, 4], "rotate": [0, 0, 0], "cubes": [ diff --git a/src/main/resources/assets/minelittlepony/models/entity/villager.json b/src/main/resources/assets/minelittlepony/models/entity/villager.json index fdcf5bf7..30d0e498 100644 --- a/src/main/resources/assets/minelittlepony/models/entity/villager.json +++ b/src/main/resources/assets/minelittlepony/models/entity/villager.json @@ -23,6 +23,14 @@ "ear_shortening": "#global_ear_shortening" } }, + "hat": { + "texture": { "u": 32, "v": 0 }, + "dilate": ["#head_elongation", "#head_elongation", 0], + "pivot": [ 0, "#head_pivot_y", 0 ], + "cubes": [ + { "from": [-4, -6, -6], "size": [ 8, 8, 8], "dilate": 0.5 } + ] + }, "bat_ears": { "type": "mson:slot", "name": "bat_ears",