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

[1.21.3] Crash when using item tag in GLM #1637

Open
yanny7 opened this issue Oct 27, 2024 · 2 comments
Open

[1.21.3] Crash when using item tag in GLM #1637

yanny7 opened this issue Oct 27, 2024 · 2 comments
Labels
triage Needs triaging and confirmation

Comments

@yanny7
Copy link
Contributor

yanny7 commented Oct 27, 2024

Minecraft Version: 1.21.3

NeoForge Version: 21.3.3-beta

Logs: https://pastebin.com/TL6ijBxY

Steps to Reproduce:

  1. Use item tag in GLM
  2. Run Datagen
        add("grass_drops_fibers", new AddItemModifier(
                new LootItemCondition[] {
                        LootItemRandomChanceCondition.randomChance(0.1f).build(),
                        MatchTool.toolMatches(ItemPredicate.Builder.item().of(BuiltInRegistries.ITEM, YTechItemTags.SHARP_FLINTS)).build(),
                        LootItemBlockStatePropertyCondition.hasBlockStateProperties(Blocks.SHORT_GRASS).build()
                },
                YTechItems.GRASS_FIBERS.get()
        ));

Description of issue:
Crash happen when using item tag in GLM. Given tag YTechItemTags.SHARP_FLINTS works fine in Recipe Datagen

@yanny7 yanny7 added the triage Needs triaging and confirmation label Oct 27, 2024
@yanny7 yanny7 changed the title [1.21.3] Crash when using item tag in GML [1.21.3] Crash when using item tag in GLM Oct 27, 2024
@yanny7
Copy link
Contributor Author

yanny7 commented Nov 3, 2024

Same when used custom Tag in Advancement datagen

@yanny7
Copy link
Contributor Author

yanny7 commented Nov 3, 2024

Caused by: java.lang.IllegalStateException: Missing tag TagKey[minecraft:item / ytech:sharp_flints]
	at TRANSFORMER/[email protected]/net.minecraft.core.HolderGetter.lambda$getOrThrow$1(HolderGetter.java:17)
	at java.base/java.util.Optional.orElseThrow(Optional.java:403)
	at TRANSFORMER/[email protected]/net.minecraft.core.HolderGetter.getOrThrow(HolderGetter.java:17)
	at TRANSFORMER/[email protected]/net.minecraft.advancements.critereon.ItemPredicate$Builder.of(ItemPredicate.java:71)
	at TRANSFORMER/[email protected]/com.yanny.ytech.generation.YTechGlobalLootModifierProvider.start(YTechGlobalLootModifierProvider.java:34)
	at TRANSFORMER/[email protected]/net.neoforged.neoforge.common.data.GlobalLootModifierProvider.run(GlobalLootModifierProvider.java:70)
	at TRANSFORMER/[email protected]/net.neoforged.neoforge.common.data.GlobalLootModifierProvider.lambda$run$0(GlobalLootModifierProvider.java:65)
	at java.base/java.util.concurrent.CompletableFuture.uniComposeStage(CompletableFuture.java:1187)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
triage Needs triaging and confirmation
Projects
None yet
Development

No branches or pull requests

1 participant