Search in sources :

Example 1 with IKeyConflictContext

use of net.minecraftforge.client.settings.IKeyConflictContext in project ImmersiveEngineering by BluSunrize.

the class ClientProxy method init.

@Override
public void init() {
    super.init();
    ClientEventHandler handler = new ClientEventHandler();
    MinecraftForge.EVENT_BUS.register(handler);
    ((IReloadableResourceManager) ClientUtils.mc().getResourceManager()).registerReloadListener(handler);
    keybind_magnetEquip.setKeyConflictContext(new IKeyConflictContext() {

        @Override
        public boolean isActive() {
            return ClientUtils.mc().currentScreen == null;
        }

        @Override
        public boolean conflicts(IKeyConflictContext other) {
            return false;
        }
    });
    ClientRegistry.registerKeyBinding(keybind_magnetEquip);
    ShaderHelper.initShaders();
    keybind_chemthrowerSwitch.setKeyConflictContext(KeyConflictContext.IN_GAME);
    ClientRegistry.registerKeyBinding(keybind_chemthrowerSwitch);
    // revolverTextureMap = new TextureMap("textures/revolvers",true);
    // revolverTextureMap.setMipmapLevels(Minecraft.getMinecraft().gameSettings.mipmapLevels);
    // Minecraft.getMinecraft().renderEngine.loadTickableTexture(revolverTextureResource, revolverTextureMap);
    // Minecraft.getMinecraft().renderEngine.bindTexture(revolverTextureResource);
    // revolverTextureMap.setBlurMipmapDirect(false, Minecraft.getMinecraft().gameSettings.mipmapLevels > 0);
    // ClientUtils.mc().renderEngine.loadTextureMap(revolverTextureResource, revolverTextureMap);
    nixieFontOptional = IEConfig.nixietubeFont ? new IENixieFontRender() : ClientUtils.font();
    nixieFont = new IENixieFontRender();
    itemFont = new IEItemFontRender();
    TileEntityTeslaCoil.effectMap = ArrayListMultimap.create();
    // //METAL
    // RenderingRegistry.registerBlockHandler(new BlockRenderMetalDevices());
    // RenderingRegistry.registerBlockHandler(new BlockRenderMetalDevices2());
    // RenderingRegistry.registerBlockHandler(new BlockRenderMetalDecoration());
    // RenderingRegistry.registerBlockHandler(new BlockRenderMetalMultiblocks());
    // ClientRegistry.bindTileEntitySpecialRenderer(TileEntityImmersiveConnectable.class, new TileRenderImmersiveConnectable());
    // ClientRegistry.bindTileEntitySpecialRenderer(TileEntityConnectorLV.class, new TileRenderConnectorLV());
    // ClientRegistry.bindTileEntitySpecialRenderer(TileEntityConnectorMV.class, new TileRenderConnectorMV());
    // ClientRegistry.bindTileEntitySpecialRenderer(TileEntityTransformer.class, new TileRenderTransformer());
    // ClientRegistry.bindTileEntitySpecialRenderer(TileEntityRelayHV.class, new TileRenderRelayHV());
    // ClientRegistry.bindTileEntitySpecialRenderer(TileEntityConnectorHV.class, new TileRenderConnectorHV());
    // ClientRegistry.bindTileEntitySpecialRenderer(TileEntityTransformerHV.class, new TileRenderTransformer());
    // ClientRegistry.bindTileEntitySpecialRenderer(TileEntityConnectorStructural.class, new TileRenderConnectorStructural());
    // ClientRegistry.bindTileEntitySpecialRenderer(TileEntityLantern.class, new TileRenderLantern());
    // ClientRegistry.bindTileEntitySpecialRenderer(TileEntityBreakerSwitch.class, new TileRenderBreakerSwitch());
    // ClientRegistry.bindTileEntitySpecialRenderer(TileEntityEnergyMeter.class, new TileRenderEnergyMeter());
    // ClientRegistry.bindTileEntitySpecialRenderer(TileEntityElectricLantern.class, new TileRenderElectricLantern());
    // ClientRegistry.bindTileEntitySpecialRenderer(TileEntityFloodlight.class, new TileRenderFloodlight());
    // ClientRegistry.bindTileEntitySpecialRenderer(TileEntityFluidPipe.class, new TileRenderFluidPipe());
    // ClientRegistry.bindTileEntitySpecialRenderer(TileEntityFluidPump.class, new TileRenderFluidPump());
    // ClientRegistry.bindTileEntitySpecialRenderer(TileEntityRedstoneBreaker.class, new TileRenderRedstoneBreaker());
    ClientRegistry.bindTileEntitySpecialRenderer(TileEntityChargingStation.class, new TileRenderChargingStation());
    ClientRegistry.bindTileEntitySpecialRenderer(TileEntitySampleDrill.class, new TileRenderSampleDrill());
    ClientRegistry.bindTileEntitySpecialRenderer(TileEntityTeslaCoil.class, new TileRenderTeslaCoil());
    ClientRegistry.bindTileEntitySpecialRenderer(TileEntityTurret.class, new TileRenderTurret());
    ClientRegistry.bindTileEntitySpecialRenderer(TileEntityBelljar.class, new TileRenderBelljar());
    // MULTIBLOCKS
    ClientRegistry.bindTileEntitySpecialRenderer(TileEntityMetalPress.class, new TileRenderMetalPress());
    ClientRegistry.bindTileEntitySpecialRenderer(TileEntityCrusher.class, new TileRenderCrusher());
    ClientRegistry.bindTileEntitySpecialRenderer(TileEntitySheetmetalTank.class, new TileRenderSheetmetalTank());
    ClientRegistry.bindTileEntitySpecialRenderer(TileEntitySilo.class, new TileRenderSilo());
    ClientRegistry.bindTileEntitySpecialRenderer(TileEntitySqueezer.class, new TileRenderSqueezer());
    ClientRegistry.bindTileEntitySpecialRenderer(TileEntityDieselGenerator.class, new TileRenderDieselGenerator());
    ClientRegistry.bindTileEntitySpecialRenderer(TileEntityBucketWheel.class, new TileRenderBucketWheel());
    ClientRegistry.bindTileEntitySpecialRenderer(TileEntityArcFurnace.class, new TileRenderArcFurnace());
    ClientRegistry.bindTileEntitySpecialRenderer(TileEntityAutoWorkbench.class, new TileRenderAutoWorkbench());
    ClientRegistry.bindTileEntitySpecialRenderer(TileEntityBottlingMachine.class, new TileRenderBottlingMachine());
    ClientRegistry.bindTileEntitySpecialRenderer(TileEntityMixer.class, new TileRenderMixer());
    // WOOD
    ClientRegistry.bindTileEntitySpecialRenderer(TileEntityWatermill.class, new TileRenderWatermill());
    ClientRegistry.bindTileEntitySpecialRenderer(TileEntityWindmill.class, new TileRenderWindmill());
    ClientRegistry.bindTileEntitySpecialRenderer(TileEntityModWorkbench.class, new TileRenderWorkbench());
    // STONE
    ClientRegistry.bindTileEntitySpecialRenderer(TileEntityCoresample.class, new TileRenderCoresample());
    // CLOTH
    ClientRegistry.bindTileEntitySpecialRenderer(TileEntityShaderBanner.class, new TileRenderShaderBanner());
    /**
     *Colours
     */
    for (Item item : IEContent.registeredIEItems) if (item instanceof IColouredItem && ((IColouredItem) item).hasCustomItemColours())
        ClientUtils.mc().getItemColors().registerItemColorHandler(IEDefaultColourHandlers.INSTANCE, item);
    for (Block block : IEContent.registeredIEBlocks) if (block instanceof IColouredBlock && ((IColouredBlock) block).hasCustomBlockColours())
        ClientUtils.mc().getBlockColors().registerBlockColorHandler(IEDefaultColourHandlers.INSTANCE, block);
    /**
     *Render Layers
     */
    Map<String, RenderPlayer> skinMap = Minecraft.getMinecraft().getRenderManager().getSkinMap();
    RenderPlayer render = skinMap.get("default");
    render.addLayer(new IEBipedLayerRenderer());
    render = skinMap.get("slim");
    render.addLayer(new IEBipedLayerRenderer());
}
Also used : IGuiItem(blusunrize.immersiveengineering.common.items.IEItemInterfaces.IGuiItem) IColouredItem(blusunrize.immersiveengineering.common.items.IEItemInterfaces.IColouredItem) IColouredItem(blusunrize.immersiveengineering.common.items.IEItemInterfaces.IColouredItem) IColouredBlock(blusunrize.immersiveengineering.common.blocks.IEBlockInterfaces.IColouredBlock) IReloadableResourceManager(net.minecraft.client.resources.IReloadableResourceManager) IKeyConflictContext(net.minecraftforge.client.settings.IKeyConflictContext) Block(net.minecraft.block.Block) IColouredBlock(blusunrize.immersiveengineering.common.blocks.IEBlockInterfaces.IColouredBlock) IIEMetaBlock(blusunrize.immersiveengineering.common.blocks.IEBlockInterfaces.IIEMetaBlock)

Aggregations

IColouredBlock (blusunrize.immersiveengineering.common.blocks.IEBlockInterfaces.IColouredBlock)1 IIEMetaBlock (blusunrize.immersiveengineering.common.blocks.IEBlockInterfaces.IIEMetaBlock)1 IColouredItem (blusunrize.immersiveengineering.common.items.IEItemInterfaces.IColouredItem)1 IGuiItem (blusunrize.immersiveengineering.common.items.IEItemInterfaces.IGuiItem)1 Block (net.minecraft.block.Block)1 IReloadableResourceManager (net.minecraft.client.resources.IReloadableResourceManager)1 IKeyConflictContext (net.minecraftforge.client.settings.IKeyConflictContext)1