Fabric API

Fabric API

112M Downloads

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

Technici4n opened this issue ยท 3 comments

commented

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...

commented

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();
}

commented

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.

commented

Yes you are right, I didn't see that Blocks.<clinit> call... ๐Ÿ™ƒ