Trap / Obsidian Box ESP Highlighter

Trap_ESP Render / ESP HIGH +8 score

🎮 Minecraft Gameplay Impact

In Minecraft, the rendering pipeline relies on OpenGL Z-buffer depth testing to occlude geometry located behind solid blocks. When depth testing is enabled, pixels located behind closer blocks are discarded during rendering.

Trap_ESP detects modifications that hook into Fabric's world rendering pipeline (WorldRenderEvents.AFTER_ENTITIES) while configuring custom render layers with depth testing disabled (depthTest(false) / method_23617(false)). In the Antitrap mod (ru.antitrap.TrapRenderer), the class registers a listener on WorldRenderEvents.AFTER_ENTITIES. It scans surrounding blocks within a 35-block spherical radius for specific trap configurations (such as anchor or trap blocks and armor stands). Found positions are stored and rendered using HIGHLIGHT_LAYER, which disables depth testing via .method_23617(false).

Disabling depth testing causes the bounding box highlights to render directly over solid walls and terrain, giving the player an unfair wallhack view of hidden traps, base structures, or enemy placements through obstacles.

🔍 Functions & APIs Analyzed

WorldRenderEvents.AFTER_ENTITIES

Fabric API world rendering event hook called after standard entity rendering completes.

RenderPhase.depthTest / method_23617

Configures OpenGL depth testing; passing false disables depth testing to render geometry through solid blocks.

⚙️ Decompiled Representation (Vineflower View)

private static final class_1921 HIGHLIGHT_LAYER = class_1921.method_24049(
   "antitrap_highlight",
   class_290.field_1576,
   class_5596.field_27382,
   786432,
   false,
   true,
   class_4688.method_23598()
      .method_34578(class_4668.field_29442)
      .method_23615(class_4668.field_21370)
      .method_23604(class_4668.field_21346)
      .method_23603(class_4668.field_21345)
      .method_23616(class_4668.field_21350)
      .method_23617(false)
);

public static void register() {
   WorldRenderEvents.AFTER_ENTITIES.register((AfterEntities)ctx -> {
      class_310 client = class_310.method_1551();
      if (client.field_1724 != null) {
         class_638 world = client.field_1687;
         if (world != null) {
            if (!client.method_1493()) {
               class_2338 center = class_2338.method_49638(ctx.camera().method_19326());
               ticks++;
               if (ticks >= 10 || !center.equals(lastCenter)) {
                  scan(world, center);
                  ticks = 0;
                  lastCenter = center;
               }

               if (!traps.isEmpty()) {
                  render(ctx, ctx.camera().method_19326());
               }
            }
         }
      }
   });
}

🛡️ Bytecode Signature & Static Detection

The detector inspects class constant pool references and bytecode invocations, requiring two concurrent facts within the class:

  • A field reference to Fabric rendering lifecycle events: net/fabricmc/fabric/api/client/rendering/v1/WorldRenderEvents.AFTER_ENTITIES (or field name AFTER_ENTITIES).
  • An invocation to OpenGL depth testing toggles: RenderPhase.depthTest (Intermediary class_4668.method_23617).

The detector operates at class scope. If the event subscription in WorldRenderEvents and the RenderLayer construction or depth test configuration are decoupled into separate classes without mutual references, this rule will not trigger without multi-class tracking.