diff options
Diffstat (limited to 'src/main/java/com/thatgravyboat/skyblockhud/handlers/sbentities')
-rw-r--r-- | src/main/java/com/thatgravyboat/skyblockhud/handlers/sbentities/EntityTypeHelper.java | 12 | ||||
-rw-r--r-- | src/main/java/com/thatgravyboat/skyblockhud/handlers/sbentities/EntityTypeRegistry.java | 13 |
2 files changed, 6 insertions, 19 deletions
diff --git a/src/main/java/com/thatgravyboat/skyblockhud/handlers/sbentities/EntityTypeHelper.java b/src/main/java/com/thatgravyboat/skyblockhud/handlers/sbentities/EntityTypeHelper.java index f5e7c2f..eda0b6f 100644 --- a/src/main/java/com/thatgravyboat/skyblockhud/handlers/sbentities/EntityTypeHelper.java +++ b/src/main/java/com/thatgravyboat/skyblockhud/handlers/sbentities/EntityTypeHelper.java @@ -17,17 +17,9 @@ public class EntityTypeHelper { .getBaseValue(); if ( maxHealthBase == 13000d || - ( - maxHealthBase == 2000d && - enderman - .getHeldBlockState() - .getBlock() - .equals(Blocks.end_portal_frame) - ) + (maxHealthBase == 2000d && enderman.getHeldBlockState().getBlock().equals(Blocks.end_portal_frame)) ) { - return LocationHandler - .getCurrentLocation() - .equals(Locations.DRAGONSNEST); + return LocationHandler.getCurrentLocation().equals(Locations.DRAGONSNEST); } } return false; diff --git a/src/main/java/com/thatgravyboat/skyblockhud/handlers/sbentities/EntityTypeRegistry.java b/src/main/java/com/thatgravyboat/skyblockhud/handlers/sbentities/EntityTypeRegistry.java index a2b70ef..83c6a70 100644 --- a/src/main/java/com/thatgravyboat/skyblockhud/handlers/sbentities/EntityTypeRegistry.java +++ b/src/main/java/com/thatgravyboat/skyblockhud/handlers/sbentities/EntityTypeRegistry.java @@ -12,19 +12,14 @@ public class EntityTypeRegistry { private static final Map<Class<? extends Entity>, List<SkyBlockEntity>> entities = Maps.newHashMap(); static { - entities.put( - EntityEnderman.class, - ImmutableList.of( - SkyBlockEntity.of("zealot", EntityTypeHelper::isZealot) - ) - ); + entities.put(EntityEnderman.class, ImmutableList.of(SkyBlockEntity.of("zealot", EntityTypeHelper::isZealot))); } public static String getEntityId(Entity entity) { if (!entities.containsKey(entity.getClass())) return null; - for (SkyBlockEntity skyBlockEntity : entities.get( - entity.getClass() - )) if (skyBlockEntity.isEntity(entity)) return skyBlockEntity.getName(); + for (SkyBlockEntity skyBlockEntity : entities.get(entity.getClass())) if ( + skyBlockEntity.isEntity(entity) + ) return skyBlockEntity.getName(); return null; } } |