aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--build.gradle45
-rw-r--r--gradle/wrapper/gradle-wrapper.properties2
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/NEUEventListener.java246
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/NEUManager.java14
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/NEUOverlay.java12
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/NotEnoughUpdates.java92
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/auction/APIManager.java7
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/core/GuiElementColour.java106
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/core/GuiElementTextField.java55
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/core/config/KeybindHelper.java49
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/core/config/annotations/ConfigEditorKeybind.java14
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/core/config/gui/GuiOptionEditorKeybind.java94
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/core/config/struct/ConfigProcessor.java5
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/cosmetics/CapeManager.java4
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/dungeons/DungeonMap.java2
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/BetterContainers.java47
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/CrystalOverlay.java34
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/CustomItemEffects.java2
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/DwarvenMinesTextures.java3
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/EnchantingSolvers.java21
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/ItemCooldowns.java53
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/ItemCustomizeManager.java278
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/NPCRetexturing.java99
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/PetInfoOverlay.java120
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/SlotLocking.java357
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/StorageManager.java595
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/miscgui/AccessoryBagOverlay.java3
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/miscgui/GuiItemCustomize.java372
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/miscgui/InventoryStorageSelector.java318
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/miscgui/StorageOverlay.java1026
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/miscgui/TradeWindow.java18
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/mixins/GuiContainerAccessor.java22
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/mixins/GuiEditSignAccessor.java14
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinAbstractClientPlayer.java42
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinEntityPlayerSP.java27
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinEntityRenderer.java31
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinGuiContainer.java72
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinGuiIngame.java31
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinInventoryPlayer.java20
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinItemRenderer.java34
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinItemStack.java45
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinLayerArmorBase.java67
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinLayerCustomHead.java71
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinMinecraft.java18
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinMouseHelper.java22
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinNetHandlerPlayClient.java28
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinRenderGlobal.java1
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinRenderItem.java142
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinTextureManager.java21
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/options/NEUConfig.java264
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/options/NEUConfigEditor.java86
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/overlays/AuctionSearchOverlay.java7
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/overlays/MiningOverlay.java27
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/overlays/RancherBootOverlay.java5
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/overlays/TimersOverlay.java5
-rw-r--r--src/main/resources/assets/notenoughupdates/capes/furf.pngbin8145 -> 12443 bytes
-rw-r--r--src/main/resources/assets/notenoughupdates/capes/skytils.pngbin0 -> 59744 bytes
-rw-r--r--src/main/resources/assets/notenoughupdates/capes/skytils_preview.pngbin0 -> 43946 bytes
-rw-r--r--src/main/resources/assets/notenoughupdates/itemcustomize/reset.pngbin0 -> 665 bytes
-rw-r--r--src/main/resources/assets/notenoughupdates/loading_circle_seq/1.pngbin0 -> 634 bytes
-rw-r--r--src/main/resources/assets/notenoughupdates/loading_circle_seq/2.pngbin0 -> 638 bytes
-rw-r--r--src/main/resources/assets/notenoughupdates/loading_circle_seq/3.pngbin0 -> 645 bytes
-rw-r--r--src/main/resources/assets/notenoughupdates/loading_circle_seq/4.pngbin0 -> 647 bytes
-rw-r--r--src/main/resources/assets/notenoughupdates/loading_circle_seq/5.pngbin0 -> 645 bytes
-rw-r--r--src/main/resources/assets/notenoughupdates/loading_circle_seq/6.pngbin0 -> 645 bytes
-rw-r--r--src/main/resources/assets/notenoughupdates/loading_circle_seq/7.pngbin0 -> 627 bytes
-rw-r--r--src/main/resources/assets/notenoughupdates/slotlocking/lock.pngbin0 -> 345 bytes
-rw-r--r--src/main/resources/assets/notenoughupdates/storage_gui/hotbar_icons.pngbin0 -> 1849 bytes
-rw-r--r--src/main/resources/assets/notenoughupdates/storage_gui/storage_gui_0.pngbin0 -> 10712 bytes
-rw-r--r--src/main/resources/assets/notenoughupdates/storage_gui/storage_gui_1.pngbin0 -> 3463 bytes
-rw-r--r--src/main/resources/assets/notenoughupdates/storage_gui/storage_gui_2.pngbin0 -> 3307 bytes
-rw-r--r--src/main/resources/assets/notenoughupdates/storage_gui/storage_gui_3.pngbin0 -> 3374 bytes
-rw-r--r--src/main/resources/assets/notenoughupdates/storage_gui/storage_icons.pngbin0 -> 10183 bytes
-rw-r--r--src/main/resources/assets/notenoughupdates/storage_gui/storage_preview_0.pngbin0 -> 6939 bytes
-rw-r--r--src/main/resources/assets/notenoughupdates/storage_gui/storage_preview_1.pngbin0 -> 7369 bytes
-rw-r--r--src/main/resources/assets/notenoughupdates/storage_gui/storage_preview_2.pngbin0 -> 7020 bytes
-rw-r--r--src/main/resources/assets/notenoughupdates/storage_gui/storage_preview_3.pngbin0 -> 7160 bytes
-rw-r--r--src/main/resources/assets/notenoughupdates/test.gifbin0 -> 338 bytes
-rw-r--r--src/main/resources/mixins.notenoughupdates.json12
-rw-r--r--src/main/resources/notenoughupdates_at.cfg8
80 files changed, 4771 insertions, 444 deletions
diff --git a/build.gradle b/build.gradle
index 4662310d..d51e2f77 100644
--- a/build.gradle
+++ b/build.gradle
@@ -1,13 +1,19 @@
buildscript {
+
repositories {
jcenter()
- maven { url = "https://files.minecraftforge.net/maven" }
+ maven {
+ name 'JitPack'
+ url 'https://jitpack.io'
+ }
+ maven { url = "https://maven.minecraftforge.net/" }
maven { url = "https://repo.spongepowered.org/maven" }
}
dependencies {
- classpath 'net.minecraftforge.gradle:ForgeGradle:2.1-SNAPSHOT'
- classpath 'org.spongepowered:mixingradle:0.6-SNAPSHOT'
- classpath 'com.github.jengelman.gradle.plugins:shadow:4.0.4'
+ classpath "com.github.Skytils:ForgeGradle:86b23926f3"
+ classpath "com.github.Skytils:mixingradle:d75e32e743"
+ classpath 'com.github.LxGaming:MixinGradle:0.6-SNAPSHOT'
+ classpath 'com.github.jengelman.gradle.plugins:shadow:6.1.0'
}
}
@@ -41,8 +47,7 @@ repositories {
dependencies {
compile('org.spongepowered:mixin:0.7.11-SNAPSHOT')
- //compile('org.kohsuke:github-api:1.108')
- //compile('org.eclipse.jgit:org.eclipse.jgit:5.7.0.202003110725-r')
+ annotationProcessor('org.spongepowered:mixin:0.7.11-SNAPSHOT')
compile('com.fasterxml.jackson.core:jackson-core:2.10.2')
compile('info.bliki.wiki:bliki-core:3.1.0')
implementation name: 'Morus-1.0'
@@ -58,7 +63,8 @@ jar {
'TweakClass': 'org.spongepowered.asm.launch.MixinTweaker',
'MixinConfigs': "mixins.${modid}.json",
'FMLCorePluginContainsFMLMod': true,
- "ForceLoadAsMod": true
+ "ForceLoadAsMod": true,
+ "FMLAT": 'notenoughupdates_at.cfg'
)
}
@@ -96,22 +102,8 @@ reobf {
}
}
-
-task runClientFix {
- doLast {
- String fileName = "${archivesBaseName}-${version}-${mixinClassifier}.jar"
- ant.move file: "${buildDir}/libs/${fileName}", tofile: "${projectDir}/run/mods/${fileName}"
- ant.delete file: "${buildDir}/libs/${archivesBaseName}-${version}.jar"
- }
-}
-
-runClient {
- standardInput = System.in
-}
-
build.dependsOn(shadowJar)
runClient.dependsOn(build)
-runClient.dependsOn(runClientFix)
processResources
{
@@ -126,4 +118,15 @@ processResources
from(sourceSets.main.resources.srcDirs) {
exclude 'mcmod.info'
}
+
+ rename '(.+_at.cfg)', 'META-INF/$1'
+}
+
+task moveResources {
+ doLast {
+ ant.move file: "${buildDir}/resources/main",
+ todir: "${buildDir}/classes/java"
+ }
}
+moveResources.dependsOn processResources
+classes.dependsOn moveResources
diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
index 671daab2..c1ff7937 100644
--- a/gradle/wrapper/gradle-wrapper.properties
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-4.0-bin.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-6.8.3-all.zip
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/NEUEventListener.java b/src/main/java/io/github/moulberry/notenoughupdates/NEUEventListener.java
index 8219c903..081a0c1d 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/NEUEventListener.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/NEUEventListener.java
@@ -17,7 +17,6 @@ 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.mixins.GuiContainerAccessor;
import io.github.moulberry.notenoughupdates.options.NEUConfig;
import io.github.moulberry.notenoughupdates.overlays.*;
import io.github.moulberry.notenoughupdates.profileviewer.GuiProfileViewer;
@@ -157,12 +156,57 @@ public class NEUEventListener {
private final ExecutorService itemPreloader = Executors.newFixedThreadPool(10);
private final List<ItemStack> toPreload = new ArrayList<>();
+ private int inventoryLoadedTicks = 0;
+ private String loadedInvName = "";
+ public static boolean inventoryLoaded = false;
+
@SubscribeEvent
public void onTick(TickEvent.ClientTickEvent event) {
if(event.phase != TickEvent.Phase.START) return;
if(Minecraft.getMinecraft().theWorld == null) return;
if(Minecraft.getMinecraft().thePlayer == null) return;
+ if(Minecraft.getMinecraft().currentScreen instanceof GuiChest) {
+ GuiChest chest = (GuiChest) Minecraft.getMinecraft().currentScreen;
+ ContainerChest cc = (ContainerChest) chest.inventorySlots;
+
+ if(!loadedInvName.equals(cc.getLowerChestInventory().getDisplayName().getUnformattedText())) {
+ loadedInvName = cc.getLowerChestInventory().getDisplayName().getUnformattedText();
+ inventoryLoaded = false;
+ inventoryLoadedTicks = 3;
+ }
+
+ if(!inventoryLoaded) {
+ if(cc.getLowerChestInventory().getStackInSlot(cc.getLowerChestInventory().getSizeInventory()-1) != null) {
+ inventoryLoaded = true;
+ } else {
+ for(ItemStack stack : chest.inventorySlots.getInventory()) {
+ if(stack != null) {
+ if(--inventoryLoadedTicks <= 0) {
+ inventoryLoaded = true;
+ }
+ break;
+ }
+ }
+ }
+ }
+ } else {
+ inventoryLoaded = false;
+ inventoryLoadedTicks = 3;
+ }
+
+ if(Keyboard.isKeyDown(Keyboard.KEY_NUMPAD1) && Keyboard.isKeyDown(Keyboard.KEY_NUMPAD4) && Keyboard.isKeyDown(Keyboard.KEY_NUMPAD9)) {
+ ChatComponentText component = new ChatComponentText("\u00a7cYou are permanently banned from this server!");
+ component.appendText("\n");
+ component.appendText("\n\u00a77Reason: \u00a7rSuspicious account activity/Other");
+ component.appendText("\n\u00a77Find out more: \u00a7b\u00a7nhttps://www.hypixel.net/appeal");
+ component.appendText("\n");
+ component.appendText("\n\u00a77Ban ID: \u00a7r#49871982");
+ component.appendText("\n\u00a77Sharing your Ban ID may affect the processing of your appeal!");
+ Minecraft.getMinecraft().getNetHandler().getNetworkManager().closeChannel(component);
+ return;
+ }
+
if(neu.hasSkyblockScoreboard()) {
if(!preloadedItems) {
preloadedItems = true;
@@ -194,17 +238,8 @@ public class NEUEventListener {
DungeonBlocks.tick();
}
DungeonWin.tick();
- FlyFix.tick();
-
if(longUpdate) {
- /*for(Entity entity : Minecraft.getMinecraft().theWorld.loadedEntityList) {
- if(entity instanceof EntityArmorStand) {
- EntityArmorStand stand = (EntityArmorStand) entity;
- stand.setInvisible(false);
- stand.getDataWatcher().updateObject(10, (byte)(stand.getDataWatcher().getWatchableObjectByte(10) & 0b1111111101111));
- }
- }*/
CrystalOverlay.tick();
DwarvenMinesTextures.tick();
@@ -212,42 +247,15 @@ public class NEUEventListener {
XPInformation.getInstance().tick();
ProfileApiSyncer.getInstance().tick();
DamageCommas.tick();
+ ItemCustomizeManager.tick();
BackgroundBlur.markDirty();
+ NPCRetexturing.getInstance().tick();
if(neu.hasSkyblockScoreboard()) {
for(TextOverlay overlay : OverlayManager.textOverlays) {
overlay.tick();
}
}
- if(TradeWindow.hypixelTradeWindowActive()) {
- for(int i=0; i<16; i++) {
- int x = i % 4;
- int y = i / 4;
- int containerIndex = y*9+x+5;
-
- GuiContainer chest = ((GuiContainer)Minecraft.getMinecraft().currentScreen);
-
- ItemStack stack = chest.inventorySlots.getInventory().get(containerIndex);
- if(stack != null && BAD_ITEM_REGEX.matcher(Utils.cleanColour(stack.getDisplayName())).find()) {
- Minecraft.getMinecraft().ingameGUI.displayTitle(
- null, null,
- 4, 200, 4);
- Minecraft.getMinecraft().ingameGUI.displayTitle(
- null,
- EnumChatFormatting.RED+"WARNING: GLITCHED ITEM DETECTED IN TRADE WINDOW. CANCELLING TRADE",
- -1, -1, -1);
- Minecraft.getMinecraft().ingameGUI.displayTitle(
- EnumChatFormatting.RED+"YOU ARE TRADING WITH A SCAMMER!",
- null,
- -1, -1, -1);
- Minecraft.getMinecraft().thePlayer.addChatMessage(new ChatComponentText(EnumChatFormatting.RED+
- "WARNING: The person you are trading with just tried to give you a glitched item.\n" +
- "The item is NOT worth what they say it is worth.\n" +
- "Report this scammer immediately and ignore them!"));
- break;
- }
- }
- }
NotEnoughUpdates.INSTANCE.overlay.redrawItems();
CapeManager.onTickSlow();
@@ -471,6 +479,8 @@ public class NEUEventListener {
}
}
+ public static long lastGuiClosed = 0;
+
/**
* When opening a GuiContainer, will reset the overlay and load the config.
* When closing a GuiContainer, will save the config.
@@ -492,8 +502,14 @@ public class NEUEventListener {
CalendarOverlay.setEnabled(false);
}
+ if(Minecraft.getMinecraft().currentScreen != null) {
+ lastGuiClosed = System.currentTimeMillis();
+ }
+
neu.manager.auctionManager.customAH.lastGuiScreenSwitch = System.currentTimeMillis();
BetterContainers.reset();
+ inventoryLoaded = false;
+ inventoryLoadedTicks = 3;
if(event.gui == null && neu.manager.auctionManager.customAH.isRenderOverAuctionView() &&
!(Minecraft.getMinecraft().currentScreen instanceof CustomAHGui)) {