use of net.minecraft.client.renderer.model.IBakedModel in project Overloaded by CJ-MC-Mods.
the class RenderMultiToolAssist method renderBlockPreview.
private static void renderBlockPreview(RenderWorldLastEvent event, BlockRayTraceResult result, @Nonnull BlockState state) {
IBakedModel model = Minecraft.getInstance().getBlockRenderer().getBlockModel(state);
BlockPos toRenderAt = result.getBlockPos().offset(result.getDirection().getNormal());
renderBlockModel(event, toRenderAt, model, state);
}
use of net.minecraft.client.renderer.model.IBakedModel in project NetherEx by LogicTechCorp.
the class MimicModelHandler method onModelBake.
@SubscribeEvent
public static void onModelBake(ModelBakeEvent event) {
MimicBlock quartzOreBlock = (MimicBlock) NetherExBlocks.QUARTZ_ORE.get();
if (quartzOreBlock != null) {
ModelResourceLocation modelLocation = quartzOreBlock.getModelLocation();
IBakedModel model = event.getModelRegistry().get(modelLocation);
if (model != null) {
event.getModelRegistry().put(modelLocation, new MimicBakedModel(model, quartzOreBlock.getMimicType()));
}
}
}
Aggregations