Optimization: optimizing handling of block related recipes to reduce overhead on block updates
shBLOCK opened this issue ยท 2 comments
Currently, RecipeHooks.checkExistenceBanned()
and RecipeHooks.sendIcestoneFreezableUpdateEvent
are called for every NeighborNotifyEvent
.
This causes lots of overhead on block updates. (the biome checking of checkExistenceBanned
is especially bad, costing more than one ms every tick when there are lots of block updates happening)
The call site:
I'm not sure if this is intentional or not (if there are block recipes for the dimensions other than the aether), but if not, I think it'd be pretty easy to just add an early-exit condition on the dimension before checking the actual recipes and it'd get rid of this overhead (unless someone decides to build their whole base in the aether).
I am a bit confused as to what biome checking you're referring to
This bit. (level.getBiome()
is the most time-consuming part)