diff options
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/java/me/Danker/TheMod.java | 6 | ||||
-rw-r--r-- | src/main/java/me/Danker/commands/SkillsCommand.java | 32 |
2 files changed, 29 insertions, 9 deletions
diff --git a/src/main/java/me/Danker/TheMod.java b/src/main/java/me/Danker/TheMod.java index 3205a24..9185615 100644 --- a/src/main/java/me/Danker/TheMod.java +++ b/src/main/java/me/Danker/TheMod.java @@ -1809,8 +1809,12 @@ public class TheMod EntityPlayerSP player = Minecraft.getMinecraft().thePlayer; if (player != null) { Utils.checkForSkyblock(); + // if (Utils.inSkyblock) { + // System.out.println("Autosyncing inventory to server..."); + // player.inventoryContainer.detectAndSendChanges(); // Spirit boot fix every 1 second + // } } - tickAmount = 1; + tickAmount = 0; } if (titleTimer >= 0) { diff --git a/src/main/java/me/Danker/commands/SkillsCommand.java b/src/main/java/me/Danker/commands/SkillsCommand.java index 0bdc762..50f2767 100644 --- a/src/main/java/me/Danker/commands/SkillsCommand.java +++ b/src/main/java/me/Danker/commands/SkillsCommand.java @@ -139,14 +139,30 @@ public class SkillsCommand extends CommandBase { } JsonObject achievementObject = playerObject.get("player").getAsJsonObject().get("achievements").getAsJsonObject(); - farmingLevel = achievementObject.get("skyblock_harvester").getAsInt(); - miningLevel = achievementObject.get("skyblock_excavator").getAsInt(); - combatLevel = achievementObject.get("skyblock_combat").getAsInt(); - foragingLevel = achievementObject.get("skyblock_gatherer").getAsInt(); - fishingLevel = achievementObject.get("skyblock_angler").getAsInt(); - enchantingLevel = achievementObject.get("skyblock_augmentation").getAsInt(); - alchemyLevel = achievementObject.get("skyblock_concoctor").getAsInt(); - tamingLevel = achievementObject.get("skyblock_domesticator").getAsInt(); + if (achievementObject.has("skyblock_harvester")) { + farmingLevel = achievementObject.get("skyblock_harvester").getAsInt(); + } + if (achievementObject.has("skyblock_excavator")) { + miningLevel = achievementObject.get("skyblock_excavator").getAsInt(); + } + if (achievementObject.has("skyblock_combat")) { + combatLevel = achievementObject.get("skyblock_combat").getAsInt(); + } + if (achievementObject.has("skyblock_gatherer")) { + foragingLevel = achievementObject.get("skyblock_gatherer").getAsInt(); + } + if (achievementObject.has("skyblock_angler")) { + fishingLevel = achievementObject.get("skyblock_angler").getAsInt(); + } + if (achievementObject.has("skyblock_augmentation")) { + enchantingLevel = achievementObject.get("skyblock_augmentation").getAsInt(); + } + if (achievementObject.has("skyblock_concoctor")) { + alchemyLevel = achievementObject.get("skyblock_concoctor").getAsInt(); + } + if (achievementObject.has("skyblock_domesticator")) { + tamingLevel = achievementObject.get("skyblock_domesticator").getAsInt(); + } } double skillAvg = (farmingLevel + miningLevel + combatLevel + foragingLevel + fishingLevel + enchantingLevel + alchemyLevel + tamingLevel) / 8; |