From c5e38f9830c8005ffc726f512d15d8e502bb79af Mon Sep 17 00:00:00 2001 From: AViewFromTheTop <87103914+AViewFromTheTop@users.noreply.github.com> Date: Sat, 19 Oct 2024 17:44:46 -0400 Subject: [PATCH] fix smooth brushing --- .../client/brush/ItemInHandLayerMixin.java | 41 +++++++++++-------- 1 file changed, 23 insertions(+), 18 deletions(-) diff --git a/src/main/java/net/frozenblock/trailiertales/mixin/client/brush/ItemInHandLayerMixin.java b/src/main/java/net/frozenblock/trailiertales/mixin/client/brush/ItemInHandLayerMixin.java index c65c3cb0..426c27ac 100644 --- a/src/main/java/net/frozenblock/trailiertales/mixin/client/brush/ItemInHandLayerMixin.java +++ b/src/main/java/net/frozenblock/trailiertales/mixin/client/brush/ItemInHandLayerMixin.java @@ -11,11 +11,12 @@ import net.minecraft.client.model.EntityModel; import net.minecraft.client.renderer.MultiBufferSource; import net.minecraft.client.renderer.entity.layers.ItemInHandLayer; +import net.minecraft.client.renderer.entity.state.HumanoidRenderState; import net.minecraft.client.renderer.entity.state.LivingEntityRenderState; import net.minecraft.client.resources.model.BakedModel; import net.minecraft.util.Mth; +import net.minecraft.world.InteractionHand; import net.minecraft.world.entity.HumanoidArm; -import net.minecraft.world.entity.LivingEntity; import net.minecraft.world.item.ItemDisplayContext; import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.Items; @@ -28,8 +29,7 @@ @Environment(EnvType.CLIENT) @Mixin(ItemInHandLayer.class) public class ItemInHandLayerMixin & ArmedModel> { - // TODO: reimplement smooth brush animation -/* + @Inject( method = "renderArmWithItem", at = @At( @@ -39,32 +39,37 @@ public class ItemInHandLayerMixin