Skip to content

Commit

Permalink
Disable injection for now as it causes crash
Browse files Browse the repository at this point in the history
  • Loading branch information
lowercasebtw committed Dec 15, 2024
1 parent a914fcb commit 4b66b03
Showing 1 changed file with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,16 +61,16 @@ protected MixinFishingBobberEntityRenderer(EntityRendererFactory.Context ctx) {
return original + (AnimatiumConfig.oldFishingRodLinePositionThirdPerson ? 0.05 : 0.0);
}

@WrapOperation(method = "getArmHoldingRod", at = @At(value = "CONSTANT", args = "classValue=net/minecraft/item/FishingRodItem"))
private static boolean animatium$fixCastLineCheck(Object object, Operation<Boolean> original) {
boolean value = original.call(object);
if (AnimatiumConfig.fixCastLineCheck) {
MinecraftClient client = MinecraftClient.getInstance();
assert client.player != null;
value = value && !(client.player.getOffHandStack().getItem() instanceof FishingRodItem);
}
return value;
}
// @WrapOperation(method = "getArmHoldingRod", at = @At(value = "CONSTANT", args = "classValue=net/minecraft/item/FishingRodItem"))
// private static boolean animatium$fixCastLineCheck(Object object, Operation<Boolean> original) {
// boolean value = original.call(object);
// if (AnimatiumConfig.fixCastLineCheck) {
// MinecraftClient client = MinecraftClient.getInstance();
// assert client.player != null;
// value = value && !(client.player.getOffHandStack().getItem() instanceof FishingRodItem);
// }
// return value;
// }

@ModifyArg(method = "updateRenderState(Lnet/minecraft/entity/projectile/FishingBobberEntity;Lnet/minecraft/client/render/entity/state/FishingBobberEntityState;F)V", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/render/entity/FishingBobberEntityRenderer;getHandPos(Lnet/minecraft/entity/player/PlayerEntity;FF)Lnet/minecraft/util/math/Vec3d;"), index = 1)
private float animatium$fixCastLineSwing(float f) {
Expand Down

0 comments on commit 4b66b03

Please sign in to comment.