Search in sources :

Example 1 with RenderFallingBlock

use of net.minecraft.client.renderer.entity.RenderFallingBlock in project gregtech6 by GregTech6.

the class GT_API_Proxy_Client method onProxyAfterPreInit.

@Override
@SuppressWarnings("deprecation")
public void onProxyAfterPreInit(Abstract_Mod aMod, FMLPreInitializationEvent aEvent) {
    RenderingRegistry.registerEntityRenderingHandler(PrefixBlockFallingEntity.class, new RenderFallingBlock());
    RenderingRegistry.registerBlockHandler(new RendererBlockFluid(RenderingRegistry.getNextAvailableRenderId()));
    RenderingRegistry.registerBlockHandler(new RendererBlockTextured(RenderingRegistry.getNextAvailableRenderId()));
    FluidRegistry.renderIdFluid = RendererBlockFluid.RENDER_ID;
    // Check if OptiFine is loaded in order to disable some GT Render Hooks to fix Glitches.
    ITexture.Util.OPTIFINE_LOADED = FMLClientHandler.instance().hasOptifine();
    if (XMAS_IN_JULY) {
        // Christmas in July! Go look it up, it is an actual thing!
        Textures.BlockIcons.LEAVES_CD[0] = Textures.BlockIcons.LEAVES_BLUESPRUCE_XMAS;
        Textures.BlockIcons.LEAVES_CD[8] = Textures.BlockIcons.LEAVES_OPAQUE_BLUESPRUCE_XMAS;
    }
    if (XMAS_IN_DECEMBER) {
        // Normal Holiday Season!
        Textures.BlockIcons.LEAVES_CD[0] = Textures.BlockIcons.LEAVES_BLUESPRUCE_XMAS;
        Textures.BlockIcons.LEAVES_CD[8] = Textures.BlockIcons.LEAVES_OPAQUE_BLUESPRUCE_XMAS;
    }
    Date tDate = new Date();
    switch(// Not going to use Calendar, because it fucking crashes with Missing Resource Exception...
    tDate.getMonth() + 1) {
        case 1:
            Textures.BlockIcons.LEAVES_AB[1] = Textures.BlockIcons.LEAVES_MAPLE_BROWN;
            Textures.BlockIcons.LEAVES_AB[9] = Textures.BlockIcons.LEAVES_OPAQUE_MAPLE_BROWN;
            break;
        case 9:
            Textures.BlockIcons.LEAVES_AB[1] = Textures.BlockIcons.LEAVES_MAPLE_YELLOW;
            Textures.BlockIcons.LEAVES_AB[9] = Textures.BlockIcons.LEAVES_OPAQUE_MAPLE_YELLOW;
            break;
        case 10:
            Textures.BlockIcons.LEAVES_AB[1] = Textures.BlockIcons.LEAVES_MAPLE_ORANGE;
            Textures.BlockIcons.LEAVES_AB[9] = Textures.BlockIcons.LEAVES_OPAQUE_MAPLE_ORANGE;
            break;
        case 11:
            Textures.BlockIcons.LEAVES_AB[1] = Textures.BlockIcons.LEAVES_MAPLE_RED;
            Textures.BlockIcons.LEAVES_AB[9] = Textures.BlockIcons.LEAVES_OPAQUE_MAPLE_RED;
            break;
        case 12:
            Textures.BlockIcons.LEAVES_AB[1] = Textures.BlockIcons.LEAVES_MAPLE_BROWN;
            Textures.BlockIcons.LEAVES_AB[9] = Textures.BlockIcons.LEAVES_OPAQUE_MAPLE_BROWN;
            break;
    }
}
Also used : RendererBlockTextured(gregapi.render.RendererBlockTextured) RendererBlockFluid(gregapi.render.RendererBlockFluid) RenderFallingBlock(net.minecraft.client.renderer.entity.RenderFallingBlock) Date(java.util.Date)

Example 2 with RenderFallingBlock

use of net.minecraft.client.renderer.entity.RenderFallingBlock in project Lands-of-Icaria by Axanthic-Game-Studios.

the class ClientProxy method preInit.

