aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/me/Danker/commands/PetsCommand.java
diff options
context:
space:
mode:
authorbowser0000 <bowser0000@gmail.com>2022-03-07 13:47:42 -0500
committerbowser0000 <bowser0000@gmail.com>2022-03-07 13:47:42 -0500
commit036b0cf2f1115c73a49f4b81bfc53ee620a855c0 (patch)
tree7f736721174e53b788d3bb5ae7fbb870ade95e99 /src/main/java/me/Danker/commands/PetsCommand.java
parentbd683b910aaebf830aa02eb5a91b5a0a2c6e5fe5 (diff)
downloadSkyblockMod-036b0cf2f1115c73a49f4b81bfc53ee620a855c0.tar.gz
SkyblockMod-036b0cf2f1115c73a49f4b81bfc53ee620a855c0.tar.bz2
SkyblockMod-036b0cf2f1115c73a49f4b81bfc53ee620a855c0.zip
Fix golden drag pet xp and change level 30-39 pet colour
Change colour from FFC400 to 113CF2
Diffstat (limited to 'src/main/java/me/Danker/commands/PetsCommand.java')
-rw-r--r--src/main/java/me/Danker/commands/PetsCommand.java8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/main/java/me/Danker/commands/PetsCommand.java b/src/main/java/me/Danker/commands/PetsCommand.java
index e909fab..de3aed9 100644
--- a/src/main/java/me/Danker/commands/PetsCommand.java
+++ b/src/main/java/me/Danker/commands/PetsCommand.java
@@ -14,6 +14,7 @@ import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.util.BlockPos;
import net.minecraft.util.ChatComponentText;
import net.minecraft.util.EnumChatFormatting;
+import net.minecraft.util.MathHelper;
import java.util.ArrayList;
import java.util.List;
@@ -82,7 +83,7 @@ public class PetsCommand extends CommandBase {
}
}
- class Pet {
+ static class Pet {
public Rarity rarity;
public double xp;
@@ -103,13 +104,16 @@ public class PetsCommand extends CommandBase {
}
}
this.active = pet.get("active").getAsBoolean();
- this.name = Utils.capitalizeString(pet.get("type").getAsString());;
+ this.name = Utils.capitalizeString(pet.get("type").getAsString());
this.rarity = rarity;
this.xp = pet.get("exp").getAsDouble();
}
public String getStringToAdd() {
int level = petXpToLevel(this.xp, this.rarity.name());
+ if (this.name.equals("Golden Dragon") && this.xp > 25353230D) {
+ level = 100 + MathHelper.clamp_int((int) ((this.xp - 25353230) / 1886700) + 2, 0, 100);
+ }
String messageToAdd = rarity.getChatColor() + " " + (this.active ? EnumChatFormatting.BOLD + ">>> " : "") + Utils.capitalizeString(this.rarity.name()) + (this.rarityBoosted ? " ⇑" : "") + " " + this.name + " (" + level + ")" + (this.active ? " <<<" : "");