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

Registry sync calls getLootTableId on every registered block for seemingly no reason #3422

Closed
Technici4n opened this issue Nov 14, 2023 · 3 comments
Labels

Comments

@Technici4n
Copy link
Member

See the following:

No idea why this exists and what that actually does.

Found while working on the NeoForge registry rework, NeoForge also has this but it's unclear why so it will be removed...

@Juuxel
Copy link
Member

Juuxel commented Nov 14, 2023

It might be something vanilla does/did? From an ancient version of reg sync:

@Override
public void afterRegistryRegistration(Registry<Block> registry, int id, Identifier identifier, Block object) {
// refer net.minecraft.block.Blocks
object.getDropTableId();
}

@modmuss50
Copy link
Member

modmuss50 commented Nov 14, 2023

This is done as it matches Vanilla in Blocks.<clinit>. I expect at somepoint previously it mattered more.

I think removing this could be breaking as lootTableId is only protected in Block, and a mod may not expect it to be null. I think it should be left alone.

@modmuss50 modmuss50 closed this as not planned Won't fix, can't repro, duplicate, stale Nov 14, 2023
@Technici4n
Copy link
Member Author

Yes you are right, I didn't see that Blocks.<clinit> call... 🙃

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

No branches or pull requests

3 participants