From 428de736484aee87253efb12590dddc3c8a08591 Mon Sep 17 00:00:00 2001
From: hannibal2 <24389977+hannibal002@users.noreply.github.com>
Date: Sun, 15 Jan 2023 00:58:53 +0100
Subject: Really big Bazaar change (#549)
Co-authored-by: hannibal2 <24389977+hannibal00212@users.noreply.github.com>
---
.../java/io/github/moulberry/notenoughupdates/auction/APIManager.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
(limited to 'src/main/java')
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/auction/APIManager.java b/src/main/java/io/github/moulberry/notenoughupdates/auction/APIManager.java
index e606fc49..6ae5dd80 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/auction/APIManager.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/auction/APIManager.java
@@ -731,7 +731,7 @@ public class APIManager {
public void updateBazaar() {
manager.apiUtils
- .newHypixelApiRequest("skyblock/bazaar")
+ .newAnonymousHypixelApiRequest("skyblock/bazaar")
.requestJson()
.thenAccept(jsonObject -> {
if (!jsonObject.get("success").getAsBoolean()) return;
--
cgit
From a86faac67f4125716562d16c951320356bf87c30 Mon Sep 17 00:00:00 2001
From: hannibal2 <24389977+hannibal002@users.noreply.github.com>
Date: Mon, 16 Jan 2023 16:12:31 +0100
Subject: Kuudra Party PV (#556)
* Added kuudra party join message clickable support.
* Typo.
Co-authored-by: hannibal2 <24389977+hannibal00212@users.noreply.github.com>
---
.../io/github/moulberry/notenoughupdates/listener/ChatListener.java | 2 +-
.../moulberry/notenoughupdates/options/seperateSections/Misc.java | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
(limited to 'src/main/java')
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/listener/ChatListener.java b/src/main/java/io/github/moulberry/notenoughupdates/listener/ChatListener.java
index 31930b01..c97aaedf 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/listener/ChatListener.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/listener/ChatListener.java
@@ -61,7 +61,7 @@ public class ChatListener {
private static final Pattern SLAYER_EXP_PATTERN = Pattern.compile(
" (Spider|Zombie|Wolf|Enderman|Blaze) Slayer LVL (\\d) - (?:Next LVL in ([\\d,]+) XP!|LVL MAXED OUT!)");
private static final Pattern SKY_BLOCK_LEVEL_PATTERN = Pattern.compile("\\[(\\d{1,4})\\] .*");
- private final Pattern PARTY_FINDER_PATTERN = Pattern.compile("§dParty Finder §r§f> (.*)§ejoined the dungeon group!");
+ private final Pattern PARTY_FINDER_PATTERN = Pattern.compile("§dParty Finder §r§f> (.*)§ejoined the (dungeon )?group!");
private AtomicBoolean missingRecipe = new AtomicBoolean(false);
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/options/seperateSections/Misc.java b/src/main/java/io/github/moulberry/notenoughupdates/options/seperateSections/Misc.java
index b72610b8..47e51eec 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/options/seperateSections/Misc.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/options/seperateSections/Misc.java
@@ -305,8 +305,8 @@ public class Misc {
@Expose
@ConfigOption(
- name = "Dungeon Groups PV",
- desc = "View another player's profile by clicking on the chat message when they join in a dungeon group."
+ name = "Group Join PV",
+ desc = "View another player's profile by clicking on the chat message when they join in a dungeon or kuudra group."
)
@ConfigEditorBoolean
public boolean dungeonGroupsPV = true;
--
cgit
From 937e84822e298e3edbee4bb24775eb04f2770c4a Mon Sep 17 00:00:00 2001
From: NopoTheGamer <40329022+NopoTheGamer@users.noreply.github.com>
Date: Wed, 18 Jan 2023 01:01:27 +1100
Subject: Add tooltip resizing (#543)
add tooltip resizing
---
.../notenoughupdates/mixins/MixinGuiUtils.java | 71 ++++++++++++++++++++++
.../options/seperateSections/TooltipTweaks.java | 11 ++++
2 files changed, 82 insertions(+)
create mode 100644 src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinGuiUtils.java
(limited to 'src/main/java')
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinGuiUtils.java b/src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinGuiUtils.java
new file mode 100644
index 00000000..0ad2a098
--- /dev/null
+++ b/src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinGuiUtils.java
@@ -0,0 +1,71 @@
+/*
+ * Copyright (C) 2023 NotEnoughUpdates contributors
+ *
+ * This file is part of NotEnoughUpdates.
+ *
+ * NotEnoughUpdates is free software: you can redistribute it
+ * and/or modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation, either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * NotEnoughUpdates is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with NotEnoughUpdates. If not, see .
+ */
+
+package io.github.moulberry.notenoughupdates.mixins;
+
+import io.github.moulberry.notenoughupdates.NotEnoughUpdates;
+import io.github.moulberry.notenoughupdates.util.Utils;
+import net.minecraft.client.Minecraft;
+import net.minecraft.client.gui.FontRenderer;
+import net.minecraftforge.fml.client.config.GuiUtils;
+import org.lwjgl.input.Mouse;
+import org.spongepowered.asm.mixin.Mixin;
+import org.spongepowered.asm.mixin.injection.At;
+import org.spongepowered.asm.mixin.injection.Inject;
+import org.spongepowered.asm.mixin.injection.ModifyVariable;
+import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
+
+import java.util.List;
+
+@Mixin(value = GuiUtils.class, remap = false)
+public class MixinGuiUtils {
+ @Inject(method = "drawHoveringText", at = @At("HEAD"))
+ private static void drawHoveringText_head(
+ List textLines, int mouseX, int mouseY, int screenWidth, int screenHeight, int maxTextWidth, FontRenderer font, CallbackInfo ci) {
+ Utils.pushGuiScale(NotEnoughUpdates.INSTANCE.config.tooltipTweaks.guiScale);
+ }
+
+ @ModifyVariable(method = "drawHoveringText", at = @At(value = "HEAD"), ordinal = 0, argsOnly = true)
+ private static int drawHoveringText_modifyMouseX(int mouseX) {
+ return Mouse.getX() * Utils.pushGuiScale(NotEnoughUpdates.INSTANCE.config.tooltipTweaks.guiScale).getScaledWidth() / Minecraft.getMinecraft().displayWidth;
+ }
+
+ @ModifyVariable(method = "drawHoveringText", at = @At(value = "HEAD"), ordinal = 1, argsOnly = true)
+ private static int drawHoveringText_modifyMouseY(int mouseY) {
+ return Utils.pushGuiScale(NotEnoughUpdates.INSTANCE.config.tooltipTweaks.guiScale).getScaledHeight() -
+ Mouse.getY() * Utils.pushGuiScale(NotEnoughUpdates.INSTANCE.config.tooltipTweaks.guiScale).getScaledHeight() / Minecraft.getMinecraft().displayHeight;
+ }
+
+
+ @ModifyVariable(method = "drawHoveringText", at = @At(value = "HEAD"), ordinal = 2, argsOnly = true)
+ private static int drawHoveringText_modifyWidth(int width) {
+ return Utils.pushGuiScale(NotEnoughUpdates.INSTANCE.config.tooltipTweaks.guiScale).getScaledWidth();
+ }
+
+ @ModifyVariable(method = "drawHoveringText", at = @At(value = "HEAD"), ordinal = 3, argsOnly = true)
+ private static int drawHoveringText_modifyHeight(int height) {
+ return Utils.pushGuiScale(NotEnoughUpdates.INSTANCE.config.tooltipTweaks.guiScale).getScaledHeight();
+ }
+
+ @Inject(method = "drawHoveringText", at = @At("TAIL"))
+ private static void drawHoveringText_tail(
+ List textLines, int mouseX, int mouseY, int screenWidth, int screenHeight, int maxTextWidth, FontRenderer font, CallbackInfo ci) {
+ Utils.resetGuiScale();
+ }
+}
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/options/seperateSections/TooltipTweaks.java b/src/main/java/io/github/moulberry/notenoughupdates/options/seperateSections/TooltipTweaks.java
index 8539c3c4..45a96577 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/options/seperateSections/TooltipTweaks.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/options/seperateSections/TooltipTweaks.java
@@ -24,6 +24,7 @@ import io.github.moulberry.notenoughupdates.core.config.annotations.ConfigAccord
import io.github.moulberry.notenoughupdates.core.config.annotations.ConfigEditorAccordion;
import io.github.moulberry.notenoughupdates.core.config.annotations.ConfigEditorBoolean;
import io.github.moulberry.notenoughupdates.core.config.annotations.ConfigEditorDraggableList;
+import io.github.moulberry.notenoughupdates.core.config.annotations.ConfigEditorDropdown;
import io.github.moulberry.notenoughupdates.core.config.annotations.ConfigEditorKeybind;
import io.github.moulberry.notenoughupdates.core.config.annotations.ConfigEditorSlider;
import io.github.moulberry.notenoughupdates.core.config.annotations.ConfigOption;
@@ -145,6 +146,16 @@ public class TooltipTweaks {
@ConfigEditorBoolean
public boolean missingEnchantList = true;
+ @Expose
+ @ConfigOption(
+ name = "Resize tooltips",
+ desc = "Resizes tooltips to make them readable"
+ )
+ @ConfigEditorDropdown(
+ values = {"Default", "Small", "Normal", "Large", "Auto"}
+ )
+ public int guiScale = 0;
+
@Expose
@ConfigOption(
name = "Expand Pet Exp Requirement",
--
cgit
From 1f4d6925020a26d0662c3fe90672f5d4c831682d Mon Sep 17 00:00:00 2001
From: NopoTheGamer <40329022+NopoTheGamer@users.noreply.github.com>
Date: Wed, 18 Jan 2023 09:30:28 +1100
Subject: Fix npe spam when rendering a player model in a recipe (#557)
---
.../mixins/MixinLayerDeadmau5Head.java | 38 ++++++++++++++++++++++
1 file changed, 38 insertions(+)
create mode 100644 src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinLayerDeadmau5Head.java
(limited to 'src/main/java')
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinLayerDeadmau5Head.java b/src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinLayerDeadmau5Head.java
new file mode 100644
index 00000000..14ae9c74
--- /dev/null
+++ b/src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinLayerDeadmau5Head.java
@@ -0,0 +1,38 @@
+/*
+ * Copyright (C) 2023 NotEnoughUpdates contributors
+ *
+ * This file is part of NotEnoughUpdates.
+ *
+ * NotEnoughUpdates is free software: you can redistribute it
+ * and/or modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation, either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * NotEnoughUpdates is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with NotEnoughUpdates. If not, see .
+ */
+
+package io.github.moulberry.notenoughupdates.mixins;
+
+import io.github.moulberry.notenoughupdates.miscfeatures.entityviewer.GUIClientPlayer;
+import net.minecraft.client.entity.AbstractClientPlayer;
+import net.minecraft.client.renderer.entity.layers.LayerDeadmau5Head;
+import org.spongepowered.asm.mixin.Mixin;
+import org.spongepowered.asm.mixin.injection.At;
+import org.spongepowered.asm.mixin.injection.Inject;
+import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
+
+@Mixin(LayerDeadmau5Head.class)
+public class MixinLayerDeadmau5Head {
+
+ @Inject(method = "doRenderLayer(Lnet/minecraft/client/entity/AbstractClientPlayer;FFFFFFF)V", at = @At("HEAD"), cancellable = true)
+ public void doRenderLayer(
+ AbstractClientPlayer entitylivingbaseIn, float f, float g, float partialTicks, float h, float i, float j, float scale, CallbackInfo ci) {
+ if (entitylivingbaseIn instanceof GUIClientPlayer) ci.cancel();
+ }
+}
--
cgit
From 6bf6e75b23a49819c0a3ab97ffeb000240c0ad9d Mon Sep 17 00:00:00 2001
From: NopoTheGamer <40329022+NopoTheGamer@users.noreply.github.com>
Date: Thu, 19 Jan 2023 04:00:56 +1100
Subject: Fixed 2nd pet skull not rendering and breaking with custom gui scale
(#551)
---
.../moulberry/notenoughupdates/miscfeatures/PetInfoOverlay.java | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
(limited to 'src/main/java')
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 37cb14b5..1ba62308 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/PetInfoOverlay.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/PetInfoOverlay.java
@@ -721,16 +721,18 @@ public class PetInfoOverlay extends TextOverlay {
JsonObject petItem2 = NotEnoughUpdates.INSTANCE.manager.getItemInformation().get(
currentPet2.skin != null ? currentPet2.skin : (currentPet2.petType + ";" + currentPet2.rarity.petId));
if (petItem2 != null) {
- Vector2f position = getPosition(overlayWidth, overlayHeight, false);
+ Vector2f position = getPosition(overlayWidth, overlayHeight, true);
int x = (int) position.x;
- int y = (int) position.y + NotEnoughUpdates.INSTANCE.config.petOverlay.petOverlayText.size() * 10 + 10;
+ int y = (int) position.y + NotEnoughUpdates.INSTANCE.config.petOverlay.petOverlayText.size() * 10;
ItemStack stack = NotEnoughUpdates.INSTANCE.manager.jsonToStack(petItem2);
GlStateManager.enableDepth();
GlStateManager.pushMatrix();
+ Utils.pushGuiScale(NotEnoughUpdates.INSTANCE.config.locationedit.guiScale);
GlStateManager.translate(x - 2, y - 2, 0);
GlStateManager.scale(2, 2, 1);
Utils.drawItemStack(stack, 0, 0);
+ Utils.pushGuiScale(0);
GlStateManager.popMatrix();
}
}
--
cgit
From edac10d8d22295fc6027266fba8466f3fa5f7a0b Mon Sep 17 00:00:00 2001
From: NopoTheGamer <40329022+NopoTheGamer@users.noreply.github.com>
Date: Thu, 19 Jan 2023 04:01:54 +1100
Subject: Made it so barriers appear where you are unable to slot bind to
(#528)
Co-authored-by: nea
Co-authored-by: Lulonaut
---
.../notenoughupdates/events/ReplaceItemEvent.java | 8 +++---
.../notenoughupdates/miscfeatures/SlotLocking.java | 31 ++++++++++++++++++++++
.../notenoughupdates/mixins/MixinGuiContainer.java | 5 ++--
.../mixins/MixinInventoryPlayer.java | 24 +++++++++++++++++
4 files changed, 62 insertions(+), 6 deletions(-)
(limited to 'src/main/java')
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/events/ReplaceItemEvent.java b/src/main/java/io/github/moulberry/notenoughupdates/events/ReplaceItemEvent.java
index 2cdcf083..335d8fe0 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/events/ReplaceItemEvent.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/events/ReplaceItemEvent.java
@@ -19,17 +19,17 @@
package io.github.moulberry.notenoughupdates.events;
-import net.minecraft.inventory.InventoryBasic;
+import net.minecraft.inventory.IInventory;
import net.minecraft.item.ItemStack;
public class ReplaceItemEvent extends NEUEvent {
final ItemStack original;
- final InventoryBasic inventory;
+ final IInventory inventory;
final int slotNumber;
ItemStack replaceWith;
- public ReplaceItemEvent(ItemStack original, InventoryBasic inventory, int slotNumber) {
+ public ReplaceItemEvent(ItemStack original, IInventory inventory, int slotNumber) {
this.original = original;
this.inventory = inventory;
this.slotNumber = slotNumber;
@@ -40,7 +40,7 @@ public class ReplaceItemEvent extends NEUEvent {
return original;
}
- public InventoryBasic getInventory() {
+ public IInventory getInventory() {
return inventory;
}
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/SlotLocking.java b/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/SlotLocking.java
index 8a487739..7e65e032 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/SlotLocking.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/SlotLocking.java
@@ -24,8 +24,10 @@ import com.google.gson.GsonBuilder;
import io.github.moulberry.notenoughupdates.NotEnoughUpdates;
import io.github.moulberry.notenoughupdates.core.config.KeybindHelper;
import io.github.moulberry.notenoughupdates.core.util.render.RenderUtils;
+import io.github.moulberry.notenoughupdates.events.ReplaceItemEvent;
import io.github.moulberry.notenoughupdates.events.SlotClickEvent;
import io.github.moulberry.notenoughupdates.mixins.AccessorGuiContainer;
+import io.github.moulberry.notenoughupdates.util.ItemUtils;
import io.github.moulberry.notenoughupdates.util.SBInfo;
import net.minecraft.client.Minecraft;
import net.minecraft.client.audio.ISound;
@@ -39,7 +41,10 @@ import net.minecraft.client.renderer.RenderHelper;
import net.minecraft.client.renderer.Tessellator;
import net.minecraft.client.renderer.WorldRenderer;
import net.minecraft.client.renderer.vertex.DefaultVertexFormats;
+import net.minecraft.entity.player.InventoryPlayer;
+import net.minecraft.init.Blocks;
import net.minecraft.inventory.Slot;
+import net.minecraft.item.ItemStack;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.client.event.GuiScreenEvent;
import net.minecraftforge.fml.common.eventhandler.EventPriority;
@@ -416,6 +421,9 @@ public class SlotLocking {
}
drawLinkArrow(x1, y1, x2, y2);
+ setTopHalfBarrier = true;
+ } else {
+ setTopHalfBarrier = false;
}
}
@@ -729,4 +737,27 @@ public class SlotLocking {
return locked != null &&
(locked.locked || (NotEnoughUpdates.INSTANCE.config.slotLocking.bindingAlsoLocks && locked.boundTo != -1));
}
+
+ boolean setTopHalfBarrier = false;
+ @SubscribeEvent
+ public void barrierInventory(ReplaceItemEvent event) {
+ if (event.getSlotNumber() < 9 ||
+ (pairingSlot != null && (event.getSlotNumber() == pairingSlot.slotNumber || isArmourSlot(event.getSlotNumber(), pairingSlot.slotNumber))) ||
+ !setTopHalfBarrier ||
+ !(event.getInventory() instanceof InventoryPlayer)) return;
+ ItemStack stack = new ItemStack(Blocks.barrier);
+ ItemUtils.getOrCreateTag(stack).setBoolean(
+ "NEUHIDETOOLIP",
+ true
+ );
+ event.replaceWith(stack);
+ }
+
+ boolean isArmourSlot(int eventSlotNumber, int pairingSlotNumber) {
+ if (eventSlotNumber == 39 && pairingSlotNumber == 5) return true;
+ if (eventSlotNumber == 38 && pairingSlotNumber == 6) return true;
+ if (eventSlotNumber == 37 && pairingSlotNumber == 7) return true;
+ if (eventSlotNumber == 36 && pairingSlotNumber == 8) return true;
+ return false;
+ }
}
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 91d92091..a5bb99b8 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinGuiContainer.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinGuiContainer.java
@@ -294,8 +294,9 @@ public abstract class MixinGuiContainer extends GuiScreen {
@Redirect(method = "drawScreen", at = @At(value = "INVOKE", target = TARGET_CANBEHOVERED))
public boolean drawScreen_canBeHovered(Slot slot) {
- if (NotEnoughUpdates.INSTANCE.config.improvedSBMenu.hideEmptyPanes &&
- BetterContainers.isOverriding() && BetterContainers.isBlankStack(slot.slotNumber, slot.getStack())) {
+ if ((NotEnoughUpdates.INSTANCE.config.improvedSBMenu.hideEmptyPanes &&
+ BetterContainers.isOverriding() && BetterContainers.isBlankStack(slot.slotNumber, slot.getStack())) ||
+ slot.getStack() != null && slot.getStack().hasTagCompound() && slot.getStack().getTagCompound().getBoolean("NEUHIDETOOLIP")) {
return false;
}
return slot.canBeHovered();
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinInventoryPlayer.java b/src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinInventoryPlayer.java
index de117002..22e53ae1 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinInventoryPlayer.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinInventoryPlayer.java
@@ -19,13 +19,17 @@
package io.github.moulberry.notenoughupdates.mixins;
+import io.github.moulberry.notenoughupdates.events.ReplaceItemEvent;
import io.github.moulberry.notenoughupdates.miscfeatures.SlotLocking;
import io.github.moulberry.notenoughupdates.miscgui.InventoryStorageSelector;
import net.minecraft.entity.player.InventoryPlayer;
+import net.minecraft.item.ItemStack;
import org.spongepowered.asm.mixin.Mixin;
+import org.spongepowered.asm.mixin.Shadow;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
+import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
@Mixin(InventoryPlayer.class)
public class MixinInventoryPlayer {
@@ -42,4 +46,24 @@ public class MixinInventoryPlayer {
SlotLocking.getInstance().changedSlot($this.currentItem);
}
+
+ @Shadow public ItemStack[] mainInventory;
+ @Shadow public ItemStack[] armorInventory;
+
+ @Inject(method = "getStackInSlot", at = @At("HEAD"), cancellable = true)
+ public void on(int index, CallbackInfoReturnable cir) {
+ ItemStack itemStack =
+ index < mainInventory.length
+ ? this.mainInventory[index]
+ : this.armorInventory[index - mainInventory.length];
+ ReplaceItemEvent replaceItemEventInventory = new ReplaceItemEvent(
+ itemStack,
+ ((InventoryPlayer) (Object) this),
+ index
+ );
+ replaceItemEventInventory.post();
+ if (replaceItemEventInventory.getReplacement() != replaceItemEventInventory.getOriginal()) {
+ cir.setReturnValue(replaceItemEventInventory.getReplacement());
+ }
+ }
}
--
cgit
From cc3d273d81ecb3b1ab5af9902388f4b3be744c5c Mon Sep 17 00:00:00 2001
From: NopoTheGamer <40329022+NopoTheGamer@users.noreply.github.com>
Date: Thu, 19 Jan 2023 04:03:55 +1100
Subject: Added ability to multiply pet xp gain per pet (#553)
---
.../moulberry/notenoughupdates/miscfeatures/PetInfoOverlay.java | 5 +++++
1 file changed, 5 insertions(+)
(limited to 'src/main/java')
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 1ba62308..e350c489 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/PetInfoOverlay.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/PetInfoOverlay.java
@@ -470,6 +470,11 @@ public class PetInfoOverlay extends TextOverlay {
xp = xp * getBoostMultiplier(pet.petItem);
}
}
+ JsonObject pets = Constants.PETS;
+ if (pets != null && pets.has("custom_pet_leveling") && pets.get("custom_pet_leveling").getAsJsonObject().has(pet.petType.toUpperCase()) &&
+ pets.get("custom_pet_leveling").getAsJsonObject().get(pet.petType.toUpperCase()).getAsJsonObject().has("xp_multiplier")) {
+ xp *= pets.get("custom_pet_leveling").getAsJsonObject().get(pet.petType.toUpperCase()).getAsJsonObject().get("xp_multiplier").getAsFloat();
+ }
return xp;
}
--
cgit
From 97d3fb41693e97c51ba9e4929cd7f4294f7c68e1 Mon Sep 17 00:00:00 2001
From: Hexeption
Date: Thu, 19 Jan 2023 13:49:51 +0000
Subject: Use a long for skils totalXP fixes #555 (#559)
---
.../io/github/moulberry/notenoughupdates/profileviewer/BasicPage.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
(limited to 'src/main/java')
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/BasicPage.java b/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/BasicPage.java
index 873ee9f2..47df3c6e 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/BasicPage.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/BasicPage.java
@@ -691,7 +691,7 @@ public class BasicPage extends GuiProfileViewerPage {
"/" +
StringUtils.shortNumberFormat(maxXp));
}
- String totalXpS = GuiProfileViewer.numberFormat.format((int) level.totalXp);
+ String totalXpS = GuiProfileViewer.numberFormat.format((long) level.totalXp);
tooltipToDisplay.add(EnumChatFormatting.GRAY + "Total XP: " + EnumChatFormatting.DARK_PURPLE + totalXpS +
EnumChatFormatting.DARK_GRAY + " (" +
DECIMAL_FORMAT.format(guiProfileViewer.getPercentage(entry.getKey().toLowerCase(), level)) +
--
cgit
From 9fb6497c34f64e3c30b7ab5e417f4c2be6f9cc7b Mon Sep 17 00:00:00 2001
From: hannibal2 <24389977+hannibal002@users.noreply.github.com>
Date: Fri, 20 Jan 2023 11:38:35 +0100
Subject: Fixed Powder Checker (#561)
Co-authored-by: hannibal2 <24389977+hannibal00212@users.noreply.github.com>
Fixes https://github.com/NotEnoughUpdates/NotEnoughUpdates/issues/560
---
.../notenoughupdates/listener/ChatListener.java | 5 +--
.../options/seperateSections/Mining.java | 2 +-
.../overlays/PowderGrindingOverlay.java | 45 ++++++++++------------
3 files changed, 23 insertions(+), 29 deletions(-)
(limited to 'src/main/java')
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/listener/ChatListener.java b/src/main/java/io/github/moulberry/notenoughupdates/listener/ChatListener.java
index c97aaedf..8563189c 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/listener/ChatListener.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/listener/ChatListener.java
@@ -316,10 +316,7 @@ public class ChatListener {
}
}
- if (unformatted.equals("You uncovered a treasure chest!") ||
- unformatted.equals("You have successfully picked the lock on this chest!")
- || (unformatted.startsWith("You received +") && unformatted.endsWith(" Powder")))
- OverlayManager.powderGrindingOverlay.message(unformatted);
+ OverlayManager.powderGrindingOverlay.onMessage(unformatted);
if (unformatted.startsWith("ENDER NODE!"))
EnderNodeHighlighter.getInstance().highlightedBlocks.clear();
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/options/seperateSections/Mining.java b/src/main/java/io/github/moulberry/notenoughupdates/options/seperateSections/Mining.java
index b82b44c2..797083b5 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/options/seperateSections/Mining.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/options/seperateSections/Mining.java
@@ -738,7 +738,7 @@ public class Mining {
@Expose
@ConfigOption(
name = "Enable Tracker",
- desc = "Show an Overlay with useful information related to Power Grinding"
+ desc = "Show an Overlay with useful information related to Powder Grinding"
)
@ConfigAccordionId(id = 9)
@ConfigEditorBoolean
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/overlays/PowderGrindingOverlay.java b/src/main/java/io/github/moulberry/notenoughupdates/overlays/PowderGrindingOverlay.java
index 50ecce90..ad8755e3 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/overlays/PowderGrindingOverlay.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/overlays/PowderGrindingOverlay.java
@@ -19,8 +19,6 @@
package io.github.moulberry.notenoughupdates.overlays;
-import com.google.gson.Gson;
-import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
import io.github.moulberry.notenoughupdates.NotEnoughUpdates;
import io.github.moulberry.notenoughupdates.core.config.Position;
@@ -28,26 +26,19 @@ import io.github.moulberry.notenoughupdates.core.util.lerp.LerpUtils;
import io.github.moulberry.notenoughupdates.options.NEUConfig;
import io.github.moulberry.notenoughupdates.util.SBInfo;
-import java.io.BufferedReader;
-import java.io.BufferedWriter;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.InputStreamReader;
-import java.io.OutputStreamWriter;
-import java.nio.charset.StandardCharsets;
import java.text.NumberFormat;
import java.util.ArrayList;
import java.util.List;
import java.util.function.Supplier;
-import java.util.stream.Collectors;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
public class PowderGrindingOverlay extends TextTabOverlay {
private final static JsonParser PARSER = new JsonParser();
+ private final static Pattern pattern =
+ Pattern.compile("You received \\+([0-9]+(?:,\\d+)*) (Mithril|Gemstone) Powder\\.");
public int chestCount = 0;
public int openedChestCount = 0;
@@ -112,7 +103,8 @@ public class PowderGrindingOverlay extends TextTabOverlay {
overlayStrings.add("\u00a73Opened Chests: \u00a7a" + format.format(this.openedChestCount));
break;
case 2:
- overlayStrings.add("\u00a73Unopened Chests: \u00a7c" + format.format(this.chestCount - this.openedChestCount));
+ overlayStrings.add(
+ "\u00a73Unopened Chests: \u00a7c" + format.format(this.chestCount - this.openedChestCount));
break;
case 3:
overlayStrings.add("\u00a73Mithril Powder Found: \u00a72" +
@@ -141,21 +133,26 @@ public class PowderGrindingOverlay extends TextTabOverlay {
if (overlayStrings != null && overlayStrings.isEmpty()) overlayStrings = null;
}
- public void message(String message) {
+ public void onMessage(String message) {
if (message.equals("You uncovered a treasure chest!")) {
this.chestCount++;
} else if (message.equals("You have successfully picked the lock on this chest!")) {
this.openedChestCount++;
} else {
- boolean mithril = message.endsWith(" Mithril Powder");
- boolean gemstone = message.endsWith(" Gemstone Powder");
- if (!(mithril || gemstone)) return;
- try {
- int amount = Integer.parseInt(message.split(" ")[2].replaceAll("\\+", ""));
- if (mithril) this.mithrilPowderFound += amount;
- else this.gemstonePowderFound += amount;
- } catch (NumberFormatException | IndexOutOfBoundsException e) {
- e.printStackTrace();
+ Matcher matcher = pattern.matcher(message);
+ if (matcher.matches()) {
+ String rawNumber = matcher.group(1).replace(",", "");
+ try {
+ int amount = Integer.parseInt(rawNumber);
+ String type = matcher.group(2);
+ if (type.equals("Mithril")) {
+ this.mithrilPowderFound += amount;
+ } else if (type.equals("Gemstone")) {
+ this.gemstonePowderFound += amount;
+ }
+ } catch (NumberFormatException e) {
+ e.printStackTrace();
+ }
}
}
}
--
cgit
From 239fdf3f8035ea0a6f4f805451be3b9070d5a952 Mon Sep 17 00:00:00 2001
From: hannibal2 <24389977+hannibal002@users.noreply.github.com>
Date: Sat, 21 Jan 2023 03:06:42 +0100
Subject: Want to Complete Commission Tasks Like a Pro? This Feature is a
Must-Have (#517)
Co-authored-by: hannibal2 <24389977+hannibal00212@users.noreply.github.com>
---
.../options/seperateSections/Mining.java | 21 +++-
.../notenoughupdates/overlays/MiningOverlay.java | 121 ++++++++++++++++++---
2 files changed, 127 insertions(+), 15 deletions(-)
(limited to 'src/main/java')
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/options/seperateSections/Mining.java b/src/main/java/io/github/moulberry/notenoughupdates/options/seperateSections/Mining.java
index 797083b5..74400f59 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/options/seperateSections/Mining.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/options/seperateSections/Mining.java
@@ -233,12 +233,31 @@ public class Mining {
@ConfigOption(
name = "Star Cult Tab",
desc = "Only show the star cult timer when tab list is open\n" +
- "\u00A7cThis only works outside of Dwarven Caves!"
+ "§cThis only works outside of Dwarven Caves!"
)
@ConfigEditorBoolean
@ConfigAccordionId(id = 2)
public boolean starCultDisplayOnlyShowTab = false;
+ @Expose
+ @ConfigOption(
+ name = "Commission Task Tips",
+ desc = "Show tips to help complete commission tasks"
+ )
+ @ConfigEditorDropdown(
+ values = {"Off", "Only while sneaking", "Always"}
+ )
+ @ConfigAccordionId(id = 2)
+ public int commissionTaskTips = 0;
+
+ @Expose
+ @ConfigOption(
+ name = "Tips in New Line",
+ desc = "Show the Commission Task Tips in the next line.")
+ @ConfigEditorBoolean
+ @ConfigAccordionId(id = 2)
+ public boolean commissionTaskTipNewLine = true;
+
@ConfigOption(
name = "Metal Detector Solver",
desc = ""
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/overlays/MiningOverlay.java b/src/main/java/io/github/moulberry/notenoughupdates/overlays/MiningOverlay.java
index f25407b6..ea253e94 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/overlays/MiningOverlay.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/overlays/MiningOverlay.java
@@ -31,7 +31,6 @@ import io.github.moulberry.notenoughupdates.util.StarCultCalculator;
import io.github.moulberry.notenoughupdates.util.TabListUtils;
import io.github.moulberry.notenoughupdates.util.Utils;
import net.minecraft.client.Minecraft;
-import net.minecraft.client.gui.GuiChat;
import net.minecraft.client.gui.inventory.GuiChest;
import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.init.Items;
@@ -39,10 +38,6 @@ import net.minecraft.inventory.ContainerChest;
import net.minecraft.inventory.IInventory;
import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumChatFormatting;
-import net.minecraft.world.WorldSettings;
-import net.minecraftforge.fml.relauncher.Side;
-import net.minecraftforge.fml.relauncher.SideOnly;
-import org.lwjgl.input.Keyboard;
import org.lwjgl.util.vector.Vector2f;
import java.util.ArrayList;
@@ -379,22 +374,35 @@ public class MiningOverlay extends TextTabOverlay {
} else if (entry.getValue() >= 0.25) {
col = GOLD;
}
+ String tips = getTipPart(entry.getKey());
+ boolean newLine = NotEnoughUpdates.INSTANCE.config.mining.commissionTaskTipNewLine;
+ String newLineTip = null;
+ if (newLine) {
+ if (!tips.isEmpty()) {
+ newLineTip = " " + tips;
+ tips = "";
+ }
+ }
NEUConfig.HiddenLocationSpecific locationSpecific = NotEnoughUpdates.INSTANCE.config.getLocationSpecific();
int max;
if (-1 != (max = locationSpecific.commissionMaxes.getOrDefault(entry.getKey(), -1))) {
commissionsStrings.add(
- DARK_AQUA + entry.getKey() + ": " + col + Math.round(entry.getValue() * max) + "/" + max);
+ DARK_AQUA + entry.getKey() + ": " + col + Math.round(entry.getValue() * max) + "/" + max + tips);
} else {
String valS = Utils.floatToString(entry.getValue() * 100, 1);
- commissionsStrings.add(DARK_AQUA + entry.getKey() + ": " + col + valS + "%");
+ commissionsStrings.add(DARK_AQUA + entry.getKey() + ": " + col + valS + "%" + tips);
+ }
+ if (newLineTip != null) {
+ commissionsStrings.add(newLineTip);
}
}
}
if (ItemCooldowns.firstLoadMillis > 0) {
//set cooldown on first skyblock load.
- ItemCooldowns.pickaxeUseCooldownMillisRemaining = 60 * 1000 - (System.currentTimeMillis() - ItemCooldowns.firstLoadMillis);
+ ItemCooldowns.pickaxeUseCooldownMillisRemaining =
+ 60 * 1000 - (System.currentTimeMillis() - ItemCooldowns.firstLoadMillis);
ItemCooldowns.firstLoadMillis = 0;
}
@@ -449,7 +457,7 @@ public class MiningOverlay extends TextTabOverlay {
}
if (starCultDisplay) {
- if(overlayStrings == null) overlayStrings = new ArrayList<>();
+ if (overlayStrings == null) overlayStrings = new ArrayList<>();
if (!NotEnoughUpdates.INSTANCE.config.mining.starCultDisplayOnlyShowTab ||
lastTabState) {
@@ -467,7 +475,7 @@ public class MiningOverlay extends TextTabOverlay {
}
if (forgeDisplay) {
- if(overlayStrings == null) overlayStrings = new ArrayList<>();
+ if (overlayStrings == null) overlayStrings = new ArrayList<>();
if (!NotEnoughUpdates.INSTANCE.config.mining.forgeDisplayOnlyShowTab ||
lastTabState) {
@@ -484,14 +492,97 @@ public class MiningOverlay extends TextTabOverlay {
if (overlayStrings != null && overlayStrings.isEmpty()) overlayStrings = null;
}
+ private String getTipPart(String name) {
+ int settings = NotEnoughUpdates.INSTANCE.config.mining.commissionTaskTips;
+ if (settings == 0) return "";
+
+ if (!Minecraft.getMinecraft().thePlayer.isSneaking() && settings == 1) return "";
+
+ String tip = getTip(name);
+ if (tip == null) return " §4???";
+
+ return " §8§l>§7 " + tip;
+ }
+
+ private String getTip(String name) {
+ if (SBInfo.getInstance().getLocation().equals("mining_3")) { // Dwarven Mines
+ if (name.equals("First Event")) return "Participate in any §6Mining Event";
+
+ // During Event
+ if (name.equals("Lucky Raffle")) return "Collect 20 Raffle Tickets during §6Raffle Event";
+ if (name.equals("Goblin Raid Slayer")) return "Kill 20 Goblins during §6Goblin Raid Event";
+ if (name.equals("Raffle")) return "Participate in §6Raffle Event";
+ if (name.equals("Goblin Raid")) return "Participate in §6Goblin Raid event";
+ if (name.equals("2x Mithril Powder Collector")) return "Collect 500 Mithril Powder during §62x Powder event";
+
+ // Slay
+ if (name.equals("Ice Walker Slayer")) return "Kill 50 Ice Walkers §b(Great Ice Wall)";
+ if (name.equals("Goblin Slayer")) return "Kill 100 Goblins §b(Goblin Borrows)";
+ if (name.equals("Golden Goblin Slayer")) return "Kill 1 Golden Goblin (anywhere)";
+ if (name.equals("Star Sentry Puncher")) return "Damage Star Sentries 10 times (anywhere)";
+
+ // Mining
+ if (name.equals("Mithril Miner")) return "Break 500 Mithril (anywhere)";
+ if (name.equals("Titanium Miner")) return "Break 15 Titanium (anywhere)";
+
+ if (name.equals("Cliffside Veins Mithril")) return "Break 350 Mithril §b(Cliffside Veins)";
+ if (name.equals("Royal Mines Mithril")) return "Break 350 Mithril §b(Royal Mines)";
+ if (name.equals("Lava Springs Mithril")) return "Break 350 Mithril §b(Lava Springs)";
+ if (name.equals("Rampart's Quarry Mithril")) return "Break 350 Mithril §b(Rampart's Quarry)";
+ if (name.equals("Upper Mines Mithril")) return "Break 350 Mithril §b(Upper Mines)";
+
+ if (name.equals("Cliffside Veins Titanium")) return "Break 10 Titanium §b(Cliffside Veins)";
+ if (name.equals("Lava Springs Titanium")) return "Break 10 Titanium §b(Lava Springs)";
+ if (name.equals("Royal Mines Titanium")) return "Break 10 Titanium §b(Royal Mines)";
+ if (name.equals("Rampart's Quarry Titanium")) return "Break 10 Titanium §b(Rampart's Quarry)";
+ if (name.equals("Upper Mines Titanium")) return "Break 10 Titanium §b(Upper Mines)";
+
+ } else if (SBInfo.getInstance().getLocation().equals("crystal_hollows")) { // Crystal Hollows
+ if (name.equals("Chest Looter")) return "Open 3 chests";
+ if (name.equals("Hard Stone Miner")) return "Break 1,000 Hard Stone";
+
+ String jungle = " §a(Jungle)";
+ String goblin = " §6(Golbin Holdout)";
+ String mithril = " §b(Mithril Deposits)";
+ String precursor = " §8(Precursor Remenants)";
+ String magma = " §c(Magma Fields)";
+
+ if (name.equals("Goblin Slayer")) return "Kill 13 Goblins" + goblin;
+ if (name.equals("Sludge Slayer")) return "Kill 25 Sludges" + jungle;
+ if (name.equals("Thyst Slayer")) return "Kill 5 Thysts, when breaking Amethysts" + jungle;
+ if (name.equals("Boss Corleone Slayer")) return "Find and kill Corleone" + mithril;
+ if (name.equals("Yog Slayer")) return "Kill 13 Yogs" + magma;
+ if (name.equals("Automaton Slayer")) return "Kill 13 Automatons" + precursor;
+ if (name.equals("Team Treasurite Member Slayer")) return "Kill 13 Team Treasurite Members" + mithril;
+
+ if (name.endsWith("Crystal Hunter")) {
+ if (name.startsWith("Amethyst")) return "Temple Jump & Run" + jungle;
+ if (name.startsWith("Jade")) return "4 weapons from Mines of Divan" + mithril;
+ if (name.startsWith("Amber")) return "King and Queen" + goblin;
+ if (name.startsWith("Sapphire")) return "6 Robot Parts in Precursor City" + precursor;
+ if (name.startsWith("Topaz")) return "Kill Bal" + magma;
+ }
+
+ if (name.endsWith("Gemstone Collector")) {
+ if (name.startsWith("Amber")) return "Break orange glass" + goblin;
+ if (name.startsWith("Sapphire")) return "Break blue glass" + precursor;
+ if (name.startsWith("Jade")) return "Break green glass" + mithril;
+ if (name.startsWith("Amethyst")) return "Break purple glass" + jungle;
+ if (name.startsWith("Ruby")) return "Break red glass (anywhere)";
+ if (name.startsWith("Topaz")) return "Break yellow glass" + magma;
+ }
+ }
+
+ return null;
+ }
+
private static List getForgeStrings(List forgeItems) {
List forgeString = new ArrayList<>();
long currentTimeMillis = System.currentTimeMillis();
forgeIDLabel:
for (int i = 0; i < 5; i++) {
- for (ForgeItem forgeItem : forgeItems) {
- if (forgeItem.forgeID == i) {
- ForgeItem item = forgeItem;
+ for (ForgeItem item : forgeItems) {
+ if (item.forgeID == i) {
if (NotEnoughUpdates.INSTANCE.config.mining.forgeDisplay == 0) {
if (item.status == 2 && item.finishTime < currentTimeMillis) {
@@ -541,7 +632,6 @@ public class MiningOverlay extends TextTabOverlay {
}
}
forgeItems.add(item);
- return;
}
public static class ForgeItem {
@@ -617,6 +707,9 @@ public class MiningOverlay extends TextTabOverlay {
if (!NotEnoughUpdates.INSTANCE.config.mining.dwarvenOverlayIcons) return;
GlStateManager.enableDepth();
+ // No icon for the tip line
+ if (line.contains(">")) return;
+
ItemStack icon = null;
String cleaned = Utils.cleanColour(line);
String beforeColon = cleaned.split(":")[0];
--
cgit
From d9f3fa267bbb4ab679f9c4c043ca98c911bdd86b Mon Sep 17 00:00:00 2001
From: NopoTheGamer <40329022+NopoTheGamer@users.noreply.github.com>
Date: Sun, 22 Jan 2023 18:58:46 +1100
Subject: Fix [NEU] API is down not showing (#558)
---
.../java/io/github/moulberry/notenoughupdates/ItemPriceInformation.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
(limited to 'src/main/java')
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/ItemPriceInformation.java b/src/main/java/io/github/moulberry/notenoughupdates/ItemPriceInformation.java
index 754e2dc3..8096c2d5 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/ItemPriceInformation.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/ItemPriceInformation.java
@@ -208,7 +208,7 @@ public class ItemPriceInformation {
}
return added;
- } else if (auctionItem) {
+ } else if (auctionItem && !auctionInfoErrored) {
List lines = NotEnoughUpdates.INSTANCE.config.tooltipTweaks.priceInfoAuc;
boolean added = false;
--
cgit
From 9b3672d5446540b41eeb8f217cfc352dfb45c2d5 Mon Sep 17 00:00:00 2001
From: Lulonaut
Date: Wed, 25 Jan 2023 19:34:16 +0100
Subject: Cancel wardrobe hotkey inputs (#563)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Co-authored-by: Lulonaut
Co-authored-by: Roman / Linnea Gräf
---
.../miscfeatures/WardrobeMouseButtons.kt | 17 ++++++++++++++---
1 file changed, 14 insertions(+), 3 deletions(-)
(limited to 'src/main/java')
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/WardrobeMouseButtons.kt b/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/WardrobeMouseButtons.kt
index 4e99f5a7..d34f3b5e 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/WardrobeMouseButtons.kt
+++ b/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/WardrobeMouseButtons.kt
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2022 NotEnoughUpdates contributors
+ * Copyright (C) 2022-2023 NotEnoughUpdates contributors
*
* This file is part of NotEnoughUpdates.
*
@@ -41,8 +41,17 @@ class WardrobeMouseButtons {
private var lastClick = -1L
@SubscribeEvent
- fun onGui(event: GuiScreenEvent) {
- if (!NotEnoughUpdates.INSTANCE.config.wardrobeKeybinds.enableWardrobeKeybinds) return
+ fun onGuiKeyboardInput(event: GuiScreenEvent.KeyboardInputEvent.Pre) {
+ checkKeybinds(event)
+ }
+
+ @SubscribeEvent
+ fun onGuiMouseInput(event: GuiScreenEvent.MouseInputEvent.Pre) {
+ checkKeybinds(event)
+ }
+
+ private fun checkKeybinds(event: GuiScreenEvent) {
+ if (!NotEnoughUpdates.INSTANCE.config.wardrobeKeybinds.enableWardrobeKeybinds || !NotEnoughUpdates.INSTANCE.hasSkyblockScoreboard()) return
val gui = event.gui as? GuiChest ?: return
if (!Utils.getOpenChestName().contains("Wardrobe")) return
@@ -51,9 +60,11 @@ class WardrobeMouseButtons {
if (System.currentTimeMillis() - lastClick > 300) {
Utils.sendLeftMouseClick(gui.inventorySlots.windowId, 36 + i)
lastClick = System.currentTimeMillis()
+ event.isCanceled = true
}
break
}
}
}
+
}
--
cgit
From e36e1ea74ae6e06ad92d88ea480586dc531bc909 Mon Sep 17 00:00:00 2001
From: Lulonaut
Date: Wed, 25 Jan 2023 19:35:13 +0100
Subject: Do not always include essence profit in Croesus overlay (#566)
---
.../notenoughupdates/miscfeatures/DungeonNpcProfitOverlay.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
(limited to 'src/main/java')
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/DungeonNpcProfitOverlay.java b/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/DungeonNpcProfitOverlay.java
index 34a40c2f..28ce10f1 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/DungeonNpcProfitOverlay.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/DungeonNpcProfitOverlay.java
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2022 NotEnoughUpdates contributors
+ * Copyright (C) 2022-2023 NotEnoughUpdates contributors
*
* This file is part of NotEnoughUpdates.
*
@@ -334,7 +334,7 @@ public class DungeonNpcProfitOverlay {
}
}
}
- } else if (essenceMatcher.matches()) {
+ } else if (essenceMatcher.matches() && NotEnoughUpdates.INSTANCE.config.dungeons.useEssenceCostFromBazaar) {
String essenceType = essenceMatcher.group("essenceType");
String essenceAmount = essenceMatcher.group("essenceAmount");
if (essenceType == null || essenceAmount == null) {
--
cgit
From d1eb2d2b2820112d1ca03cecb0e3533fabbc0fec Mon Sep 17 00:00:00 2001
From: hannibal2 <24389977+hannibal002@users.noreply.github.com>
Date: Wed, 25 Jan 2023 19:35:23 +0100
Subject: Recipe hotkeys in experimentation table. (#568)
Prevent recipe hotkeys (R + U) when inside the experimentation table.
Co-authored-by: hannibal2 <24389977+hannibal00212@users.noreply.github.com>
---
.../io/github/moulberry/notenoughupdates/recipes/CraftingOverlay.java | 3 +++
1 file changed, 3 insertions(+)
(limited to 'src/main/java')
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/recipes/CraftingOverlay.java b/src/main/java/io/github/moulberry/notenoughupdates/recipes/CraftingOverlay.java
index 004ea372..bd45f3e1 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/recipes/CraftingOverlay.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/recipes/CraftingOverlay.java
@@ -20,6 +20,7 @@
package io.github.moulberry.notenoughupdates.recipes;
import io.github.moulberry.notenoughupdates.NEUManager;
+import io.github.moulberry.notenoughupdates.miscfeatures.EnchantingSolvers;
import io.github.moulberry.notenoughupdates.mixins.AccessorGuiContainer;
import io.github.moulberry.notenoughupdates.util.Utils;
import net.minecraft.client.Minecraft;
@@ -114,6 +115,8 @@ public class CraftingOverlay {
if (!Keyboard.getEventKeyState() ||
(Keyboard.getEventKey() != Keyboard.KEY_U && Keyboard.getEventKey() != Keyboard.KEY_R))
return;
+ if (EnchantingSolvers.currentSolver != EnchantingSolvers.SolverType.NONE) return;
+
runIfCraftingOverlayIsPresent(event.gui, (guiChest, chest) -> {
int mouseX = Utils.getMouseX();
int mouseY = Utils.getMouseY();
--
cgit
From f1ce88fb8e98b41a10ba374d32cb312b949ba8ef Mon Sep 17 00:00:00 2001
From: NopoTheGamer <40329022+NopoTheGamer@users.noreply.github.com>
Date: Thu, 26 Jan 2023 05:38:57 +1100
Subject: Fixed double register of view uses or recipes (#552)
* Fixed double register of view uses or recipes
* !
---
src/main/java/io/github/moulberry/notenoughupdates/NEUOverlay.java | 2 +-
.../io/github/moulberry/notenoughupdates/miscgui/GuiItemRecipe.java | 1 -
2 files changed, 1 insertion(+), 2 deletions(-)
(limited to 'src/main/java')
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/NEUOverlay.java b/src/main/java/io/github/moulberry/notenoughupdates/NEUOverlay.java
index 7159ef89..cb0f3fc0 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/NEUOverlay.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/NEUOverlay.java
@@ -1046,7 +1046,7 @@ public class NEUOverlay extends Gui {
}
}
- if (Keyboard.getEventKeyState()) {
+ if (!Keyboard.getEventKeyState()) {
if (!NotEnoughUpdates.INSTANCE.config.toolbar.searchBar) {
searchBarHasFocus = false;
}
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/miscgui/GuiItemRecipe.java b/src/main/java/io/github/moulberry/notenoughupdates/miscgui/GuiItemRecipe.java
index aa977413..e81834d3 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/miscgui/GuiItemRecipe.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/miscgui/GuiItemRecipe.java
@@ -28,7 +28,6 @@ import io.github.moulberry.notenoughupdates.recipes.RecipeHistory;
import io.github.moulberry.notenoughupdates.recipes.RecipeSlot;
import io.github.moulberry.notenoughupdates.recipes.RecipeType;
import io.github.moulberry.notenoughupdates.util.Utils;
-import lombok.var;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.FontRenderer;
import net.minecraft.client.gui.GuiButton;
--
cgit
From f1a5ba28e92da4f46b39da27277b1c8b7a6ec4bb Mon Sep 17 00:00:00 2001
From: Roman / Linnea Gräf
Date: Wed, 25 Jan 2023 19:43:51 +0100
Subject: Annotation registering (and also some comptime performance) (#554)
---
.../moulberry/notenoughupdates/NEUManager.java | 4 +-
.../notenoughupdates/NotEnoughUpdates.java | 90 +---------------------
.../notenoughupdates/cosmetics/CapeManager.java | 2 +
.../notenoughupdates/dungeons/DungeonMap.java | 2 +
.../listener/OldAnimationChecker.java | 2 +
.../loader/KotlinLoadingTweaker.java | 2 +-
.../miscfeatures/AbiphoneContactHelper.java | 2 +
.../miscfeatures/AbiphoneFavourites.java | 2 +
.../miscfeatures/AbiphoneWarning.java | 2 +
.../notenoughupdates/miscfeatures/AntiCoopAdd.java | 2 +
.../miscfeatures/AuctionBINWarning.java | 2 +
.../miscfeatures/AuctionProfit.java | 2 +
.../miscfeatures/BetterContainers.java | 2 +
.../miscfeatures/CrystalOverlay.java | 2 +
.../miscfeatures/CrystalWishingCompassSolver.java | 2 +
.../miscfeatures/CustomItemEffects.java | 2 +
.../miscfeatures/DungeonNpcProfitOverlay.java | 2 +
.../miscfeatures/DwarvenMinesWaypoints.java | 2 +
.../miscfeatures/EnchantingSolvers.java | 2 +
.../notenoughupdates/miscfeatures/FairySouls.java | 2 +
.../miscfeatures/FishingHelper.java | 2 +
.../miscfeatures/ItemCooldowns.java | 2 +
.../miscfeatures/ItemCustomizeManager.java | 21 +----
.../notenoughupdates/miscfeatures/MiningStuff.java | 2 +
.../miscfeatures/NullzeeSphere.java | 2 +
.../miscfeatures/PowerStoneStatsDisplay.java | 2 +
.../notenoughupdates/miscfeatures/SlotLocking.java | 2 +
.../notenoughupdates/miscfeatures/SunTzu.java | 2 +
.../miscfeatures/WardrobeMouseButtons.kt | 2 +
.../miscfeatures/WitherCloakChanger.java | 2 +
.../customblockzones/CustomBiomes.java | 3 +
.../customblockzones/DwarvenMinesTextures.java | 2 +
.../item/enchants/EnchantStyleCustomizer.java | 2 +
.../miscfeatures/world/EnderNodeHighlighter.java | 2 +
.../world/FrozenTreasuresHighlighter.java | 2 +
.../world/GlowingMushroomHighlighter.java | 2 +
.../notenoughupdates/miscgui/CalendarOverlay.java | 2 +
.../miscgui/InventoryStorageSelector.java | 3 +-
.../notenoughupdates/miscgui/SignCalculator.java | 2 +
.../miscgui/TrophyRewardOverlay.java | 2 +
.../miscgui/minionhelper/MinionHelperManager.java | 2 +
.../overlays/EquipmentOverlay.java | 2 +
.../notenoughupdates/overlays/FuelBar.java | 2 +
.../moulberry/notenoughupdates/util/Constants.java | 2 +
.../moulberry/notenoughupdates/util/SBInfo.java | 2 +
.../moulberry/notenoughupdates/util/TitleUtil.java | 2 +
.../notenoughupdates/util/XPInformation.java | 2 +
47 files changed, 96 insertions(+), 109 deletions(-)
(limited to 'src/main/java')
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/NEUManager.java b/src/main/java/io/github/moulberry/notenoughupdates/NEUManager.java
index ce15b09a..5c3083a3 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/NEUManager.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/NEUManager.java
@@ -748,7 +748,7 @@ public class NEUManager {
}
}
- public String getUUIDFromNBT(NBTTagCompound tag) {
+ public static String getUUIDFromNBT(NBTTagCompound tag) {
String uuid = null;
if (tag != null && tag.hasKey("ExtraAttributes", 10)) {
NBTTagCompound ea = tag.getCompoundTag("ExtraAttributes");
@@ -965,7 +965,7 @@ public class NEUManager {
.resolveInternalName();
}
- public String getUUIDForItem(ItemStack stack) {
+ public static String getUUIDForItem(ItemStack stack) {
if (stack == null) return null;
NBTTagCompound tag = stack.getTagCompound();
return getUUIDFromNBT(tag);
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/NotEnoughUpdates.java b/src/main/java/io/github/moulberry/notenoughupdates/NotEnoughUpdates.java
index d6ae6219..a4643eb5 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/NotEnoughUpdates.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/NotEnoughUpdates.java
@@ -23,74 +23,35 @@ import com.google.common.collect.Sets;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.google.gson.JsonObject;
+import io.github.moulberry.notenoughupdates.autosubscribe.AutoLoad;
+import io.github.moulberry.notenoughupdates.autosubscribe.NEUAutoSubscribe;
import io.github.moulberry.notenoughupdates.commands.Commands;
import io.github.moulberry.notenoughupdates.core.BackgroundBlur;
-import io.github.moulberry.notenoughupdates.cosmetics.CapeManager;
import io.github.moulberry.notenoughupdates.cosmetics.ShaderManager;
-import io.github.moulberry.notenoughupdates.dungeons.DungeonMap;
import io.github.moulberry.notenoughupdates.listener.ChatListener;
import io.github.moulberry.notenoughupdates.listener.ItemTooltipEssenceShopListener;
import io.github.moulberry.notenoughupdates.listener.ItemTooltipListener;
import io.github.moulberry.notenoughupdates.listener.ItemTooltipRngListener;
import io.github.moulberry.notenoughupdates.listener.NEUEventListener;
-import io.github.moulberry.notenoughupdates.listener.OldAnimationChecker;
import io.github.moulberry.notenoughupdates.listener.RenderListener;
import io.github.moulberry.notenoughupdates.listener.WorldListener;
-import io.github.moulberry.notenoughupdates.miscfeatures.AbiphoneContactHelper;
-import io.github.moulberry.notenoughupdates.miscfeatures.AbiphoneFavourites;
-import io.github.moulberry.notenoughupdates.miscfeatures.AbiphoneWarning;
-import io.github.moulberry.notenoughupdates.miscfeatures.AntiCoopAdd;
-import io.github.moulberry.notenoughupdates.miscfeatures.AuctionBINWarning;
-import io.github.moulberry.notenoughupdates.miscfeatures.AuctionProfit;
-import io.github.moulberry.notenoughupdates.miscfeatures.BetterContainers;
-import io.github.moulberry.notenoughupdates.miscfeatures.CrystalOverlay;
-import io.github.moulberry.notenoughupdates.miscfeatures.CrystalWishingCompassSolver;
-import io.github.moulberry.notenoughupdates.miscfeatures.CustomItemEffects;
import io.github.moulberry.notenoughupdates.miscfeatures.CustomSkulls;
-import io.github.moulberry.notenoughupdates.miscfeatures.DungeonNpcProfitOverlay;
-import io.github.moulberry.notenoughupdates.miscfeatures.DwarvenMinesWaypoints;
-import io.github.moulberry.notenoughupdates.miscfeatures.EnchantingSolvers;
import io.github.moulberry.notenoughupdates.miscfeatures.FairySouls;
-import io.github.moulberry.notenoughupdates.miscfeatures.FishingHelper;
-import io.github.moulberry.notenoughupdates.miscfeatures.ItemCooldowns;
import io.github.moulberry.notenoughupdates.miscfeatures.ItemCustomizeManager;
-import io.github.moulberry.notenoughupdates.miscfeatures.MiningStuff;
import io.github.moulberry.notenoughupdates.miscfeatures.NPCRetexturing;
import io.github.moulberry.notenoughupdates.miscfeatures.Navigation;
-import io.github.moulberry.notenoughupdates.miscfeatures.NullzeeSphere;
import io.github.moulberry.notenoughupdates.miscfeatures.PetInfoOverlay;
-import io.github.moulberry.notenoughupdates.miscfeatures.PowerStoneStatsDisplay;
import io.github.moulberry.notenoughupdates.miscfeatures.SlotLocking;
import io.github.moulberry.notenoughupdates.miscfeatures.StorageManager;
-import io.github.moulberry.notenoughupdates.miscfeatures.SunTzu;
-import io.github.moulberry.notenoughupdates.miscfeatures.WardrobeMouseButtons;
-import io.github.moulberry.notenoughupdates.miscfeatures.WitherCloakChanger;
-import io.github.moulberry.notenoughupdates.miscfeatures.customblockzones.CustomBiomes;
import io.github.moulberry.notenoughupdates.miscfeatures.customblockzones.CustomBlockSounds;
-import io.github.moulberry.notenoughupdates.miscfeatures.customblockzones.DwarvenMinesTextures;
-import io.github.moulberry.notenoughupdates.miscfeatures.item.enchants.EnchantStyleCustomizer;
import io.github.moulberry.notenoughupdates.miscfeatures.updater.AutoUpdater;
-import io.github.moulberry.notenoughupdates.miscfeatures.world.EnderNodeHighlighter;
-import io.github.moulberry.notenoughupdates.miscfeatures.world.FrozenTreasuresHighlighter;
-import io.github.moulberry.notenoughupdates.miscfeatures.world.GlowingMushroomHighlighter;
-import io.github.moulberry.notenoughupdates.miscgui.CalendarOverlay;
-import io.github.moulberry.notenoughupdates.miscgui.InventoryStorageSelector;
-import io.github.moulberry.notenoughupdates.miscgui.SignCalculator;
-import io.github.moulberry.notenoughupdates.miscgui.TrophyRewardOverlay;
-import io.github.moulberry.notenoughupdates.miscgui.minionhelper.MinionHelperManager;
import io.github.moulberry.notenoughupdates.mixins.AccessorMinecraft;
import io.github.moulberry.notenoughupdates.oneconfig.IOneConfigCompat;
import io.github.moulberry.notenoughupdates.options.NEUConfig;
-import io.github.moulberry.notenoughupdates.overlays.EquipmentOverlay;
-import io.github.moulberry.notenoughupdates.overlays.FuelBar;
import io.github.moulberry.notenoughupdates.overlays.OverlayManager;
import io.github.moulberry.notenoughupdates.profileviewer.ProfileViewer;
import io.github.moulberry.notenoughupdates.recipes.RecipeGenerator;
-import io.github.moulberry.notenoughupdates.util.Constants;
-import io.github.moulberry.notenoughupdates.util.SBInfo;
-import io.github.moulberry.notenoughupdates.util.TitleUtil;
import io.github.moulberry.notenoughupdates.util.Utils;
-import io.github.moulberry.notenoughupdates.util.XPInformation;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.FontRenderer;
import net.minecraft.client.gui.GuiScreen;
@@ -130,6 +91,7 @@ import java.nio.charset.StandardCharsets;
import java.util.HashMap;
import java.util.Set;
+@NEUAutoSubscribe
@Mod(
modid = NotEnoughUpdates.MODID, version = NotEnoughUpdates.VERSION, clientSideOnly = true, useMetadata = true,
guiFactory = "io.github.moulberry.notenoughupdates.core.config.MoulConfigGuiForgeInterop")
@@ -297,62 +259,18 @@ public class NotEnoughUpdates {
IOneConfigCompat.getInstance().ifPresent(it -> it.initConfig(config, this::saveConfig));
- MinecraftForge.EVENT_BUS.register(this);
MinecraftForge.EVENT_BUS.register(new NEUEventListener(this));
MinecraftForge.EVENT_BUS.register(new RecipeGenerator(this));
- MinecraftForge.EVENT_BUS.register(CapeManager.getInstance());
- //MinecraftForge.EVENT_BUS.register(new SBGamemodes());
- MinecraftForge.EVENT_BUS.register(new EnchantingSolvers());
- MinecraftForge.EVENT_BUS.register(new CalendarOverlay());
- MinecraftForge.EVENT_BUS.register(SBInfo.getInstance());
- MinecraftForge.EVENT_BUS.register(CustomItemEffects.INSTANCE);
- MinecraftForge.EVENT_BUS.register(new Constants());
- MinecraftForge.EVENT_BUS.register(new DungeonMap());
- MinecraftForge.EVENT_BUS.register(new SunTzu());
- MinecraftForge.EVENT_BUS.register(new WitherCloakChanger());
- MinecraftForge.EVENT_BUS.register(new MiningStuff());
- MinecraftForge.EVENT_BUS.register(FairySouls.getInstance());
- MinecraftForge.EVENT_BUS.register(new CrystalOverlay());
- MinecraftForge.EVENT_BUS.register(new ItemCooldowns());
- MinecraftForge.EVENT_BUS.register(new DwarvenMinesWaypoints());
- MinecraftForge.EVENT_BUS.register(new FuelBar());
- MinecraftForge.EVENT_BUS.register(new AuctionProfit());
- MinecraftForge.EVENT_BUS.register(new DungeonNpcProfitOverlay());
- MinecraftForge.EVENT_BUS.register(XPInformation.getInstance());
MinecraftForge.EVENT_BUS.register(OverlayManager.petInfoOverlay);
MinecraftForge.EVENT_BUS.register(OverlayManager.timersOverlay);
- MinecraftForge.EVENT_BUS.register(new NullzeeSphere());
- MinecraftForge.EVENT_BUS.register(InventoryStorageSelector.getInstance());
- MinecraftForge.EVENT_BUS.register(SlotLocking.getInstance());
- MinecraftForge.EVENT_BUS.register(FishingHelper.getInstance());
- MinecraftForge.EVENT_BUS.register(CrystalWishingCompassSolver.getInstance());
- MinecraftForge.EVENT_BUS.register(new DwarvenMinesTextures());
- MinecraftForge.EVENT_BUS.register(EquipmentOverlay.INSTANCE);
- MinecraftForge.EVENT_BUS.register(CustomBiomes.INSTANCE);
MinecraftForge.EVENT_BUS.register(new ChatListener(this));
MinecraftForge.EVENT_BUS.register(new ItemTooltipListener(this));
MinecraftForge.EVENT_BUS.register(new ItemTooltipRngListener(this));
MinecraftForge.EVENT_BUS.register(new ItemTooltipEssenceShopListener(this));
MinecraftForge.EVENT_BUS.register(new RenderListener(this));
- MinecraftForge.EVENT_BUS.register(new OldAnimationChecker());
- MinecraftForge.EVENT_BUS.register(new SignCalculator());
- MinecraftForge.EVENT_BUS.register(TrophyRewardOverlay.getInstance());
- MinecraftForge.EVENT_BUS.register(PowerStoneStatsDisplay.getInstance());
- MinecraftForge.EVENT_BUS.register(AntiCoopAdd.getInstance());
- MinecraftForge.EVENT_BUS.register(AbiphoneWarning.getInstance());
- MinecraftForge.EVENT_BUS.register(new BetterContainers());
- MinecraftForge.EVENT_BUS.register(AuctionBINWarning.getInstance());
- MinecraftForge.EVENT_BUS.register(MinionHelperManager.getInstance());
MinecraftForge.EVENT_BUS.register(navigation);
- MinecraftForge.EVENT_BUS.register(new GlowingMushroomHighlighter());
MinecraftForge.EVENT_BUS.register(new WorldListener(this));
- MinecraftForge.EVENT_BUS.register(EnchantStyleCustomizer.INSTANCE);
- MinecraftForge.EVENT_BUS.register(TitleUtil.getInstance());
- MinecraftForge.EVENT_BUS.register(EnderNodeHighlighter.getInstance());
- MinecraftForge.EVENT_BUS.register(FrozenTreasuresHighlighter.getInstance());
- MinecraftForge.EVENT_BUS.register(AbiphoneFavourites.getInstance());
- MinecraftForge.EVENT_BUS.register(AbiphoneContactHelper.getInstance());
- MinecraftForge.EVENT_BUS.register(new WardrobeMouseButtons());
+ AutoLoad.INSTANCE.provide(supplier -> MinecraftForge.EVENT_BUS.register(supplier.get()));
if (Minecraft.getMinecraft().getResourceManager() instanceof IReloadableResourceManager) {
IReloadableResourceManager manager = (IReloadableResourceManager) Minecraft.getMinecraft().getResourceManager();
diff --git a/src/main/java/io/