diff --git a/src/main/java/com/github/nyuppo/config/Variants.java b/src/main/java/com/github/nyuppo/config/Variants.java index 6472bdd..802b513 100644 --- a/src/main/java/com/github/nyuppo/config/Variants.java +++ b/src/main/java/com/github/nyuppo/config/Variants.java @@ -74,6 +74,11 @@ public static MobVariant getDefaultVariant(EntityType mob) { return variant; } } + + if (mob == EntityType.CAT) { + return new MobVariant(new Identifier("tabby"), 1); + } + return new MobVariant(MoreMobVariants.id("default"), 1); } diff --git a/src/main/java/com/github/nyuppo/mixin/CatVariantsMixin.java b/src/main/java/com/github/nyuppo/mixin/CatVariantsMixin.java index b7c6412..a6cdad3 100644 --- a/src/main/java/com/github/nyuppo/mixin/CatVariantsMixin.java +++ b/src/main/java/com/github/nyuppo/mixin/CatVariantsMixin.java @@ -29,7 +29,7 @@ @Mixin(CatEntity.class) public class CatVariantsMixin extends MobEntityVariantsMixin { - private MobVariant variant = getDefaultVariant(); + private MobVariant variant = Variants.getDefaultVariant(EntityType.CAT); @Override protected void onWriteCustomDataToNbt(NbtCompound nbt, CallbackInfo ci) { @@ -91,10 +91,6 @@ private void onCreateChild(ServerWorld world, PassiveEntity entity, CallbackInfo childNbt.putString(MoreMobVariants.NBT_KEY, variant.getIdentifier().toString()); child.readCustomDataFromNbt(childNbt); } - - private MobVariant getDefaultVariant() { - return new MobVariant(new Identifier("tabby"), 1); - } }