[1.22+] Tighten getEnchantPowerBonus
to BlockGetter
#1453
Labels
1.21.2
Targeted at Minecraft 1.21.2
breaking change
Breaks binary compatibility
cleanup
Change that isn't an enhancement or a bug fix
I have a situation where I would like to resolve the enchant power of a block but might not have access to a level (i.e. in a tooltip).
Currently, the best attempt is to make a fake
LevelReader
which returns reasonable results from the methods one might expect someone to call, and catching any exceptions. I think there's no reason this method needs access to the fullLevelReader
and would be sufficiently executable with justBlockGetter
(which also makes providing an "empty" level easier).The most common case is resolving the
BlockEntity
or the states of nearby blocks, both of which are possible throughBlockGetter
. I don't see the additional context ofLevelReader
being useful here whatsoever.The text was updated successfully, but these errors were encountered: