--- a/net/minecraft/advancements/AdvancementList.java
+++ b/net/minecraft/advancements/AdvancementList.java
@@ -4,14 +4,18 @@
 import com.google.common.collect.Sets;
 import com.mojang.logging.LogUtils;
 import java.util.Collection;
+import java.util.HashMap;
 import java.util.Iterator;
 import java.util.Map;
+import java.util.Map.Entry;
+import java.util.Objects;
 import java.util.Set;
 import javax.annotation.Nullable;
 import net.minecraft.resources.ResourceLocation;
 import org.slf4j.Logger;
 
 public class AdvancementList {
+
     private static final Logger LOGGER = LogUtils.getLogger();
     public final Map<ResourceLocation, Advancement> advancements = Maps.newHashMap();
     private final Set<Advancement> roots = Sets.newLinkedHashSet();
@@ -19,12 +23,18 @@
     @Nullable
     private AdvancementList.Listener listener;
 
+    public AdvancementList() {}
+
     private void remove(Advancement advancement) {
-        for(Advancement advancement2 : advancement.getChildren()) {
-            this.remove(advancement2);
+        Iterator iterator = advancement.getChildren().iterator();
+
+        while (iterator.hasNext()) {
+            Advancement advancement1 = (Advancement) iterator.next();
+
+            this.remove(advancement1);
         }
 
-        LOGGER.info("Forgot about advancement {}", (Object)advancement.getId());
+        AdvancementList.LOGGER.info("Forgot about advancement {}", advancement.getId());
         this.advancements.remove(advancement.getId());
         if (advancement.getParent() == null) {
             this.roots.remove(advancement);
@@ -41,10 +51,14 @@
     }
 
     public void remove(Set<ResourceLocation> advancements) {
-        for(ResourceLocation resourceLocation : advancements) {
-            Advancement advancement = this.advancements.get(resourceLocation);
+        Iterator iterator = advancements.iterator();
+
+        while (iterator.hasNext()) {
+            ResourceLocation minecraftkey = (ResourceLocation) iterator.next();
+            Advancement advancement = (Advancement) this.advancements.get(minecraftkey);
+
             if (advancement == null) {
-                LOGGER.warn("Told to remove advancement {} but I don't know what that is", (Object)resourceLocation);
+                AdvancementList.LOGGER.warn("Told to remove advancement {} but I don't know what that is", minecraftkey);
             } else {
                 this.remove(advancement);
             }
@@ -53,20 +67,27 @@
     }
 
     public void add(Map<ResourceLocation, Advancement.Builder> map) {
-        Map<ResourceLocation, Advancement.Builder> map2 = Maps.newHashMap(map);
+        HashMap hashmap = Maps.newHashMap(map);
 
-        while(!map2.isEmpty()) {
-            boolean bl = false;
-            Iterator<Map.Entry<ResourceLocation, Advancement.Builder>> iterator = map2.entrySet().iterator();
+        label42:
+        while (!hashmap.isEmpty()) {
+            boolean flag = false;
+            Iterator iterator = hashmap.entrySet().iterator();
 
-            while(iterator.hasNext()) {
-                Map.Entry<ResourceLocation, Advancement.Builder> entry = iterator.next();
-                ResourceLocation resourceLocation = entry.getKey();
-                Advancement.Builder builder = entry.getValue();
-                if (builder.canBuild(this.advancements::get)) {
-                    Advancement advancement = builder.build(resourceLocation);
-                    this.advancements.put(resourceLocation, advancement);
-                    bl = true;
+            Entry entry;
+
+            while (iterator.hasNext()) {
+                entry = (Entry) iterator.next();
+                ResourceLocation minecraftkey = (ResourceLocation) entry.getKey();
+                Advancement.Builder advancement_serializedadvancement = (Advancement.Builder) entry.getValue();
+                Map<ResourceLocation, Advancement> map1 = this.advancements; // CraftBukkit - decompile error
+
+                Objects.requireNonNull(this.advancements);
+                if (advancement_serializedadvancement.canBuild(map1::get)) {
+                    Advancement advancement = advancement_serializedadvancement.build(minecraftkey);
+
+                    this.advancements.put(minecraftkey, advancement);
+                    flag = true;
                     iterator.remove();
                     if (advancement.getParent() == null) {
                         this.roots.add(advancement);
@@ -82,15 +103,21 @@
                 }
             }
 
-            if (!bl) {
-                for(Map.Entry<ResourceLocation, Advancement.Builder> entry2 : map2.entrySet()) {
-                    LOGGER.error("Couldn't load advancement {}: {}", entry2.getKey(), entry2.getValue());
+            if (!flag) {
+                iterator = hashmap.entrySet().iterator();
+
+                while (true) {
+                    if (!iterator.hasNext()) {
+                        break label42;
+                    }
+
+                    entry = (Entry) iterator.next();
+                    AdvancementList.LOGGER.error("Couldn't load advancement {}: {}", entry.getKey(), entry.getValue());
                 }
-                break;
             }
         }
 
-        LOGGER.info("Loaded {} advancements", (int)this.advancements.size());
+        // Advancements.LOGGER.info("Loaded {} advancements", this.advancements.size()); // CraftBukkit - moved to AdvancementDataWorld#reload
     }
 
     public void clear() {
@@ -113,24 +140,33 @@
 
     @Nullable
     public Advancement get(ResourceLocation id) {
-        return this.advancements.get(id);
+        return (Advancement) this.advancements.get(id);
     }
 
     public void setListener(@Nullable AdvancementList.Listener listener) {
         this.listener = listener;
         if (listener != null) {
-            for(Advancement advancement : this.roots) {
+            Iterator iterator = this.roots.iterator();
+
+            Advancement advancement;
+
+            while (iterator.hasNext()) {
+                advancement = (Advancement) iterator.next();
                 listener.onAddAdvancementRoot(advancement);
             }
 
-            for(Advancement advancement2 : this.tasks) {
-                listener.onAddAdvancementTask(advancement2);
+            iterator = this.tasks.iterator();
+
+            while (iterator.hasNext()) {
+                advancement = (Advancement) iterator.next();
+                listener.onAddAdvancementTask(advancement);
             }
         }
 
     }
 
     public interface Listener {
+
         void onAddAdvancementRoot(Advancement root);
 
         void onRemoveAdvancementRoot(Advancement root);
