aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/dulkirmod/mixins/MixinItemRenderer.java
diff options
context:
space:
mode:
authorIlmarsXd <ilmars500@gmail.com>2023-03-21 17:37:12 +0200
committerIlmarsXd <ilmars500@gmail.com>2023-03-21 17:37:12 +0200
commit623f260e2f1d586336fca13dc86bf2ffb0c6565c (patch)
treed54f367541619b80ae1863f5acb3d9f09de7bada /src/main/java/dulkirmod/mixins/MixinItemRenderer.java
parente7723d5ff52da94eb65992b5bdd9c5bb316d5959 (diff)
downloadDulkirMod-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.java11
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();