aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/me/Danker
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
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')
-rw-r--r--src/main/java/me/Danker/commands/PetsCommand.java8
-rw-r--r--src/main/java/me/Danker/features/PetColours.java20
-rw-r--r--src/main/java/me/Danker/handlers/ConfigHandler.java2
3 files changed, 17 insertions, 13 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 ? " <<<" : "");
diff --git a/src/main/java/me/Danker/features/PetColours.java b/src/main/java/me/Danker/features/PetColours.java
index 0e219db..7192f07 100644
--- a/src/main/java/me/Danker/features/PetColours.java
+++ b/src/main/java/me/Danker/features/PetColours.java
@@ -37,25 +37,25 @@ public class PetColours {
continue;
int colour;
int petLevel = Integer.parseInt(item.getDisplayName().substring(item.getDisplayName().indexOf(" ") + 1, item.getDisplayName().indexOf("]")));
- if (petLevel == 100) {
+ if (petLevel == 100 || petLevel == 200) {
colour = PET_100;
- } else if (petLevel >= 90) {
+ } else if ((petLevel < 100 && petLevel >= 90) || petLevel >= 190) {
colour = PET_90_TO_99;
- } else if (petLevel >= 80) {
+ } else if ((petLevel < 100 && petLevel >= 80) || petLevel >= 180) {
colour = PET_80_TO_89;
- } else if (petLevel >= 70) {
+ } else if ((petLevel < 100 && petLevel >= 70) || petLevel >= 170) {
colour = PET_70_TO_79;
- } else if (petLevel >= 60) {
+ } else if ((petLevel < 100 && petLevel >= 60) || petLevel >= 160) {
colour = PET_60_TO_69;
- } else if (petLevel >= 50) {
+ } else if ((petLevel < 100 && petLevel >= 50) || petLevel >= 150) {
colour = PET_50_TO_59;
- } else if (petLevel >= 40) {
+ } else if ((petLevel < 100 && petLevel >= 40) || petLevel >= 140) {
colour = PET_40_TO_49;
- } else if (petLevel >= 30) {
+ } else if ((petLevel < 100 && petLevel >= 30) || petLevel >= 130) {
colour = PET_30_TO_39;
- } else if (petLevel >= 20) {
+ } else if ((petLevel < 100 && petLevel >= 20) || petLevel >= 120) {
colour = PET_20_TO_29;
- } else if (petLevel >= 10) {
+ } else if ((petLevel < 100 && petLevel >= 10) || petLevel >= 110) {
colour = PET_10_TO_19;
} else {
colour = PET_1_TO_9;
diff --git a/src/main/java/me/Danker/handlers/ConfigHandler.java b/src/main/java/me/Danker/handlers/ConfigHandler.java
index 9365b63..25988a6 100644
--- a/src/main/java/me/Danker/handlers/ConfigHandler.java
+++ b/src/main/java/me/Danker/handlers/ConfigHandler.java
@@ -638,7 +638,7 @@ public class ConfigHandler {
PetColours.PET_1_TO_9 = initInt("colors", "pet1To9", 0x999999); // Grey
PetColours.PET_10_TO_19 = initInt("colors", "pet10To19", 0xD62440); // Red
PetColours.PET_20_TO_29 = initInt("colors", "pet20To29", 0xEF5230); // Orange
- PetColours.PET_30_TO_39 = initInt("colors", "pet30To39", 0xFFC400); // Yellow
+ PetColours.PET_30_TO_39 = initInt("colors", "pet30To39", 0x113CF2); // Dark Blue
PetColours.PET_40_TO_49 = initInt("colors", "pet40To49", 0x0EAC35); // Green
PetColours.PET_50_TO_59 = initInt("colors", "pet50To59", 0x008AD8); // Light Blue
PetColours.PET_60_TO_69 = initInt("colors", "pet60To69", 0x7E4FC6); // Purple