aboutsummaryrefslogtreecommitdiff
path: root/src/main/java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/NEUManager.java8
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/overlays/EquipmentOverlay.java2
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/util/ItemUtils.java9
3 files changed, 6 insertions, 13 deletions
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/NEUManager.java b/src/main/java/io/github/moulberry/notenoughupdates/NEUManager.java
index 62b24111..7a2389d4 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/NEUManager.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/NEUManager.java
@@ -1267,7 +1267,7 @@ public class NEUManager {
}
}
- public HashMap<String, String> getLoreReplacements(String petname, String tier, int level) {
+ public HashMap<String, String> getPetLoreReplacements(String petname, String tier, int level) {
JsonObject petnums = null;
if (petname != null && tier != null) {
petnums = Constants.PETNUMS;
@@ -1392,7 +1392,7 @@ public class NEUManager {
return replacements;
}
- public HashMap<String, String> getLoreReplacements(NBTTagCompound tag, int level) {
+ public HashMap<String, String> getPetLoreReplacements(NBTTagCompound tag, int level) {
String petname = null;
String tier = null;
if (tag != null && tag.hasKey("ExtraAttributes")) {
@@ -1426,7 +1426,7 @@ public class NEUManager {
}
}
}
- return getLoreReplacements(petname, tier, level);
+ return getPetLoreReplacements(petname, tier, level);
}
public NBTTagList processLore(JsonArray lore, HashMap<String, String> replacements) {
@@ -1497,7 +1497,7 @@ public class NEUManager {
HashMap<String, String> replacements = new HashMap<>();
if (useReplacements) {
- replacements = getLoreReplacements(stack.getTagCompound(), -1);
+ replacements = getPetLoreReplacements(stack.getTagCompound(), -1);
String displayName = json.get("displayname").getAsString();
for (Map.Entry<String, String> entry : replacements.entrySet()) {
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/overlays/EquipmentOverlay.java b/src/main/java/io/github/moulberry/notenoughupdates/overlays/EquipmentOverlay.java
index d64dbe01..e6e8cb3b 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/overlays/EquipmentOverlay.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/overlays/EquipmentOverlay.java
@@ -262,7 +262,7 @@ public class EquipmentOverlay {
slot4 = getWardrobeSlot(37);
}
- if (screen instanceof GuiChest || screen instanceof GuiInventory) {
+ if ((screen instanceof GuiChest || screen instanceof GuiInventory) && NotEnoughUpdates.INSTANCE.config.petOverlay.petInvDisplay){
petStack = getRepoPetStack();
}
if ((!(screen instanceof GuiInventory) && !(screen instanceof GuiInvButtonEditor))
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/util/ItemUtils.java b/src/main/java/io/github/moulberry/notenoughupdates/util/ItemUtils.java
index a8f6e960..c6bc7538 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/util/ItemUtils.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/util/ItemUtils.java
@@ -173,8 +173,6 @@ public class ItemUtils {
}
public static ItemStack createPetItemstackFromPetInfo(PetInfoOverlay.Pet currentPet) {
- JsonObject pet = NotEnoughUpdates.INSTANCE.manager.getJsonForItem(NotEnoughUpdates.INSTANCE.manager.createItem(
- currentPet.getPetId(false)));
String petname = currentPet.petType;
String tier = Utils.getRarityFromInt(currentPet.rarity.petId).toUpperCase();
String heldItem = currentPet.petItem;
@@ -187,11 +185,6 @@ public class ItemUtils {
GuiProfileViewer.PetLevel levelObj = GuiProfileViewer.getPetLevel(petname, tier, exp);
float level = levelObj.level;
- float currentLevelRequirement = levelObj.currentLevelRequirement;
- float maxXP = levelObj.maxXP;
- pet.addProperty("level", level);
- pet.addProperty("currentLevelRequirement", currentLevelRequirement);
- pet.addProperty("maxXP", maxXP);
ItemStack petItemstack = NotEnoughUpdates.INSTANCE.manager
.createItemResolutionQuery()
@@ -206,7 +199,7 @@ public class ItemUtils {
"§c§l#neu-support §r§con §ldiscord.gg/moulberry"
));
}
- Map<String, String> replacements = NotEnoughUpdates.INSTANCE.manager.getLoreReplacements(
+ Map<String, String> replacements = NotEnoughUpdates.INSTANCE.manager.getPetLoreReplacements(
petname,
tier,
MathHelper.floor_float(level)