@Override
public void preInit(FMLPreInitializationEvent event) {
    super.preInit(event);
    MinecraftForge.EVENT_BUS.register(this);
    MinecraftForge.EVENT_BUS.register(new VanillaHandler());
    RenderingRegistry.registerEntityRenderingHandler(EntityBident.class, RenderBident::new);
    RenderingRegistry.registerEntityRenderingHandler(EntityFallingVase.class, RenderFallingBlock::new);
    RenderingRegistry.registerEntityRenderingHandler(EntityGrenade.class, RenderGrenade::new);
    RenderingRegistry.registerEntityRenderingHandler(EntitySpellWisp.class, RenderSpellWisp::new);
    RenderingRegistry.registerEntityRenderingHandler(EntitySpellBubble.class, RenderSpellBubble::new);
    RenderingRegistry.registerEntityRenderingHandler(EntityFloatingBlock.class, RenderFallingBlock::new);
    RenderingRegistry.registerEntityRenderingHandler(EntityAeternae.class, RenderAeternae::new);
    RenderingRegistry.registerEntityRenderingHandler(EntityCatoblepas.class, RenderCatoblepas::new);
    RenderingRegistry.registerEntityRenderingHandler(EntitySnull.class, RenderSnull::new);
    RenderingRegistry.registerEntityRenderingHandler(EntitySow.class, RenderSow::new);
    RenderingRegistry.registerEntityRenderingHandler(EntityJellyfish.class, RenderJellyfish::new);
    RenderingRegistry.registerEntityRenderingHandler(EntityLight.class, RenderLight::new);
    RenderingRegistry.registerEntityRenderingHandler(EntityForestHagPlane.class, RenderForestHagPlane::new);
    RenderingRegistry.registerEntityRenderingHandler(EntityForestHagPopulus.class, RenderForestHagPopulus::new);
    RenderingRegistry.registerEntityRenderingHandler(EntityForestHagCypress.class, RenderForestHagCypress::new);
    RenderingRegistry.registerEntityRenderingHandler(EntityForestHagFir.class, RenderForestHagFir::new);
    RenderingRegistry.registerEntityRenderingHandler(EntityForestHagOlive.class, RenderForestHagOlive::new);
    RenderingRegistry.registerEntityRenderingHandler(EntityForestHagLaurel.class, RenderForestHagLaurel::new);
    RenderingRegistry.registerEntityRenderingHandler(EntityForestHagDroughtroot.class, RenderForestHagDroughtroot::new);
    RenderingRegistry.registerEntityRenderingHandler(EntityArachneDrone.class, RenderArachneDrone::new);
    RenderingRegistry.registerEntityRenderingHandler(EntityArachne.class, RenderArachne::new);
    RenderingRegistry.registerEntityRenderingHandler(EntityMyrmeke.class, RenderMyrmeke::new);
    RenderingRegistry.registerEntityRenderingHandler(EntityCerver.class, RenderCerver::new);
    RenderingRegistry.registerEntityRenderingHandler(EntityArganHound.class, RenderArganHound::new);
    RenderingRegistry.registerEntityRenderingHandler(EntityRevenantCivilian.class, RenderRevenantCivilian::new);
    RenderingRegistry.registerEntityRenderingHandler(EntityRevenantSoldier.class, RenderRevenantSoldier::new);
    RenderingRegistry.registerEntityRenderingHandler(EntityRevenantCaptain.class, RenderRevenantCaptain::new);
    RenderingRegistry.registerEntityRenderingHandler(EntityRevenantPyromancer.class, RenderRevenantPyromancer::new);
    RenderingRegistry.registerEntityRenderingHandler(EntityRevenantPyromancerNether.class, RenderRevenantPyromancerNether::new);
    RenderingRegistry.registerEntityRenderingHandler(EntityRevenantCrawler.class, RenderRevenantCrawler::new);
    RenderingRegistry.registerEntityRenderingHandler(EntityRevenantOvergrown.class, RenderRevenantOvergrown::new);
    RenderingRegistry.registerEntityRenderingHandler(EntitySiren.class, RenderSiren::new);
    RenderingRegistry.registerEntityRenderingHandler(EntityScorpion.class, RenderScorpion::new);
    RenderingRegistry.registerEntityRenderingHandler(EntitySolifugae.class, RenderSolifugae::new);
    RenderingRegistry.registerEntityRenderingHandler(EntityVinegaroon.class, RenderVinegaroon::new);
    RenderingRegistry.registerEntityRenderingHandler(EntityVinegar.class, RenderVinegar::new);
    RenderingRegistry.registerEntityRenderingHandler(EntityWhipSpider.class, RenderWhipSpider::new);
    emissiveTextures.put("calcite", new String[] { ModInformation.ID + ":blocks/gem_calcite_model" });
    emissiveTextures.put("halite", new String[] { ModInformation.ID + ":blocks/gem_halite_model" });
    emissiveTextures.put("jasper", new String[] { ModInformation.ID + ":blocks/gem_jasper_model" });
    emissiveTextures.put("zircon", new String[] { ModInformation.ID + ":blocks/gem_zircon_model" });
    emissiveTextures.put("block_gem", new String[] { ModInformation.ID + ":blocks/mineral_calcite_block", ModInformation.ID + ":blocks/mineral_halite_block", ModInformation.ID + ":blocks/mineral_jasper_block", ModInformation.ID + ":blocks/mineral_zircon_block" });
    emissiveTextures.put("block_metal", new String[] { ModInformation.ID + ":blocks/metal_bluridium_block" });
    emissiveTextures.put("ore", new String[] { ModInformation.ID + ":blocks/rock_baetyl_ore_bluridium_overlay" });
    emissiveTextures.put("icaria_portal", new String[] { ModInformation.ID + ":blocks/icaria_portal" });
    // emissiveTextures.put("crafting_forge", new String[]{ ModInformation.ID + ":blocks/crafting_forge_fire" });
    // emissiveTextures.put("crafting_kiln", new String[]{ ModInformation.ID + ":blocks/crafting_kiln_fire" });
    LOIItemStackRenderer.LOIInstance = new LOIItemStackRenderer();
    if (LOIConfig.hud.indicatorEnabled)
        MinecraftForge.EVENT_BUS.register(new GuiStatIndicator());
}
Also used : LOIItemStackRenderer(com.axanthic.loi.utils.LOIItemStackRenderer) VanillaHandler(com.axanthic.loi.utils.VanillaHandler) GuiStatIndicator(com.axanthic.loi.gui.GuiStatIndicator) RenderFallingBlock(net.minecraft.client.renderer.entity.RenderFallingBlock)

Aggregations

RenderFallingBlock (net.minecraft.client.renderer.entity.RenderFallingBlock)2 GuiStatIndicator (com.axanthic.loi.gui.GuiStatIndicator)1 LOIItemStackRenderer (com.axanthic.loi.utils.LOIItemStackRenderer)1 VanillaHandler (com.axanthic.loi.utils.VanillaHandler)1 RendererBlockFluid (gregapi.render.RendererBlockFluid)1 RendererBlockTextured (gregapi.render.RendererBlockTextured)1 Date (java.util.Date)1