Skip to content

Commit

Permalink
Do not fail tag datagen when removing IDs not present at runtime (#1798)
Browse files Browse the repository at this point in the history
  • Loading branch information
62832 authored Dec 27, 2024
1 parent f7a5bc8 commit e95053c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion patches/net/minecraft/data/tags/TagsProvider.java.patch
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
TagBuilder tagbuilder = p_323138_.getValue();
List<TagEntry> list = tagbuilder.build();
- List<TagEntry> list1 = list.stream().filter(p_274771_ -> !p_274771_.verifyIfPresent(predicate, predicate1)).toList();
+ List<TagEntry> list1 = java.util.stream.Stream.concat(list.stream(), tagbuilder.getRemoveEntries())
+ List<TagEntry> list1 = list.stream()
+ .filter((p_274771_) -> !p_274771_.verifyIfPresent(predicate, predicate1))
+ .filter(this::missing)
+ .toList();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
"minecraft:polished_andesite",
"#minecraft:beehives",
"#minecraft:banners",
"#minecraft:beds"
"#minecraft:beds",
"minecraft:dacite"
],
"values": []
}
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,9 @@ protected void addTags(HolderLookup.Provider provider) {
.remove(key(Blocks.ANVIL))
.remove(key(Blocks.BASALT), key(Blocks.POLISHED_ANDESITE))
.remove(BlockTags.BEEHIVES)
.remove(BlockTags.BANNERS, BlockTags.BEDS);
.remove(BlockTags.BANNERS, BlockTags.BEDS)
// test removing optional IDs not present at run-time
.remove(ResourceLocation.withDefaultNamespace("dacite"));
}
};

Expand Down

0 comments on commit e95053c

Please sign in to comment.