Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not fail tag datagen when removing IDs not present at runtime #1798

Merged
merged 2 commits into from
Dec 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading