General cleanup.

This commit is contained in:
Brianna 2020-03-25 14:33:03 -04:00
parent e310506402
commit c58282cc27
2 changed files with 3 additions and 6 deletions

View File

@ -31,11 +31,8 @@ public enum CompatibleHand {
methodCache.put(className, method);
}
EquipmentSlot slot = (EquipmentSlot) method.invoke(event);
if (slot == EquipmentSlot.OFF_HAND)
return OFF_HAND;
} catch (NoSuchMethodException | IllegalAccessException | InvocationTargetException e) {
return MAIN_HAND;
}
if (slot == EquipmentSlot.OFF_HAND) return OFF_HAND;
} catch (NoSuchMethodException | IllegalAccessException | InvocationTargetException ignored) {}
return MAIN_HAND;
}

View File

@ -19,7 +19,7 @@ public class RotationUtils {
}
public static BlockFace yawToFace(float face) {
switch ((int) Math.round((face + 360) / 90) * 90) {
switch (Math.round((face + 360) / 90) * 90) {
case 0:
case 360:
return BlockFace.SOUTH;