aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal00212@users.noreply.github.com>2022-10-07 20:10:17 +0200
committerhannibal2 <24389977+hannibal00212@users.noreply.github.com>2022-10-07 20:10:17 +0200
commitf51a6dd27548474d6152377595bf6dc2c9eac436 (patch)
tree1bfd32a3e99bf2443a3fb32de7aa885334f7ef52
parent199fccd3da24cf470f647f93d007dd4303107e19 (diff)
parent796f1a24d058ab49e9ef5e9fc3a30817c79950dd (diff)
downloadNotEnoughUpdates-f51a6dd27548474d6152377595bf6dc2c9eac436.tar.gz
NotEnoughUpdates-f51a6dd27548474d6152377595bf6dc2c9eac436.tar.bz2
NotEnoughUpdates-f51a6dd27548474d6152377595bf6dc2c9eac436.zip
Merge branch 'master' into minion_helper_2
# Conflicts: # src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/PetInfoOverlay.java
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/PetInfoOverlay.java18
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinGuiContainer.java6
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/profileviewer/ExtraPage.java18
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/util/PronounDB.java2
4 files changed, 22 insertions, 22 deletions
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/PetInfoOverlay.java b/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/PetInfoOverlay.java
index db29c851..050d23a9 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/PetInfoOverlay.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/PetInfoOverlay.java
@@ -48,6 +48,7 @@ import net.minecraft.inventory.ContainerChest;
import net.minecraft.inventory.IInventory;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.util.ChatComponentText;
import net.minecraft.util.EnumChatFormatting;
import net.minecraftforge.client.event.ClientChatReceivedEvent;
import net.minecraftforge.event.world.WorldEvent;
@@ -789,11 +790,14 @@ public class PetInfoOverlay extends TextOverlay {
if (!NotEnoughUpdates.INSTANCE.config.petOverlay.petOverlayIcon) return;
int mythicRarity = currentPet.rarity.petId;
- if (currentPet.rarity.petId == 5) {
- mythicRarity = 4;
- }
JsonObject petItem = NotEnoughUpdates.INSTANCE.manager.getItemInformation().get(
currentPet.skin != null ? currentPet.skin : (currentPet.petType + ";" + mythicRarity));
+
+ if (petItem == null && currentPet.rarity.petId == 5) {
+ petItem = NotEnoughUpdates.INSTANCE.manager.getItemInformation().get(
+ currentPet.skin != null ? currentPet.skin : (currentPet.petType + ";" + 4));
+ }
+
if (petItem != null) {
Vector2f position = getPosition(overlayWidth, overlayHeight);
int x = (int) position.x;
@@ -1074,9 +1078,13 @@ public class PetInfoOverlay extends TextOverlay {
setCurrentPet(getClosestPetIndex(pet, rarity.petId, "", lastLevelHovered));
if (PetInfoOverlay.config.selectedPet == -1) {
- Utils.addChatMessage(
- EnumChatFormatting.RED + "[NEU] Can't find pet \u00a7" + petStringMatch +
+ setCurrentPet(getClosestPetIndex(pet, rarity.petId - 1, "", lastLevelHovered));
+ if (!"PET_ITEM_TIER_BOOST".equals(getCurrentPet().petItem)) {
+ PetInfoOverlay.config.selectedPet = -1;
+ Minecraft.getMinecraft().thePlayer.addChatMessage(new ChatComponentText(
+ EnumChatFormatting.RED + "[NEU] Can't find pet \u00a7" + petStringMatch +
EnumChatFormatting.RED + " try revisiting all pages of /pets.");
+ }
}
} else if ((chatMessage.toLowerCase().startsWith("you despawned your")) || (chatMessage.toLowerCase().contains(
"switching to profile"))
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinGuiContainer.java b/src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinGuiContainer.java
index f708fb5f..a24f4c84 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinGuiContainer.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinGuiContainer.java
@@ -362,7 +362,11 @@ public abstract class MixinGuiContainer extends GuiScreen {
BetterContainers.clickSlot(slotIn.getSlotIndex());
if (BetterContainers.isBlankStack(slotIn.slotNumber, slotIn.getStack())) {
- $this.mc.playerController.windowClick($this.inventorySlots.windowId, slotId, 2, clickType, $this.mc.thePlayer);
+ GuiContainer chest = ((GuiContainer) Minecraft.getMinecraft().currentScreen);
+ Minecraft.getMinecraft().playerController.windowClick(
+ chest.inventorySlots.windowId,
+ slotId, 2, 3, Minecraft.getMinecraft().thePlayer
+ );
ci.cancel();
} else {
Utils.playPressSound();
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/ExtraPage.java b/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/ExtraPage.java
index 63a4df2c..3b30b9b7 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/ExtraPage.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/ExtraPage.java
@@ -92,25 +92,13 @@ public class ExtraPage extends GuiProfileViewerPage {
);
{
- String lastSaveText = getTimeSinceString(profileInfo, "last_save");
- if (lastSaveText != null) {
- Utils.renderAlignedString(
- EnumChatFormatting.AQUA + "Last Seen",
- EnumChatFormatting.WHITE + lastSaveText,
- guiLeft + xStart,
- guiTop + yStartTop + yOffset * 2,
- 76
- );
- }
- }
- {
String first_join = getTimeSinceString(profileInfo, "first_join");
if (first_join != null) {
Utils.renderAlignedString(
EnumChatFormatting.AQUA + "Joined",
EnumChatFormatting.WHITE + first_join,
guiLeft + xStart,
- guiTop + yStartTop + yOffset * 3,
+ guiTop + yStartTop + yOffset * 2,
76
);
}
@@ -123,7 +111,7 @@ public class ExtraPage extends GuiProfileViewerPage {
EnumChatFormatting.AQUA + "Guild",
EnumChatFormatting.WHITE + guildInfo.get("name").getAsString(),
guiLeft + xStart,
- guiTop + yStartTop + yOffset * 4,
+ guiTop + yStartTop + yOffset * 3,
76
);
}
@@ -133,7 +121,7 @@ public class ExtraPage extends GuiProfileViewerPage {
EnumChatFormatting.GREEN + "Pronouns",
EnumChatFormatting.WHITE + String.join(" / ", choice.render()),
guiLeft + xStart,
- guiTop + yStartTop + yOffset * (shouldRenderGuild ? 5 : 4),
+ guiTop + yStartTop + yOffset * (shouldRenderGuild ? 4 : 3),
76
));
}
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/util/PronounDB.java b/src/main/java/io/github/moulberry/notenoughupdates/util/PronounDB.java
index 625f92f7..4c0b73eb 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/util/PronounDB.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/util/PronounDB.java
@@ -55,7 +55,7 @@ public class PronounDB {
HE("he", "him", "his"),
IT("it", "it", "its"),
SHE("she", "her", "hers"),
- THEY("they", "they", "theirs");
+ THEY("they", "them", "theirs");
private final String subject;
private final String object;