mirror of
https://github.com/FabricMC/fabric.git
synced 2024-11-22 23:58:02 -05:00
Allow more flexibility when registering BER (#1392)
This commit is contained in:
parent
4b2c998ef4
commit
f801c28735
2 changed files with 2 additions and 2 deletions
|
@ -40,5 +40,5 @@ public interface BlockEntityRendererRegistry {
|
||||||
* class is already loaded
|
* class is already loaded
|
||||||
* @param <E> the {@link BlockEntity}
|
* @param <E> the {@link BlockEntity}
|
||||||
*/
|
*/
|
||||||
<E extends BlockEntity> void register(BlockEntityType<E> blockEntityType, Function<BlockEntityRenderDispatcher, BlockEntityRenderer<E>> blockEntityRenderer);
|
<E extends BlockEntity> void register(BlockEntityType<E> blockEntityType, Function<BlockEntityRenderDispatcher, BlockEntityRenderer<? super E>> blockEntityRenderer);
|
||||||
}
|
}
|
||||||
|
|
|
@ -32,7 +32,7 @@ public class BlockEntityRendererRegistryImpl implements BlockEntityRendererRegis
|
||||||
private static BiConsumer<BlockEntityType<?>, Function<BlockEntityRenderDispatcher, ? extends BlockEntityRenderer<?>>> handler = (type, function) -> map.put(type, function);
|
private static BiConsumer<BlockEntityType<?>, Function<BlockEntityRenderDispatcher, ? extends BlockEntityRenderer<?>>> handler = (type, function) -> map.put(type, function);
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public <E extends BlockEntity> void register(BlockEntityType<E> blockEntityType, Function<BlockEntityRenderDispatcher, BlockEntityRenderer<E>> blockEntityRenderer) {
|
public <E extends BlockEntity> void register(BlockEntityType<E> blockEntityType, Function<BlockEntityRenderDispatcher, BlockEntityRenderer<? super E>> blockEntityRenderer) {
|
||||||
handler.accept(blockEntityType, blockEntityRenderer);
|
handler.accept(blockEntityType, blockEntityRenderer);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue