Skip to content

Commit

Permalink
Whoops! Fix UsingItemProperty mixin
Browse files Browse the repository at this point in the history
  • Loading branch information
lowercasebtw committed Dec 18, 2024
1 parent 3c63aa1 commit cfb4d72
Showing 1 changed file with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@

@Mixin(UsingItemProperty.class)
public abstract class MixinUsingItemProperty {
// @ModifyReturnValue(method = "getValue", at = @At(value = "RETURN"))
// private boolean animatium$getValue(boolean original, @Local(argsOnly = true) ItemStack stack, @Local(argsOnly = true) ModelTransformationMode modelTransformationMode) {
// if (AnimatiumConfig.getInstance().disableItemUsingTextureInGui &&
// (stack.getItem() instanceof BowItem || stack.getItem() instanceof CrossbowItem) &&
// modelTransformationMode == ModelTransformationMode.GUI) {
// return false;
// } else {
// return original;
// }
// }
@ModifyReturnValue(method = "getValue", at = @At(value = "RETURN"))
private boolean animatium$getValue(boolean original, @Local(argsOnly = true) ItemStack stack, @Local(argsOnly = true) ModelTransformationMode modelTransformationMode) {
if (AnimatiumConfig.getInstance().disableItemUsingTextureInGui &&
(stack.getItem() instanceof BowItem || stack.getItem() instanceof CrossbowItem) &&
modelTransformationMode == ModelTransformationMode.GUI) {
return false;
} else {
return original;
}
}
}

0 comments on commit cfb4d72

Please sign in to comment.