Skip to content

Commit

Permalink
Fix first person outer layers
Browse files Browse the repository at this point in the history
  • Loading branch information
js6pak committed Apr 2, 2022
1 parent a90bc2f commit ad6321c
Showing 1 changed file with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@
import net.minecraft.client.render.entity.model.EntityModel;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Shadow;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
import pl.js6pak.mojangfix.mixinterface.PlayerEntityRendererAccessor;
import pl.js6pak.mojangfix.client.skinfix.PlayerEntityModel;

Expand All @@ -34,7 +37,11 @@ public PlayerEntityRendererMixin(EntityModel arg, float f) {
}

public void setThinArms(boolean thinArms) {
this.model = new PlayerEntityModel(0.0F, thinArms);
this.bipedModel = (BipedEntityModel) this.model;
this.model = this.bipedModel = new PlayerEntityModel(0.0F, thinArms);
}

@Inject(method = "renderHand", at = @At("RETURN"))
private void fixFirstPerson(CallbackInfo ci) {
((PlayerEntityModel) bipedModel).rightSleeve.render(0.0625F);
}
}

0 comments on commit ad6321c

Please sign in to comment.