Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static Comparator<CaptionWorld> DISTANCE = new Comparator<CaptionWorld>() {
- @Override
- public int compare(final CaptionWorld o1, final CaptionWorld o2) {
- if (Minecraft.getMinecraft().thePlayer == null)
- return 0;
- final double d1 = o1.getDistanceTo(Minecraft.getMinecraft().thePlayer);
- final double d2 = o2.getDistanceTo(Minecraft.getMinecraft().thePlayer);
- if (d1 < d2)
- return 1;
- if (d1 > d2)
- return -1;
- return 0;
- }
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement