Search in sources :

Example 1 with SimpleFluidRenderHandler

use of net.fabricmc.fabric.api.client.render.fluid.v1.SimpleFluidRenderHandler in project orbit by the-bennett-group.

the class OrbitClient method createFluidRenderLayer.

public static void createFluidRenderLayer(FlowingFluid SOURCE, FlowingFluid FLOWING, String sourceTexture, String flowingTexture) {
    BlockRenderLayerMap.put(RenderType.translucent(), SOURCE, FLOWING);
    FluidRenderHandlerRegistry.INSTANCE.register(SOURCE, FLOWING, new SimpleFluidRenderHandler(Orbit.newId("block/" + sourceTexture), Orbit.newId("block/" + flowingTexture)));
}
Also used : SimpleFluidRenderHandler(net.fabricmc.fabric.api.client.render.fluid.v1.SimpleFluidRenderHandler)

Example 2 with SimpleFluidRenderHandler

use of net.fabricmc.fabric.api.client.render.fluid.v1.SimpleFluidRenderHandler in project beyond-earth-fabricated by SomeoneIs404.

the class BeyondEarthClient method onInitializeClient.

@Override
@Environment(EnvType.CLIENT)
public void onInitializeClient() {
    BlockEntityRendererRegistry.register(ModBlocks.FLAG_BLOCK_ENTITY, ctx -> new FlagBlockEntityRenderer());
    // Fluids.
    FluidRenderHandlerRegistry.INSTANCE.register(ModFluids.FUEL_STILL, ModFluids.FLOWING_FUEL, new SimpleFluidRenderHandler(new ModIdentifier("blocks/fluid_fuel_still"), new ModIdentifier("blocks/fluid_fuel_flow"), new ModIdentifier("blocks/fuel_overlay")));
    FluidRenderHandlerRegistry.INSTANCE.register(ModFluids.OIL_STILL, ModFluids.FLOWING_OIL, new SimpleFluidRenderHandler(new ModIdentifier("blocks/fluid_oil_still"), new ModIdentifier("blocks/fluid_oil_flow"), new ModIdentifier("blocks/oil_overlay")));
    // Fluid textures.
    ClientSpriteRegistryCallback.event(PlayerScreenHandler.BLOCK_ATLAS_TEXTURE).register((atlasTexture, registry) -> {
        registry.register(new ModIdentifier("blocks/fluid_fuel_still"));
        registry.register(new ModIdentifier("blocks/fluid_fuel_flow"));
        registry.register(new ModIdentifier("blocks/fuel_overlay"));
        registry.register(new ModIdentifier("blocks/fluid_oil_still"));
        registry.register(new ModIdentifier("blocks/fluid_oil_flow"));
        registry.register(new ModIdentifier("blocks/oil_overlay"));
    });
    BlockRenderLayerMap.INSTANCE.putFluids(RenderLayer.getTranslucent(), ModFluids.FUEL_STILL, ModFluids.FLOWING_FUEL);
}
Also used : FlagBlockEntityRenderer(net.mrscauthd.beyond_earth.client.renderer.FlagBlockEntityRenderer) SimpleFluidRenderHandler(net.fabricmc.fabric.api.client.render.fluid.v1.SimpleFluidRenderHandler) ModIdentifier(net.mrscauthd.beyond_earth.util.ModIdentifier) Environment(net.fabricmc.api.Environment)

Example 3 with SimpleFluidRenderHandler

use of net.fabricmc.fabric.api.client.render.fluid.v1.SimpleFluidRenderHandler in project Fabric-Course-118 by Kaupenjoe.

the class MCCourseClient method onInitializeClient.

@Override
public void onInitializeClient() {
    BlockRenderLayerMap.INSTANCE.putBlock(ModBlocks.CHERRY_BLOSSOM_DOOR, RenderLayer.getCutout());
    BlockRenderLayerMap.INSTANCE.putBlock(ModBlocks.CHEERY_BLOSSOM_TRAPDOOR, RenderLayer.getCutout());
    BlockRenderLayerMap.INSTANCE.putBlock(ModBlocks.TURNIP_CROP, RenderLayer.getCutout());
    BlockRenderLayerMap.INSTANCE.putBlock(ModBlocks.PINK_ROSE, RenderLayer.getCutout());
    BlockRenderLayerMap.INSTANCE.putBlock(ModBlocks.POTTED_PINK_ROSE, RenderLayer.getCutout());
    BlockRenderLayerMap.INSTANCE.putBlock(ModBlocks.ORICHALCUM_BLASTER, RenderLayer.getCutout());
    BlockRenderLayerMap.INSTANCE.putBlock(ModBlocks.CHERRY_BLOSSOM_LEAVES, RenderLayer.getCutout());
    BlockRenderLayerMap.INSTANCE.putBlock(ModBlocks.CHERRY_BLOSSOM_SAPLING, RenderLayer.getCutout());
    BlockRenderLayerMap.INSTANCE.putBlock(ModBlocks.WINTER_WINDOW, RenderLayer.getTranslucent());
    ModModelPredicateProvider.registerModModels();
    FluidRenderHandlerRegistry.INSTANCE.register(ModFluids.HONEY_STILL, new SimpleFluidRenderHandler(SimpleFluidRenderHandler.WATER_STILL, SimpleFluidRenderHandler.WATER_FLOWING, SimpleFluidRenderHandler.WATER_OVERLAY, 0xe9860c));
    FluidRenderHandlerRegistry.INSTANCE.register(ModFluids.HONEY_FLOWING, new SimpleFluidRenderHandler(SimpleFluidRenderHandler.WATER_STILL, SimpleFluidRenderHandler.WATER_FLOWING, SimpleFluidRenderHandler.WATER_OVERLAY, 0xe9860c));
    ScreenRegistry.register(ModScreenHandlers.ORICHALCUM_BLASTER_SCREEN_HANDLER, OrichalcumBlasterScreen::new);
    ScreenEvents.BEFORE_INIT.register(new ReplaceTitleScreenEvent());
    EntityRendererRegistry.register(ModEntities.RACCOON, RaccoonRenderer::new);
    EntityRendererRegistry.register(ModEntities.TIGER, TigerRenderer::new);
}
Also used : OrichalcumBlasterScreen(net.kaupenjoe.mccourse.screen.OrichalcumBlasterScreen) ReplaceTitleScreenEvent(net.kaupenjoe.mccourse.event.ReplaceTitleScreenEvent) SimpleFluidRenderHandler(net.fabricmc.fabric.api.client.render.fluid.v1.SimpleFluidRenderHandler) RaccoonRenderer(net.kaupenjoe.mccourse.entity.client.RaccoonRenderer) TigerRenderer(net.kaupenjoe.mccourse.entity.client.TigerRenderer)

Aggregations

SimpleFluidRenderHandler (net.fabricmc.fabric.api.client.render.fluid.v1.SimpleFluidRenderHandler)3 Environment (net.fabricmc.api.Environment)1 RaccoonRenderer (net.kaupenjoe.mccourse.entity.client.RaccoonRenderer)1 TigerRenderer (net.kaupenjoe.mccourse.entity.client.TigerRenderer)1 ReplaceTitleScreenEvent (net.kaupenjoe.mccourse.event.ReplaceTitleScreenEvent)1 OrichalcumBlasterScreen (net.kaupenjoe.mccourse.screen.OrichalcumBlasterScreen)1 FlagBlockEntityRenderer (net.mrscauthd.beyond_earth.client.renderer.FlagBlockEntityRenderer)1 ModIdentifier (net.mrscauthd.beyond_earth.util.ModIdentifier)1