From 4e4058da31c3575b69c69d2d7bb3c9af29e248dc Mon Sep 17 00:00:00 2001 From: ThatGravyBoat Date: Thu, 15 Jul 2021 04:07:36 +0000 Subject: Prettified Code! --- .../skyblockhud/api/sbentities/EntityTypeHelper.java | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'src/main/java/com/thatgravyboat/skyblockhud/api/sbentities') diff --git a/src/main/java/com/thatgravyboat/skyblockhud/api/sbentities/EntityTypeHelper.java b/src/main/java/com/thatgravyboat/skyblockhud/api/sbentities/EntityTypeHelper.java index 8dc63c8..bb14e5d 100644 --- a/src/main/java/com/thatgravyboat/skyblockhud/api/sbentities/EntityTypeHelper.java +++ b/src/main/java/com/thatgravyboat/skyblockhud/api/sbentities/EntityTypeHelper.java @@ -21,17 +21,14 @@ public class EntityTypeHelper { return false; } - public static boolean isCrypt(Entity entity){ + public static boolean isCrypt(Entity entity) { if (entity instanceof EntityZombie) { EntityZombie zombie = ((EntityZombie) entity); double maxHealthBase = zombie.getAttributeMap().getAttributeInstanceByName("generic.maxHealth").getBaseValue(); if (maxHealthBase != 2000d) return false; - if (zombie.getEquipmentInSlot(0) == null || !zombie.getEquipmentInSlot(0).getItem().equals(Items.iron_sword)) - return false; - if (zombie.getEquipmentInSlot(1) == null || !zombie.getEquipmentInSlot(1).getItem().equals(Items.chainmail_boots)) - return false; - if (zombie.getEquipmentInSlot(2) == null || !zombie.getEquipmentInSlot(2).getItem().equals(Items.chainmail_leggings)) - return false; + if (zombie.getEquipmentInSlot(0) == null || !zombie.getEquipmentInSlot(0).getItem().equals(Items.iron_sword)) return false; + if (zombie.getEquipmentInSlot(1) == null || !zombie.getEquipmentInSlot(1).getItem().equals(Items.chainmail_boots)) return false; + if (zombie.getEquipmentInSlot(2) == null || !zombie.getEquipmentInSlot(2).getItem().equals(Items.chainmail_leggings)) return false; return zombie.getEquipmentInSlot(3) != null && zombie.getEquipmentInSlot(3).getItem().equals(Items.chainmail_chestplate); } return false; -- cgit