diff options
Diffstat (limited to 'patch-remap/mache-spigotflower/net/minecraft/advancements/AdvancementTree.java.patch')
-rw-r--r-- | patch-remap/mache-spigotflower/net/minecraft/advancements/AdvancementTree.java.patch | 103 |
1 files changed, 103 insertions, 0 deletions
diff --git a/patch-remap/mache-spigotflower/net/minecraft/advancements/AdvancementTree.java.patch b/patch-remap/mache-spigotflower/net/minecraft/advancements/AdvancementTree.java.patch new file mode 100644 index 0000000000..b56ce287c1 --- /dev/null +++ b/patch-remap/mache-spigotflower/net/minecraft/advancements/AdvancementTree.java.patch @@ -0,0 +1,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(); + } |