Skip to content

Commit

Permalink
fixed treepacks not respecting order
Browse files Browse the repository at this point in the history
  • Loading branch information
supermassimo committed Aug 9, 2023
1 parent 29e2786 commit f9a9650
Showing 1 changed file with 3 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,7 @@
import net.minecraft.server.packs.resources.ResourceManager;

import java.io.FileNotFoundException;
import java.util.Arrays;
import java.util.Collection;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import java.util.Set;
import java.util.TreeMap;
import java.util.*;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.Executor;
import java.util.function.Predicate;
Expand Down Expand Up @@ -140,7 +134,7 @@ private Resource getResource(ResourceLocation path, TreeResourcePack resourcePac

@Override
public Map<ResourceLocation, Resource> listResources(String path, Predicate<ResourceLocation> filter) {
Map<ResourceLocation, Resource> resources = new TreeMap<>();
Map<ResourceLocation, Resource> resources = new LinkedHashMap<>();

for (TreeResourcePack pack : this.resourcePacks) {
for (String namespace : pack.getNamespaces()) {
Expand All @@ -157,7 +151,7 @@ public Map<ResourceLocation, Resource> listResources(String path, Predicate<Reso

@Override
public Map<ResourceLocation, List<Resource>> listResourceStacks(String path, Predicate<ResourceLocation> filter) {
Map<ResourceLocation, List<Resource>> resources = new TreeMap<>();
Map<ResourceLocation, List<Resource>> resources = new LinkedHashMap<>();

for (TreeResourcePack pack : this.resourcePacks) {
for (String namespace : pack.getNamespaces()) {
Expand Down

0 comments on commit f9a9650

Please sign in to comment.