aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/com/thatgravyboat/skyblockhud/api
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/com/thatgravyboat/skyblockhud/api')
-rw-r--r--src/main/java/com/thatgravyboat/skyblockhud/api/events/SkyBlockEntityKilled.java1
-rw-r--r--src/main/java/com/thatgravyboat/skyblockhud/api/sbentities/EntityTypeHelper.java11
2 files changed, 5 insertions, 7 deletions
diff --git a/src/main/java/com/thatgravyboat/skyblockhud/api/events/SkyBlockEntityKilled.java b/src/main/java/com/thatgravyboat/skyblockhud/api/events/SkyBlockEntityKilled.java
index 15fb01a..61f8d82 100644
--- a/src/main/java/com/thatgravyboat/skyblockhud/api/events/SkyBlockEntityKilled.java
+++ b/src/main/java/com/thatgravyboat/skyblockhud/api/events/SkyBlockEntityKilled.java
@@ -7,6 +7,7 @@ import net.minecraftforge.fml.common.eventhandler.Event;
public class SkyBlockEntityKilled extends Event {
public String id;
+
@Nullable
public Entity entity;
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;