mirror of
https://github.com/architectury/architectury-api.git
synced 2026-04-02 05:27:42 -05:00
Port to 20w51a
This commit is contained in:
@@ -13,7 +13,7 @@ dependencies {
|
||||
}
|
||||
|
||||
architectury {
|
||||
common()
|
||||
common(false)
|
||||
}
|
||||
|
||||
task sourcesJar(type: Jar, dependsOn: classes) {
|
||||
|
||||
@@ -24,6 +24,7 @@ import net.fabricmc.api.EnvType;
|
||||
import net.fabricmc.api.Environment;
|
||||
import net.minecraft.client.renderer.blockentity.BlockEntityRenderDispatcher;
|
||||
import net.minecraft.client.renderer.blockentity.BlockEntityRenderer;
|
||||
import net.minecraft.client.renderer.blockentity.BlockEntityRendererProvider;
|
||||
import net.minecraft.world.level.block.entity.BlockEntity;
|
||||
import net.minecraft.world.level.block.entity.BlockEntityType;
|
||||
|
||||
@@ -33,8 +34,12 @@ import java.util.function.Function;
|
||||
public final class BlockEntityRenderers {
|
||||
private BlockEntityRenderers() {}
|
||||
|
||||
@ExpectPlatform
|
||||
public static <T extends BlockEntity> void registerRenderer(BlockEntityType<T> type, Function<BlockEntityRenderDispatcher, BlockEntityRenderer<T>> provider) {
|
||||
registerRenderer(type, (BlockEntityRendererProvider.Context context) -> provider.apply(context.getBlockEntityRenderDispatcher()));
|
||||
}
|
||||
|
||||
@ExpectPlatform
|
||||
public static <T extends BlockEntity> void registerRenderer(BlockEntityType<T> type, BlockEntityRendererProvider<T> provider) {
|
||||
throw new AssertionError();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user