Skip to content

Commit

Permalink
fixes to parrot renderer, fix to mob notification over hotbar, 1.0.3
Browse files Browse the repository at this point in the history
  • Loading branch information
Draylar committed Jun 26, 2020
1 parent b780eba commit fba3c8f
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 3 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
plugins {
id 'fabric-loom' version '0.4.29'
id 'fabric-loom' version '0.4-SNAPSHOT'
id 'maven-publish'
}

Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
7 changes: 7 additions & 0 deletions src/main/java/draylar/identity/api/model/EntityUpdaters.java
Original file line number Diff line number Diff line change
@@ -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;
Expand Down Expand Up @@ -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();
}
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
);
}
Expand Down
11 changes: 11 additions & 0 deletions src/main/java/draylar/identity/mixin/ParrotEntityAccessor.java
Original file line number Diff line number Diff line change
@@ -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();
}
1 change: 1 addition & 0 deletions src/main/resources/identity.mixins.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"EntityTypeTagsAccessor",
"LivingEntityAccessor",
"LivingEntityMixin",
"ParrotEntityAccessor",
"PlayerEntityMixin",
"ServerPlayerEntityMixin",
"ServerPlayerInteractionManagerMixin"
Expand Down

0 comments on commit fba3c8f

Please sign in to comment.