aboutsummaryrefslogtreecommitdiff
path: root/src/main/java
diff options
context:
space:
mode:
authorIRONM00N <64110067+IRONM00N@users.noreply.github.com>2021-07-23 15:14:04 -0400
committerIRONM00N <64110067+IRONM00N@users.noreply.github.com>2021-07-23 15:14:04 -0400
commit4bd1befe84e210a0d5f106cc95c6698311c5904f (patch)
treeb13498b67576b6eb27f752ccc0380fd3d9d5d7eb /src/main/java
parentfaf123fb068c294caa206d792b2a725ae1fd9139 (diff)
downloadNotEnoughUpdates-4bd1befe84e210a0d5f106cc95c6698311c5904f.tar.gz
NotEnoughUpdates-4bd1befe84e210a0d5f106cc95c6698311c5904f.tar.bz2
NotEnoughUpdates-4bd1befe84e210a0d5f106cc95c6698311c5904f.zip
fix: remove upload button since it doesn't work
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/NEUManager.java28
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/infopanes/DevInfoPane.java7
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/itemeditor/NEUItemEditor.java31
3 files changed, 5 insertions, 61 deletions
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/NEUManager.java b/src/main/java/io/github/moulberry/notenoughupdates/NEUManager.java
index 90025881..dd39768c 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/NEUManager.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/NEUManager.java
@@ -3,8 +3,6 @@ package io.github.moulberry.notenoughupdates;
import com.google.common.collect.Lists;
import com.google.gson.*;
import io.github.moulberry.notenoughupdates.auction.APIManager;
-import io.github.moulberry.notenoughupdates.miscfeatures.StorageManager;
-import io.github.moulberry.notenoughupdates.miscgui.GuiItemCustomize;
import io.github.moulberry.notenoughupdates.miscgui.GuiItemRecipe;
import io.github.moulberry.notenoughupdates.util.Constants;
import io.github.moulberry.notenoughupdates.util.HypixelApi;
@@ -1169,32 +1167,6 @@ public class NEUManager {
return true;
}
- public boolean uploadItemJson(String internalname, String itemid, String displayname, String[] lore, String crafttext, String infoType, String[] info,
- String clickcommand, int damage, NBTTagCompound nbttag) {
- JsonObject json = createItemJson(internalname, itemid, displayname, lore, crafttext, infoType, info, clickcommand, damage, nbttag);
- if(json == null) {
- return false;
- }
-
- String username = Minecraft.getMinecraft().thePlayer.getName();
- String newBranchName = UUID.randomUUID().toString().substring(0, 8) + "-" + internalname + "-" + username;
- String prTitle = internalname + "-" + username;
- String prBody = "Internal name: " + internalname + "\nSubmitted by: " + username;
- String file = "items/"+internalname+".json";
- /*if(!neuio.createNewRequest(newBranchName, prTitle, prBody, file, gson.toJson(json))) {
- return false;
- }*/
-
- try {
- writeJsonDefaultDir(json, internalname+".json");
- } catch(IOException e) {
- return false;
- }
-
- loadItem(internalname);
- return true;
- }
-
public void writeJson(JsonObject json, File file) throws IOException {
file.createNewFile();
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/infopanes/DevInfoPane.java b/src/main/java/io/github/moulberry/notenoughupdates/infopanes/DevInfoPane.java
index 0489dd42..92adc9bb 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/infopanes/DevInfoPane.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/infopanes/DevInfoPane.java
@@ -35,7 +35,7 @@ public class DevInfoPane extends TextInfoPane {
*/
public DevInfoPane(NEUOverlay overlay, NEUManager manager) {
- super(overlay, manager, "Dev", "");
+ super(overlay, manager, "Missing Items", "");
text = getText();
}
@@ -61,7 +61,7 @@ public class DevInfoPane extends TextInfoPane {
//if(true) return text;
for(String internalname : manager.auctionManager.getItemAuctionInfoKeySet()) {
- if(internalname.contains("-")) continue;
+ if(internalname.matches("^.*-[0-9]{1,3}$")) continue;
if(!manager.getItemInformation().containsKey(internalname)) {
text += internalname + "\n";
}
@@ -82,6 +82,8 @@ public class DevInfoPane extends TextInfoPane {
return text;
}
+ //#region add vanilla items
+
AtomicBoolean running = new AtomicBoolean(false);
ScheduledExecutorService ses = Executors.newScheduledThreadPool(1);
@@ -1052,4 +1054,5 @@ public class DevInfoPane extends TextInfoPane {
}*/
return false;
}
+ //#endregion
}
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/itemeditor/NEUItemEditor.java b/src/main/java/io/github/moulberry/notenoughupdates/itemeditor/NEUItemEditor.java
index 37ffc938..4614a6d3 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/itemeditor/NEUItemEditor.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/itemeditor/NEUItemEditor.java
@@ -116,23 +116,6 @@ public class NEUItemEditor extends GuiScreen {
}.b;
rightOptions.add(button);
- button = new Object() { //Used to make the compiler shut the fuck up
- GuiElementButton b = new GuiElementButton("Upload", Color.YELLOW.getRGB(), new Runnable() {
- public void run() {
- if(b.getText().equals("Upload")) {
- b.setText("Confirm upload?");
- } else {
- if(upload()) {
- b.setText("Uploaded");
- } else {
- b.setText("Upload failed.");
- }
- }
- }
- });
- }.b;
- rightOptions.add(button);
-
rightOptions.add(new GuiElementText("", Color.WHITE.getRGB()));
rightOptions.add(new GuiElementButton("Remove enchants", Color.RED.getRGB(), () -> {
@@ -160,20 +143,6 @@ public class NEUItemEditor extends GuiScreen {
crafttext.get(), infoType.get(), infoA, clickcommand.get(), damageI, nbttag);
}
- public boolean upload() {
- int damageI = 0;
- try {
- damageI = Integer.valueOf(damage.get());
- } catch(NumberFormatException e) {}
- resyncNbttag();
- String[] infoA = info.get().trim().split("\n");
- if(infoA.length == 0 || infoA[0].isEmpty()) {
- infoA = new String[0];
- }
- return manager.uploadItemJson(internalname.get(), itemid.get(), displayname.get(), lore.get().split("\n"),
- crafttext.get(), infoType.get(), infoA, clickcommand.get(), damageI, nbttag);
- }
-
public void onGuiClosed() {
Keyboard.enableRepeatEvents(false);
}