if (nearestVisibleWantedItem.isPresent() && nearestVisibleWantedItem.get().closerThan(body, maxDistanceToItem)) {
21
return false;
22
}
23
24
admiring.erase();
25
return true;
26
})
27
);
28
}
29
}
30
Decompiled Minecraft 26.3 source of StopAdmiringIfItemTooFarAway (net/minecraft/world/entity/monster/piglin/StopAdmiringIfItemTooFarAway.java) with Mojang official mappings, stored verbatim on the site.