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
Biome.SpawnListEntry.newInstance doesn't use entity factories #5046
Comments
you can just patch spawnlistentry class. not necessary to adress that. if you go on and add a fast class to entry map, it would be an internal impl detail than a public api. btw vanilla also iterates over all furnace recipes every time to find a match, too. it won't hurt that bad. |
I wouldn't want to iterate over the whole registry each time something is spawned, but this is only called on each new |
That wouldn't be strictly correct however, as it wouldn't take any subsequent registry changes into account. |
anyways the lookup efficiency is not related to the issue itself. We can easily address the lookup in another pull request |
Hmm ok. If you are making it so that |
As another point, even discounting later registry changes, an eager lookup will cause problems with |
Currently this just looks for a constructor with a single
World
parameter and uses that to construct the entity.It'd be nice if this deferred to
EntityEntry.newInstance
similarly toEntityList.newEntity
, but I don't know if theTODO
here would need to be addressed first for this to not be a performance hit:MinecraftForge/src/main/java/net/minecraftforge/fml/common/registry/EntityRegistry.java
Lines 376 to 386 in ab22883
The text was updated successfully, but these errors were encountered: