GenuineSounds icon

Untitled

GenuineSounds | PRO | 03/04/15 05:18:11 PM UTC | 0 ⭐ | 706 👁️ | Never ⏰ | []
Java |

450 B

|

None

|

0 👍

/

0 👎

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;
    }
};

Comments

  •  icon
    01/01/70 12:00:00 AM UTC
    Plain Text |

    0 B

    |

    👍

    /

    👎