Fabric API

Fabric API

108M Downloads

BlockApiLookup doesn't support BlockEntityTypes with a custom supports override

Juuxel opened this issue ยท 1 comments

commented

For example Adorn's AdornBlockEntityType overrides supports to handle it by the block class instead of block type for mod compat.

BlockApiLookupImpl doesn't use the public methods but instead accesses the private blocks set - which should be unused since I override its only use - with an accessor and crashes because it's empty.

Since doing a fallback provider automatically for these cases is inefficient, it's probably best to just add some javadoc like

<p>The type is not used directly for detecting the supported blocks and block entities in the world, but it is converted to
its {@linkplain BlockEntityType#blocks} when this method is called.

@throws <whatever the exception currently is> if {@link BlockEntityType#blocks} [of any of the types]/[of the type] is empty
commented

I should add this to #2086.