aboutsummaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
authorbowser0000 <bowser0000@gmail.com>2020-10-02 09:24:12 -0400
committerbowser0000 <bowser0000@gmail.com>2020-10-02 09:24:12 -0400
commitd620d60c40db7ec2c7c59c01a5b02cb431552944 (patch)
tree7b5d711ec690d6a3860e8d13fd2b1afcfcfb5c7d /src/main
parent4a4aa1e0d511feb544401d9b41607f693887b55b (diff)
downloadSkyblockMod-d620d60c40db7ec2c7c59c01a5b02cb431552944.tar.gz
SkyblockMod-d620d60c40db7ec2c7c59c01a5b02cb431552944.tar.bz2
SkyblockMod-d620d60c40db7ec2c7c59c01a5b02cb431552944.zip
Fix /skills for people missing taming achievement
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/me/Danker/TheMod.java6
-rw-r--r--src/main/java/me/Danker/commands/SkillsCommand.java32
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;