@@ -94,7 +94,7 @@ private enum SpecialMode
9494
9595 // Ignored items
9696 private final CheckboxSetting useIgnoredItems = new CheckboxSetting (
97- "Use ignored items" ,
97+ "Toggle ignoring items" ,
9898 "When enabled, items from the ignored list will not be highlighted." ,
9999 false );
100100 private final ItemListSetting ignoredList = new ItemListSetting (
@@ -198,6 +198,27 @@ protected void onDisable()
198198 foundCount = 0 ;
199199 }
200200
201+ // Expose ignored-items configuration for other features (like ItemHandler)
202+ public boolean shouldUseIgnoredItems ()
203+ {
204+ return useIgnoredItems .isChecked ();
205+ }
206+
207+ public ItemListSetting getIgnoredListSetting ()
208+ {
209+ return ignoredList ;
210+ }
211+
212+ public boolean isIgnoredId (String id )
213+ {
214+ if (id == null )
215+ return false ;
216+ for (String s : ignoredList .getItemNames ())
217+ if (id .equalsIgnoreCase (s .trim ()))
218+ return true ;
219+ return false ;
220+ }
221+
201222 @ Override
202223 public void onUpdate ()
203224 {
@@ -284,6 +305,9 @@ public void onRender(PoseStack matrixStack, float partialTicks)
284305 ArrayList <AABB > specialBoxes = new ArrayList <>();
285306 ArrayList <Vec3 > normalEnds = new ArrayList <>();
286307 ArrayList <Vec3 > specialEnds = new ArrayList <>();
308+ // traced items from ItemHandler: override and rainbow-highlight
309+ ArrayList <AABB > tracedBoxes = new ArrayList <>();
310+ ArrayList <Vec3 > tracedEnds = new ArrayList <>();
287311
288312 double extraSize = boxSize .getExtraSize () / 2 ;
289313 int visibleDrops = 0 ;
@@ -300,17 +324,29 @@ public void onRender(PoseStack matrixStack, float partialTicks)
300324 AABB box = EntityUtils .getLerpedBox (e , partialTicks )
301325 .move (0 , extraSize , 0 ).inflate (extraSize );
302326 boolean isSpecial = isSpecial (stack );
327+ // check traced override from ItemHandlerHack
328+ String id =
329+ BuiltInRegistries .ITEM .getKey (stack .getItem ()).toString ();
330+ net .wurstclient .hacks .itemhandler .ItemHandlerHack ih =
331+ net .wurstclient .WurstClient .INSTANCE .getHax ().itemHandlerHack ;
332+ boolean isTraced = ih != null && ih .isTraced (id );
303333 visibleDrops ++;
304- if (isSpecial )
334+ if (isTraced )
335+ {
336+ tracedBoxes .add (box );
337+ tracedEnds
338+ .add (EntityUtils .getLerpedBox (e , partialTicks ).getCenter ());
339+ }else if (isSpecial )
340+ {
305341 specialBoxes .add (box );
306- else
342+ specialEnds
343+ .add (EntityUtils .getLerpedBox (e , partialTicks ).getCenter ());
344+ }else
345+ {
307346 normalBoxes .add (box );
308-
309- Vec3 center = EntityUtils .getLerpedBox (e , partialTicks ).getCenter ();
310- if (isSpecial )
311- specialEnds .add (center );
312- else
313- normalEnds .add (center );
347+ normalEnds
348+ .add (EntityUtils .getLerpedBox (e , partialTicks ).getCenter ());
349+ }
314350 }
315351 foundCount = Math .min (visibleDrops , 999 );
316352
@@ -436,6 +472,18 @@ && isSpecial(head))
436472 specialLines , false );
437473 }
438474 }
475+
476+ // Traced items: always rainbow-highlight (override)
477+ if (!tracedBoxes .isEmpty ())
478+ {
479+ float [] rf = RenderUtils .getRainbowColor ();
480+ int tracedLines = RenderUtils .toIntColor (rf , 0x80 / 255f );
481+ int tracedQuads = RenderUtils .toIntColor (rf , 0.4f );
482+ RenderUtils .drawSolidBoxes (matrixStack , tracedBoxes ,
483+ tracedQuads , false );
484+ RenderUtils .drawOutlinedBoxes (matrixStack , tracedBoxes ,
485+ tracedLines , false );
486+ }
439487 }
440488
441489 if (style .hasLines ())
@@ -446,6 +494,14 @@ && isSpecial(head))
446494 if (!specialEnds .isEmpty ())
447495 RenderUtils .drawTracers (matrixStack , partialTicks , specialEnds ,
448496 specialLines , false );
497+ // draw traced lines last with rainbow color
498+ if (!tracedEnds .isEmpty ())
499+ {
500+ float [] rf = RenderUtils .getRainbowColor ();
501+ int tracedLines = RenderUtils .toIntColor (rf , 0x80 / 255f );
502+ RenderUtils .drawTracers (matrixStack , partialTicks , tracedEnds ,
503+ tracedLines , false );
504+ }
449505 }
450506 }
451507
0 commit comments