Skip to content

Commit

Permalink
...
Browse files Browse the repository at this point in the history
  • Loading branch information
7azeemm committed Nov 9, 2024
1 parent 9738100 commit b1d3bcc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ public static boolean shouldRenderBossBar() {

// Update boss max health
ArmorStandEntity e = SlayerManager.getSlayerArmorStandEntity();
System.out.println(e);
if (e != null && bossMaxHealth == -1) {
Matcher maxHealthMatcher = HEALTH_PATTERN.matcher(SlayerManager.getSlayerArmorStandEntity().getName().getString());
if (maxHealthMatcher.find()) bossMaxHealth = convertToInt(maxHealthMatcher.group(0));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,8 @@ private static void getSlayerBossInfo() {
for (String line : Utils.STRING_SCOREBOARD) {
Matcher matcher = SLAYER_TIER_PATTERN.matcher(line);
if (matcher.find()) {
if (!slayerType.isEmpty() && !matcher.group(1).equals(slayerType)) {
if ((!slayerType.isEmpty() && !matcher.group(1).equals(slayerType))
|| (!slayerTier.isEmpty() && !matcher.group(2).equals(slayerTier))) {
xpRemaining = 0;
level = -1;
bossesNeeded = -1;
Expand Down Expand Up @@ -167,14 +168,11 @@ public static void calculateBossesNeeded() {
bossesNeeded = (int) Math.ceil((double) xpRemaining / xpPerTier);
}

//TODO: Cache this, probably included in Packet system
public static List<Entity> getEntityArmorStands(Entity entity, float expandY) {
return entity.getEntityWorld().getOtherEntities(entity, entity.getBoundingBox().expand(0.3F, expandY, 0.3F), x -> x instanceof ArmorStandEntity && x.hasCustomName());
}

//Eventually this should be modified so that if you hit a slayer boss all slayer features will work on that boss.
public static ArmorStandEntity getSlayerArmorStandEntity() {
// TODO: This should be set when the system to detect isInSlayer is made event-driven
if (slayerArmorStandEntity != null && slayerArmorStandEntity.isAlive()) {
return slayerArmorStandEntity;
}
Expand Down

0 comments on commit b1d3bcc

Please sign in to comment.