diff --git a/patches/net/minecraft/data/tags/TagsProvider.java.patch b/patches/net/minecraft/data/tags/TagsProvider.java.patch index 7cf15ff1f62..902fb6012ce 100644 --- a/patches/net/minecraft/data/tags/TagsProvider.java.patch +++ b/patches/net/minecraft/data/tags/TagsProvider.java.patch @@ -62,7 +62,7 @@ TagBuilder tagbuilder = p_323138_.getValue(); List list = tagbuilder.build(); - List list1 = list.stream().filter(p_274771_ -> !p_274771_.verifyIfPresent(predicate, predicate1)).toList(); -+ List list1 = java.util.stream.Stream.concat(list.stream(), tagbuilder.getRemoveEntries()) ++ List list1 = list.stream() + .filter((p_274771_) -> !p_274771_.verifyIfPresent(predicate, predicate1)) + .filter(this::missing) + .toList(); diff --git a/tests/src/generated/resources/data/minecraft/tags/block/test_tag.json b/tests/src/generated/resources/data/minecraft/tags/block/test_tag.json index cfe909e22ba..ebd314ac3ec 100644 --- a/tests/src/generated/resources/data/minecraft/tags/block/test_tag.json +++ b/tests/src/generated/resources/data/minecraft/tags/block/test_tag.json @@ -8,7 +8,8 @@ "minecraft:polished_andesite", "#minecraft:beehives", "#minecraft:banners", - "#minecraft:beds" + "#minecraft:beds", + "minecraft:dacite" ], "values": [] } \ No newline at end of file diff --git a/tests/src/main/java/net/neoforged/neoforge/oldtest/RemoveTagDatagenTest.java b/tests/src/main/java/net/neoforged/neoforge/oldtest/RemoveTagDatagenTest.java index 7ac89d1be14..7ab7609506f 100644 --- a/tests/src/main/java/net/neoforged/neoforge/oldtest/RemoveTagDatagenTest.java +++ b/tests/src/main/java/net/neoforged/neoforge/oldtest/RemoveTagDatagenTest.java @@ -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")); } };