diff --git a/build.gradle b/build.gradle index 332e7a0..4421f64 100644 --- a/build.gradle +++ b/build.gradle @@ -1,5 +1,5 @@ plugins { - id 'fabric-loom' version '0.4.29' + id 'fabric-loom' version '0.4-SNAPSHOT' id 'maven-publish' } diff --git a/gradle.properties b/gradle.properties index 9d6fec0..240da49 100644 --- a/gradle.properties +++ b/gradle.properties @@ -8,7 +8,7 @@ yarn_mappings=1.16+build.1 loader_version=0.8.8+build.202 # Mod Properties -mod_version=1.0.2 +mod_version=1.0.3 maven_group=draylar archives_base_name=identity diff --git a/src/main/java/draylar/identity/api/model/EntityUpdaters.java b/src/main/java/draylar/identity/api/model/EntityUpdaters.java index 1a443a6..6bce404 100644 --- a/src/main/java/draylar/identity/api/model/EntityUpdaters.java +++ b/src/main/java/draylar/identity/api/model/EntityUpdaters.java @@ -1,6 +1,7 @@ package draylar.identity.api.model; import draylar.identity.impl.NearbySongAccessor; +import draylar.identity.mixin.ParrotEntityAccessor; import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; import net.minecraft.client.render.VertexConsumerProvider; @@ -71,10 +72,16 @@ public static void init() { parrot.setNearbySongPlaying(player.getBlockPos(), false); parrot.setSitting(true); parrot.setOnGround(true); + parrot.prevFlapProgress = 0; + parrot.flapProgress = 0; + parrot.maxWingDeviation = 0; + parrot.prevMaxWingDeviation = 0; } else { parrot.setNearbySongPlaying(player.getBlockPos(), false); parrot.setSitting(false); parrot.setOnGround(false); + parrot.setInSittingPose(false); + ((ParrotEntityAccessor) parrot).callFlapWings(); } }); diff --git a/src/main/java/draylar/identity/mixin/LivingEntityMixin.java b/src/main/java/draylar/identity/mixin/LivingEntityMixin.java index a99198e..25c2f79 100644 --- a/src/main/java/draylar/identity/mixin/LivingEntityMixin.java +++ b/src/main/java/draylar/identity/mixin/LivingEntityMixin.java @@ -54,7 +54,7 @@ private void onDeath(DamageSource source, CallbackInfo ci) { ((PlayerEntity) attacker).sendMessage( new TranslatableText( "identity.unlock_entity", - new TranslatableText(thisType.getTranslationKey()).asString() + new TranslatableText(thisType.getTranslationKey()) ), true ); } diff --git a/src/main/java/draylar/identity/mixin/ParrotEntityAccessor.java b/src/main/java/draylar/identity/mixin/ParrotEntityAccessor.java new file mode 100644 index 0000000..29168dc --- /dev/null +++ b/src/main/java/draylar/identity/mixin/ParrotEntityAccessor.java @@ -0,0 +1,11 @@ +package draylar.identity.mixin; + +import net.minecraft.entity.passive.ParrotEntity; +import org.spongepowered.asm.mixin.Mixin; +import org.spongepowered.asm.mixin.gen.Invoker; + +@Mixin(ParrotEntity.class) +public interface ParrotEntityAccessor { + @Invoker + void callFlapWings(); +} diff --git a/src/main/resources/identity.mixins.json b/src/main/resources/identity.mixins.json index 36bd474..002006f 100644 --- a/src/main/resources/identity.mixins.json +++ b/src/main/resources/identity.mixins.json @@ -7,6 +7,7 @@ "EntityTypeTagsAccessor", "LivingEntityAccessor", "LivingEntityMixin", + "ParrotEntityAccessor", "PlayerEntityMixin", "ServerPlayerEntityMixin", "ServerPlayerInteractionManagerMixin"