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

Loot table data generation does not include random sequences #3751

Open
haykam821 opened this issue May 2, 2024 · 1 comment
Open

Loot table data generation does not include random sequences #3751

haykam821 opened this issue May 2, 2024 · 1 comment

Comments

@haykam821
Copy link
Contributor

haykam821 commented May 2, 2024

The random_sequence field is expected for loot tables produced by data generation, but instead, it is not present. As a result, generated loot tables use the world random rather than a loot table-specific random sequence.

Compare the implementations of the Fabric API FabricLootTableProviderImpl#run and vanilla LootTableProvider#run methods. The Fabric API implementation does not call builder.randomSequenceId(identifier) when accepting each loot table builder from the provider, leading to this issue.

As a workaround, the following code can be added to the end of FabricBlockLootTableProvider#generate implementations in individual mods:

this.lootTables.forEach((id, lootTable) -> {
	lootTable.randomSequenceId(id);
});
@maityyy
Copy link
Contributor

maityyy commented May 2, 2024

Can we get rid of FabricLootTableProvider(s) to avoid further similar bugs? Recently I also discovered a similar bug and they are difficult to track

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

No branches or pull requests

2 participants