Search in sources :

Example 1 with FlagBlockEntityRenderer

use of net.mrscauthd.beyond_earth.client.renderer.FlagBlockEntityRenderer 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)

Aggregations

Environment (net.fabricmc.api.Environment)1 SimpleFluidRenderHandler (net.fabricmc.fabric.api.client.render.fluid.v1.SimpleFluidRenderHandler)1 FlagBlockEntityRenderer (net.mrscauthd.beyond_earth.client.renderer.FlagBlockEntityRenderer)1 ModIdentifier (net.mrscauthd.beyond_earth.util.ModIdentifier)1