Skip to content

Commit

Permalink
Use Taming Levels Added to API.
Browse files Browse the repository at this point in the history
Potential fix for active armour inserted into wrong wardrobe slot
  • Loading branch information
BigloBot committed Jul 30, 2024
1 parent 6715d16 commit a2a77a0
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ public List<ItemStack> loadItems(JsonObject data) {
if (activeSlot != -1) {
List<ItemStack> activeArmour = super.loadItems(activeArmorSet).reversed();
for (int i = 0; i < 4; i++) {
int baseIndex = activeSlot % 9;
int page = activeSlot / 9;
int slotIndex = (page * 36) + (i * 9) + baseIndex - 1;
int baseIndex = (activeSlot -1) % 9;
int page = (activeSlot - 1) / 9;
int slotIndex = (page * 36) + (i * 9) + baseIndex;
itemList.set(slotIndex, activeArmour.get(i));
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,8 @@ public void render(DrawContext context, int mouseX, int mouseY, int x, int y) {
fillColor = Color.MAGENTA;
}

if ((SOFT_SKILL_CAP.containsKey(SKILL_NAME) && SKILL_LEVEL.level > SOFT_SKILL_CAP.get(SKILL_NAME)) && SKILL_LEVEL.level < SKILL_CAP.get(SKILL_NAME) && SKILL_LEVEL.fill == 1 ||
(SKILL_NAME.equals("Taming") && SKILL_LEVEL.level >= SOFT_SKILL_CAP.get(SKILL_NAME))) {
if ((SOFT_SKILL_CAP.containsKey(SKILL_NAME) && SKILL_LEVEL.level > SOFT_SKILL_CAP.get(SKILL_NAME))
&& SKILL_LEVEL.level < SKILL_CAP.get(SKILL_NAME) && SKILL_LEVEL.fill == 1) {
fillColor = Color.YELLOW;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ private int getSkillCap(String skill) {
try {
return switch (skill) {
case "Farming" -> this.PLAYER_PROFILE.getAsJsonObject("jacobs_contest").getAsJsonObject("perks").get("farming_level_cap").getAsInt();
case "Taming" -> this.PLAYER_PROFILE.getAsJsonObject("pets_data").getAsJsonObject("pet_care").get("pet_types_sacrificed").getAsJsonArray().size();
default -> -1;
};
} catch (Exception e) {
Expand Down

0 comments on commit a2a77a0

Please sign in to comment.