diff options
author | IlmarsXd <ilmars500@gmail.com> | 2023-03-21 17:37:12 +0200 |
---|---|---|
committer | IlmarsXd <ilmars500@gmail.com> | 2023-03-21 17:37:12 +0200 |
commit | 623f260e2f1d586336fca13dc86bf2ffb0c6565c (patch) | |
tree | d54f367541619b80ae1863f5acb3d9f09de7bada /src/main/java/dulkirmod/mixins/MixinItemRenderer.java | |
parent | e7723d5ff52da94eb65992b5bdd9c5bb316d5959 (diff) | |
download | DulkirMod-623f260e2f1d586336fca13dc86bf2ffb0c6565c.tar.gz DulkirMod-623f260e2f1d586336fca13dc86bf2ffb0c6565c.tar.bz2 DulkirMod-623f260e2f1d586336fca13dc86bf2ffb0c6565c.zip |
refactor modules
Diffstat (limited to 'src/main/java/dulkirmod/mixins/MixinItemRenderer.java')
-rw-r--r-- | src/main/java/dulkirmod/mixins/MixinItemRenderer.java | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/main/java/dulkirmod/mixins/MixinItemRenderer.java b/src/main/java/dulkirmod/mixins/MixinItemRenderer.java index 3620817..51742b2 100644 --- a/src/main/java/dulkirmod/mixins/MixinItemRenderer.java +++ b/src/main/java/dulkirmod/mixins/MixinItemRenderer.java @@ -15,9 +15,12 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; @Mixin(value = {ItemRenderer.class}, priority = 1010) public class MixinItemRenderer { - @Shadow @Final private RenderItem itemRenderer; + @Shadow + @Final + private RenderItem itemRenderer; - @Shadow private ItemStack itemToRender; + @Shadow + private ItemStack itemToRender; @Inject(method = "transformFirstPersonItem(FF)V", at = @At("HEAD"), cancellable = true) public void itemTransform(float equipProgress, float swingProgress, CallbackInfo ci) { @@ -25,11 +28,11 @@ public class MixinItemRenderer { } @Inject(method = "doItemUsedTransformations", at = @At("HEAD"), cancellable = true) - public void useTransform(float swingProgress, CallbackInfo ci){ + public void useTransform(float swingProgress, CallbackInfo ci) { if (ItemAnimations.INSTANCE.scaledSwing(swingProgress)) ci.cancel(); } - @Inject(method ="performDrinking", at = @At("HEAD"), cancellable = true) + @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(); if (ItemAnimations.INSTANCE.scaledDrinking(clientPlayer, partialTicks, itemToRender)) ci.cancel(); |