Skip to content

Commit

Permalink
Backport "Retain insertion order of tag entries" to 1.20.1 (#308)
Browse files Browse the repository at this point in the history
  • Loading branch information
JL2210 authored Nov 30, 2023
1 parent 92ea894 commit d44ae42
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion patches/minecraft/net/minecraft/tags/TagLoader.java.patch
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

private Either<Collection<TagLoader.EntryWithSource>, Collection<T>> m_215978_(TagEntry.Lookup<T> p_215979_, List<TagLoader.EntryWithSource> p_215980_) {
- ImmutableSet.Builder<T> builder = ImmutableSet.builder();
+ var builder = new java.util.HashSet<T>();
+ var builder = new java.util.LinkedHashSet<T>(); // Set must retain insertion order, some tag consumers rely on this being the case (see NeoForge#256)
List<TagLoader.EntryWithSource> list = new ArrayList<>();

for(TagLoader.EntryWithSource tagloader$entrywithsource : p_215980_) {
Expand Down

0 comments on commit d44ae42

Please sign in to comment.