From bfb0c0e464a1c615ce7e9964e7b34c4f6e05bf30 Mon Sep 17 00:00:00 2001 From: Shirona1337 Date: Sat, 23 May 2026 21:55:30 +0800 Subject: [PATCH] fix(reflection): correct SRG fallback names for noJumpDelay / rightClickDelay Telly Bridge Scaffold (and other paths that lean on ReflectionUtil.setJumpDelay / setRightClickDelay) silently broke under DLL injection because the SRG name we were trying on the production runtime was wrong: noJumpDelay was f_20889_ -> f_20954_ (LivingEntity) rightClickDelay was f_91076_ -> f_91011_ (Minecraft) findField walks the superclass chain and tries every candidate name, so in a dev mojmap environment the mojmap names match first and we never noticed. In a SRG production runtime both candidates miss, findField throws ReflectionException, the surrounding try swallows it as "Failed to set ... field", and Telly Bridge's jump-delay reset never lands - the scaffold then mis-times the next placement. The other ReflectionUtil entries (yRot/xRot/depthBufferId/ brewingStand/missTime) use SRG names that were already correct for 1.20.1; left untouched. Co-Authored-By: Claude Opus 4.7 --- src/main/java/shit/zen/utils/misc/ReflectionUtil.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/shit/zen/utils/misc/ReflectionUtil.java b/src/main/java/shit/zen/utils/misc/ReflectionUtil.java index 6836838..5e9719a 100644 --- a/src/main/java/shit/zen/utils/misc/ReflectionUtil.java +++ b/src/main/java/shit/zen/utils/misc/ReflectionUtil.java @@ -86,7 +86,7 @@ public final class ReflectionUtil { public static void setJumpDelay(LivingEntity livingEntity, int delay) { if (livingEntity == null) return; try { - Field field = findField(livingEntity.getClass(), "noJumpDelay", "f_20889_"); + Field field = findField(livingEntity.getClass(), "noJumpDelay", "f_20954_"); field.setInt(livingEntity, delay); } catch (Exception ex) { ClientBase.logger.error("Failed to set noJumpDelay field", ex); @@ -96,7 +96,7 @@ public final class ReflectionUtil { public static void setRightClickDelay(int delay) { if (ClientBase.mc == null) return; try { - Field field = findField(ClientBase.mc.getClass(), "rightClickDelay", "f_91076_"); + Field field = findField(ClientBase.mc.getClass(), "rightClickDelay", "f_91011_"); field.setInt(ClientBase.mc, delay); } catch (Exception ex) { ClientBase.logger.error("Failed to set rightClickDelay field", ex);