mirror of
https://github.com/FabricMC/fabric.git
synced 2024-11-26 09:38:08 -05:00
Allow more flexibility when registering BER (#1392)
(cherry picked from commit f801c28735
)
This commit is contained in:
parent
5f00b70f07
commit
aaa30be003
2 changed files with 2 additions and 2 deletions
|
@ -39,5 +39,5 @@ public interface BlockEntityRendererRegistry {
|
|||
* class is already loaded
|
||||
* @param <E> the {@link BlockEntity}
|
||||
*/
|
||||
<E extends BlockEntity> void register(BlockEntityType<E> blockEntityType, BlockEntityRendererFactory<E> blockEntityRendererFactory);
|
||||
<E extends BlockEntity> void register(BlockEntityType<E> blockEntityType, BlockEntityRendererFactory<? super E> blockEntityRendererFactory);
|
||||
}
|
||||
|
|
|
@ -30,7 +30,7 @@ public class BlockEntityRendererRegistryImpl implements BlockEntityRendererRegis
|
|||
private static BiConsumer<BlockEntityType<?>, BlockEntityRendererFactory<?>> handler = (type, function) -> map.put(type, function);
|
||||
|
||||
@Override
|
||||
public <E extends BlockEntity> void register(BlockEntityType<E> blockEntityType, BlockEntityRendererFactory<E> blockEntityRendererFactory) {
|
||||
public <E extends BlockEntity> void register(BlockEntityType<E> blockEntityType, BlockEntityRendererFactory<? super E> blockEntityRendererFactory) {
|
||||
handler.accept(blockEntityType, blockEntityRendererFactory);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue