aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/com/thatgravyboat/skyblockhud/tracker
diff options
context:
space:
mode:
authorThatGravyBoat <thatgravyboat@gmail.com>2021-09-27 14:17:41 -0230
committerThatGravyBoat <thatgravyboat@gmail.com>2021-09-27 14:17:41 -0230
commitf1fd06d889162ac72395ef66043970cfe42cde5e (patch)
tree1e306d5817eac77ac44ef59085120882f8824d7a /src/main/java/com/thatgravyboat/skyblockhud/tracker
parent7809a1362c9644c9bfb69d8563a13e3f1ed3354a (diff)
downloadSkyblockHud-Death-Defied-f1fd06d889162ac72395ef66043970cfe42cde5e.tar.gz
SkyblockHud-Death-Defied-f1fd06d889162ac72395ef66043970cfe42cde5e.tar.bz2
SkyblockHud-Death-Defied-f1fd06d889162ac72395ef66043970cfe42cde5e.zip
I dont even know when I coded this.
Diffstat (limited to 'src/main/java/com/thatgravyboat/skyblockhud/tracker')
-rw-r--r--src/main/java/com/thatgravyboat/skyblockhud/tracker/TrackerHandler.java2
-rw-r--r--src/main/java/com/thatgravyboat/skyblockhud/tracker/TrackerObject.java5
2 files changed, 6 insertions, 1 deletions
diff --git a/src/main/java/com/thatgravyboat/skyblockhud/tracker/TrackerHandler.java b/src/main/java/com/thatgravyboat/skyblockhud/tracker/TrackerHandler.java
index baf9648..f8eaba3 100644
--- a/src/main/java/com/thatgravyboat/skyblockhud/tracker/TrackerHandler.java
+++ b/src/main/java/com/thatgravyboat/skyblockhud/tracker/TrackerHandler.java
@@ -19,7 +19,7 @@ import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
public class TrackerHandler extends Gui {
public static Set<TrackerObject> trackerObjects = new HashSet<>();
- public static Map<Locations, Map<String, TrackerObject>> trackers = new HashMap<>();
+ public static LinkedHashMap<Locations, Map<String, TrackerObject>> trackers = new LinkedHashMap<>();
public static <K, V> Map<K, V> sortTrackers(Map<K, V> map, Comparator<? super Map.Entry<K, V>> comparator) {
List<Map.Entry<K, V>> list = new ArrayList<>(map.entrySet());
diff --git a/src/main/java/com/thatgravyboat/skyblockhud/tracker/TrackerObject.java b/src/main/java/com/thatgravyboat/skyblockhud/tracker/TrackerObject.java
index 6013b09..1c6e54d 100644
--- a/src/main/java/com/thatgravyboat/skyblockhud/tracker/TrackerObject.java
+++ b/src/main/java/com/thatgravyboat/skyblockhud/tracker/TrackerObject.java
@@ -38,6 +38,11 @@ public class TrackerObject {
if (jsonObject.has("enchanted") && jsonObject.get("enchanted").getAsBoolean()) {
stack.setTagInfo("ench", new NBTTagList());
}
+ if (!jsonObject.get("id").getAsString().contains("entity:")) {
+ NBTTagCompound extraAttributes = new NBTTagCompound();
+ extraAttributes.setString("id", jsonObject.get("id").getAsString());
+ stack.setTagInfo("ExtraAttributes", extraAttributes);
+ }
return stack;
}