aboutsummaryrefslogtreecommitdiffhomepage
path: root/patch-remap/mache-spigotflower/net/minecraft/advancements/AdvancementTree.java.patch
blob: b56ce287c15cf60403dd987f3aa033f07e595659 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
--- a/net/minecraft/advancements/AdvancementTree.java
+++ b/net/minecraft/advancements/AdvancementTree.java
@@ -22,7 +22,7 @@
     private final Set<AdvancementNode> roots = new ObjectLinkedOpenHashSet();
     private final Set<AdvancementNode> tasks = new ObjectLinkedOpenHashSet();
     @Nullable
-    private AdvancementTree.Listener listener;
+    private AdvancementTree.a listener;
 
     public AdvancementTree() {}
 
@@ -55,11 +55,11 @@
         Iterator iterator = set.iterator();
 
         while (iterator.hasNext()) {
-            ResourceLocation resourcelocation = (ResourceLocation) iterator.next();
-            AdvancementNode advancementnode = (AdvancementNode) this.nodes.get(resourcelocation);
+            ResourceLocation minecraftkey = (ResourceLocation) iterator.next();
+            AdvancementNode advancementnode = (AdvancementNode) this.nodes.get(minecraftkey);
 
             if (advancementnode == null) {
-                AdvancementTree.LOGGER.warn("Told to remove advancement {} but I don't know what that is", resourcelocation);
+                AdvancementTree.LOGGER.warn("Told to remove advancement {} but I don't know what that is", minecraftkey);
             } else {
                 this.remove(advancementnode);
             }
@@ -68,7 +68,7 @@
     }
 
     public void addAll(Collection<AdvancementHolder> collection) {
-        ArrayList arraylist = new ArrayList(collection);
+        ArrayList<AdvancementHolder> arraylist = new ArrayList(collection); // CraftBukkit - decompile error
 
         while (!arraylist.isEmpty()) {
             if (!arraylist.removeIf(this::tryInsert)) {
@@ -77,7 +77,7 @@
             }
         }
 
-        AdvancementTree.LOGGER.info("Loaded {} advancements", this.nodes.size());
+        // AdvancementTree.LOGGER.info("Loaded {} advancements", this.nodes.size()); // CraftBukkit - moved to AdvancementDataWorld#reload
     }
 
     private boolean tryInsert(AdvancementHolder advancementholder) {
@@ -132,8 +132,8 @@
     }
 
     @Nullable
-    public AdvancementNode get(ResourceLocation resourcelocation) {
-        return (AdvancementNode) this.nodes.get(resourcelocation);
+    public AdvancementNode get(ResourceLocation minecraftkey) {
+        return (AdvancementNode) this.nodes.get(minecraftkey);
     }
 
     @Nullable
@@ -141,37 +141,37 @@
         return (AdvancementNode) this.nodes.get(advancementholder.id());
     }
 
-    public void setListener(@Nullable AdvancementTree.Listener advancementtree_listener) {
-        this.listener = advancementtree_listener;
-        if (advancementtree_listener != null) {
+    public void setListener(@Nullable AdvancementTree.a advancementtree_a) {
+        this.listener = advancementtree_a;
+        if (advancementtree_a != null) {
             Iterator iterator = this.roots.iterator();
 
             AdvancementNode advancementnode;
 
             while (iterator.hasNext()) {
                 advancementnode = (AdvancementNode) iterator.next();
-                advancementtree_listener.onAddAdvancementRoot(advancementnode);
+                advancementtree_a.onAddAdvancementRoot(advancementnode);
             }
 
             iterator = this.tasks.iterator();
 
             while (iterator.hasNext()) {
                 advancementnode = (AdvancementNode) iterator.next();
-                advancementtree_listener.onAddAdvancementTask(advancementnode);
+                advancementtree_a.onAddAdvancementTask(advancementnode);
             }
         }
 
     }
 
-    public interface Listener {
+    public interface a {
 
-        void onAddAdvancementRoot(AdvancementNode advancementNode);
+        void onAddAdvancementRoot(AdvancementNode advancementnode);
 
-        void onRemoveAdvancementRoot(AdvancementNode advancementNode);
+        void onRemoveAdvancementRoot(AdvancementNode advancementnode);
 
-        void onAddAdvancementTask(AdvancementNode advancementNode);
+        void onAddAdvancementTask(AdvancementNode advancementnode);
 
-        void onRemoveAdvancementTask(AdvancementNode advancementNode);
+        void onRemoveAdvancementTask(AdvancementNode advancementnode);
 
         void onAdvancementsCleared();
     }