aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMoulberry <jjenour@student.unimelb.edu.au>2021-09-02 14:09:31 +0930
committerGitHub <noreply@github.com>2021-09-02 14:09:31 +0930
commit81eea6bf1f653fa194735d892b40614389975dd3 (patch)
treea955e0d03401302332c743f6c396184e45c94c80 /src
parent05428d1ccb15f58ccbdb4b14eb9e10b61b0477cc (diff)
parent05d6207281e18980b8a28046621c741fa81c1606 (diff)
downloadNotEnoughUpdates-81eea6bf1f653fa194735d892b40614389975dd3.tar.gz
NotEnoughUpdates-81eea6bf1f653fa194735d892b40614389975dd3.tar.bz2
NotEnoughUpdates-81eea6bf1f653fa194735d892b40614389975dd3.zip
Merge pull request #226 from DoKM/master
Pre31 update
Diffstat (limited to 'src')
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/ItemPriceInformation.java9
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/NEUApi.java10
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/NEUEventListener.java566
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/NEUManager.java85
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/NEUOverlay.java78
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/NotEnoughUpdates.java162
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/auction/APIManager.java8
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/auction/CustomAH.java16
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/core/util/render/RenderUtils.java85
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/cosmetics/CapeManager.java6
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/cosmetics/GuiCosmetics.java48
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/cosmetics/NEUCape.java61
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/dungeons/DungeonMap.java5
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/dungeons/DungeonWin.java11
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/CrystalMetalDetectorSolver.java126
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/CustomItemEffects.java138
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/CustomSkulls.java3
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/DwarvenMinesWaypoints.java88
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/FairySouls.java134
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/ItemCooldowns.java4
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/PetInfoOverlay.java4
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/SlotLocking.java42
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/StorageManager.java44
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/miscgui/AccessoryBagOverlay.java18
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/miscgui/GuiCustomEnchant.java3
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/miscgui/GuiEnchantColour.java228
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/miscgui/GuiInvButtonEditor.java84
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/miscgui/GuiItemCustomize.java3
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/miscgui/HelpGUI.java189
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/miscgui/StorageOverlay.java59
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/miscgui/tutorials/NeuConfigTutorial.java9
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/miscgui/tutorials/NeuTutorial.java127
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/miscgui/tutorials/TutorialBase.java319
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinEntityPlayerSP.java2
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinGuiContainer.java11
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinInventoryPlayer.java12
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinMinecraft.java11
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinRendererLivingEntity.java4
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/options/NEUConfig.java57
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/options/seperateSections/ItemOverlays.java91
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/options/seperateSections/Mining.java336
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/options/seperateSections/Misc.java22
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/options/seperateSections/SlotLocking.java13
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/options/seperateSections/Toolbar.java40
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/options/seperateSections/TooltipTweaks.java37
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/overlays/BonemerangOverlay.java118
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/overlays/CraftingOverlay.java118
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/overlays/CrystalHollowOverlay.java403
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/overlays/MiningOverlay.java551
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/overlays/OverlayManager.java65
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/overlays/TimersOverlay.java35
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/profileviewer/GuiProfileViewer.java458
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/profileviewer/PlayerStats.java4
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/profileviewer/ProfileViewer.java39
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/util/HypixelApi.java5
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/util/SBInfo.java17
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/util/Utils.java134
-rw-r--r--src/main/resources/assets/notenoughupdates/invbuttons/expanded_inventory.pngbin2494 -> 0 bytes
-rw-r--r--src/main/resources/assets/notenoughupdates/invbuttons/presets.json892
-rw-r--r--src/main/resources/assets/notenoughupdates/pv_elements.pngbin5129 -> 3030 bytes
-rw-r--r--src/main/resources/assets/notenoughupdates/pv_ironman.pngbin0 -> 235 bytes
-rw-r--r--src/main/resources/assets/notenoughupdates/ss_small/ss1-0.jpgbin148110 -> 0 bytes
-rw-r--r--src/main/resources/assets/notenoughupdates/ss_small/ss10-0.jpgbin57284 -> 0 bytes
-rw-r--r--src/main/resources/assets/notenoughupdates/ss_small/ss11-0.jpgbin56257 -> 0 bytes
-rw-r--r--src/main/resources/assets/notenoughupdates/ss_small/ss12-0.jpgbin57416 -> 0 bytes
-rw-r--r--src/main/resources/assets/notenoughupdates/ss_small/ss13-0.jpgbin83136 -> 0 bytes
-rw-r--r--src/main/resources/assets/notenoughupdates/ss_small/ss14-0.jpgbin74904 -> 0 bytes
-rw-r--r--src/main/resources/assets/notenoughupdates/ss_small/ss15-0.jpgbin66785 -> 0 bytes
-rw-r--r--src/main/resources/assets/notenoughupdates/ss_small/ss16-0.jpgbin72065 -> 0 bytes
-rw-r--r--src/main/resources/assets/notenoughupdates/ss_small/ss17-0.jpgbin62715 -> 0 bytes
-rw-r--r--src/main/resources/assets/notenoughupdates/ss_small/ss18-0.jpgbin30420 -> 0 bytes
-rw-r--r--src/main/resources/assets/notenoughupdates/ss_small/ss2-0.jpgbin94161 -> 0 bytes
-rw-r--r--src/main/resources/assets/notenoughupdates/ss_small/ss3-0.jpgbin96250 -> 0 bytes
-rw-r--r--src/main/resources/assets/notenoughupdates/ss_small/ss4-0.jpgbin93772 -> 0 bytes
-rw-r--r--src/main/resources/assets/notenoughupdates/ss_small/ss5-0.jpgbin95859 -> 0 bytes
-rw-r--r--src/main/resources/assets/notenoughupdates/ss_small/ss6-0.jpgbin106602 -> 0 bytes
-rw-r--r--src/main/resources/assets/notenoughupdates/ss_small/ss7-0.jpgbin127654 -> 0 bytes
-rw-r--r--src/main/resources/assets/notenoughupdates/ss_small/ss8-0.jpgbin86011 -> 0 bytes
-rw-r--r--src/main/resources/assets/notenoughupdates/ss_small/ss9-0.jpgbin69263 -> 0 bytes
-rw-r--r--src/main/resources/assets/notenoughupdates/storage_gui/storage_gui_0.pngbin12354 -> 6939 bytes
-rw-r--r--src/main/resources/assets/notenoughupdates/storage_gui/storage_gui_1.pngbin4726 -> 4859 bytes
-rw-r--r--src/main/resources/assets/notenoughupdates/storage_gui/storage_gui_2.pngbin4341 -> 4380 bytes
-rw-r--r--src/main/resources/assets/notenoughupdates/storage_gui/storage_gui_3.pngbin4417 -> 4469 bytes
-rw-r--r--src/main/resources/mixins.notenoughupdates.json3
84 files changed, 4813 insertions, 1437 deletions
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/ItemPriceInformation.java b/src/main/java/io/github/moulberry/notenoughupdates/ItemPriceInformation.java
index ff618f10..83c4b7ae 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/ItemPriceInformation.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/ItemPriceInformation.java
@@ -2,6 +2,7 @@ package io.github.moulberry.notenoughupdates;
import com.google.gson.JsonObject;
import io.github.moulberry.notenoughupdates.auction.APIManager;
+import io.github.moulberry.notenoughupdates.core.config.KeybindHelper;
import io.github.moulberry.notenoughupdates.util.Constants;
import io.github.moulberry.notenoughupdates.util.Utils;
import net.minecraft.item.ItemStack;
@@ -20,6 +21,12 @@ public class ItemPriceInformation {
}
public static boolean addToTooltip(List<String> tooltip, String internalname, ItemStack stack, boolean useStackSize) {
+ if(stack.getTagCompound().hasKey("disableNeuTooltip") && stack.getTagCompound().getBoolean("disableNeuTooltip")){
+ return false;
+ }
+ if(NotEnoughUpdates.INSTANCE.config.tooltipTweaks.disablePriceKey && !KeybindHelper.isKeyDown(NotEnoughUpdates.INSTANCE.config.tooltipTweaks.disablePriceKeyKeybind)){
+ return false;
+ }
JsonObject auctionInfo = NotEnoughUpdates.INSTANCE.manager.auctionManager.getItemAuctionInfo(internalname);
JsonObject bazaarInfo = NotEnoughUpdates.INSTANCE.manager.auctionManager.getBazaarInfo(internalname);
float lowestBinAvg = NotEnoughUpdates.INSTANCE.manager.auctionManager.getItemAvgBin(internalname);
@@ -98,6 +105,7 @@ public class ItemPriceInformation {
break;
case 4:
if(craftCost.fromRecipe) {
+ if((int)craftCost.craftCost == 0){ continue;}
if(!added) {
tooltip.add("");
added = true;
@@ -165,6 +173,7 @@ public class ItemPriceInformation {
break;
case 3:
if(craftCost.fromRecipe) {
+ if((int)craftCost.craftCost == 0){ continue;}
if(!added) {
tooltip.add("");
added = true;
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/NEUApi.java b/src/main/java/io/github/moulberry/notenoughupdates/NEUApi.java
new file mode 100644
index 00000000..56a196b4
--- /dev/null
+++ b/src/main/java/io/github/moulberry/notenoughupdates/NEUApi.java
@@ -0,0 +1,10 @@
+package io.github.moulberry.notenoughupdates;
+
+import net.minecraftforge.fml.relauncher.ReflectionHelper;
+
+public class NEUApi {
+ static boolean disableInventoryButtons = false;
+ public static void setInventoryButtonsToDisabled(){
+ disableInventoryButtons = true;
+ }
+}
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/NEUEventListener.java b/src/main/java/io/github/moulberry/notenoughupdates/NEUEventListener.java
index b849c890..48cd0e57 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/NEUEventListener.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/NEUEventListener.java
@@ -1,10 +1,7 @@
package io.github.moulberry.notenoughupdates;
import com.google.common.collect.Lists;
-import com.google.gson.JsonArray;
-import com.google.gson.JsonElement;
-import com.google.gson.JsonObject;
-import com.google.gson.JsonPrimitive;
+import com.google.gson.*;
import com.mojang.authlib.GameProfile;
import com.mojang.authlib.minecraft.MinecraftProfileTexture;
import io.github.moulberry.notenoughupdates.auction.CustomAHGui;
@@ -15,14 +12,10 @@ import io.github.moulberry.notenoughupdates.core.util.render.RenderUtils;
import io.github.moulberry.notenoughupdates.cosmetics.CapeManager;
import io.github.moulberry.notenoughupdates.dungeons.DungeonBlocks;
import io.github.moulberry.notenoughupdates.dungeons.DungeonWin;
-import io.github.moulberry.notenoughupdates.gamemodes.SBGamemodes;
import io.github.moulberry.notenoughupdates.miscfeatures.*;
import io.github.moulberry.notenoughupdates.miscgui.*;
import io.github.moulberry.notenoughupdates.options.NEUConfig;
-import io.github.moulberry.notenoughupdates.overlays.AuctionSearchOverlay;
-import io.github.moulberry.notenoughupdates.overlays.OverlayManager;
-import io.github.moulberry.notenoughupdates.overlays.RancherBootOverlay;
-import io.github.moulberry.notenoughupdates.overlays.TextOverlay;
+import io.github.moulberry.notenoughupdates.overlays.*;
import io.github.moulberry.notenoughupdates.profileviewer.GuiProfileViewer;
import io.github.moulberry.notenoughupdates.util.*;
import net.minecraft.client.Minecraft;
@@ -41,6 +34,7 @@ import net.minecraft.init.Blocks;
import net.minecraft.init.Items;
import net.minecraft.inventory.ContainerChest;
import net.minecraft.inventory.IInventory;
+import net.minecraft.inventory.Slot;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
@@ -51,6 +45,7 @@ import net.minecraftforge.client.ClientCommandHandler;
import net.minecraftforge.client.event.*;
import net.minecraftforge.event.entity.player.ItemTooltipEvent;
import net.minecraftforge.event.world.WorldEvent;
+import net.minecraftforge.fml.common.Loader;
import net.minecraftforge.fml.common.eventhandler.EventPriority;
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
import net.minecraftforge.fml.common.gameevent.TickEvent;
@@ -64,6 +59,7 @@ import java.awt.*;
import java.awt.datatransfer.StringSelection;
import java.io.File;
import java.io.IOException;
+import java.text.DecimalFormat;
import java.text.NumberFormat;
import java.util.List;
import java.util.*;
@@ -170,10 +166,12 @@ public class NEUEventListener {
@SubscribeEvent
public void onWorldLoad(WorldEvent.Unload event) {
NotEnoughUpdates.INSTANCE.saveConfig();
+ CrystalMetalDetectorSolver.reset();
}
private static long notificationDisplayMillis = 0;
private static List<String> notificationLines = null;
+ private static boolean showNotificationOverInv = false;
private static final Pattern BAD_ITEM_REGEX = Pattern.compile("x[0-9]{1,2}$");
@@ -192,18 +190,23 @@ public class NEUEventListener {
private int inventoryLoadedTicks = 0;
private String loadedInvName = "";
public static boolean inventoryLoaded = false;
-
public static void displayNotification(List<String> lines, boolean showForever) {
+ displayNotification(lines, showForever, false);
+ }
+
+ public static void displayNotification(List<String> lines, boolean showForever, boolean overInventory) {
if(showForever) {
notificationDisplayMillis = -420;
} else {
notificationDisplayMillis = System.currentTimeMillis();
}
notificationLines = lines;
+ showNotificationOverInv = overInventory;
}
@SubscribeEvent
public void onTick(TickEvent.ClientTickEvent event) {
+ Keyboard.enableRepeatEvents(false);
if(event.phase != TickEvent.Phase.START) return;
if(Minecraft.getMinecraft().theWorld == null) return;
if(Minecraft.getMinecraft().thePlayer == null) return;
@@ -340,7 +343,7 @@ public class NEUEventListener {
if(!joinedSB) {
joinedSB = true;
- SBGamemodes.loadFromFile();
+ //SBGamemodes.loadFromFile();