aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/dulkirmod/mixins
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/dulkirmod/mixins')
-rw-r--r--src/main/java/dulkirmod/mixins/ItemRendererMixin.java6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/main/java/dulkirmod/mixins/ItemRendererMixin.java b/src/main/java/dulkirmod/mixins/ItemRendererMixin.java
index 9db5c9d..54b4d45 100644
--- a/src/main/java/dulkirmod/mixins/ItemRendererMixin.java
+++ b/src/main/java/dulkirmod/mixins/ItemRendererMixin.java
@@ -1,6 +1,7 @@
package dulkirmod.mixins;
import dulkirmod.features.ItemAnimations;
+import net.minecraft.client.entity.AbstractClientPlayer;
import net.minecraft.client.renderer.ItemRenderer;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
@@ -19,4 +20,9 @@ public class ItemRendererMixin {
public void useTransform(float swingProgress, CallbackInfo ci){
if (ItemAnimations.INSTANCE.scaledSwing(swingProgress)) ci.cancel();
}
+
+ @Inject(method ={"performDrinking"}, at = @At("HEAD"), cancellable = true)
+ public void drinkTransform(AbstractClientPlayer clientPlayer, float partialTicks, CallbackInfo ci) {
+ if (ItemAnimations.INSTANCE.rotationlessDrink(clientPlayer, partialTicks)) ci.cancel();
+ }
}