net.minecraftforge.fml.event.lifecycle.FMLClientSetupEvent Java Examples

The following examples show how to use net.minecraftforge.fml.event.lifecycle.FMLClientSetupEvent. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ProxyClient.java    From EnderStorage with MIT License 6 votes vote down vote up
@Override
public void clientSetup(FMLClientSetupEvent event) {
    ScreenManager.registerFactory(ModContent.containerItemStorage, GuiEnderItemStorage::new);

    spriteHelper.addIIconRegister(EnderPouchBakery.INSTANCE);
    ClientRegistry.bindTileEntityRenderer(tileEnderChestType, RenderTileEnderChest::new);
    ClientRegistry.bindTileEntityRenderer(tileEnderTankType, RenderTileEnderTank::new);

    if (!EnderStorageConfig.disableCreatorVisuals) {
        for (PlayerRenderer renderPlayer : Minecraft.getInstance().getRenderManager().getSkinMap().values()) {
            renderPlayer.addLayer(new TankLayerRenderer(renderPlayer));
        }
    }

    ModelResourceLocation invLocation = new ModelResourceLocation(itemEnderPouch.getRegistryName(), "inventory");
    modelHelper.register(invLocation, new CCBakeryModel());
    ModelBakery.registerItemKeyGenerator(itemEnderPouch, stack -> {
        Frequency frequency = Frequency.readFromStack(stack);
        boolean open = EnderStorageManager.instance(true).getStorage(frequency, EnderItemStorage.TYPE).openCount() > 0;
        return ModelBakery.defaultItemKeyGenerator.generateKey(stack) + "|" + frequency.toModelLoc() + "|" + open;
    });

    modelHelper.register(new ModelResourceLocation(itemEnderChest.getRegistryName(), "inventory"), new EnderChestItemRender());
    modelHelper.register(new ModelResourceLocation(itemEnderTank.getRegistryName(), "inventory"), new EnderTankItemRender());
}
 
Example #2
Source File: ForgeClientSparkPlugin.java    From spark with GNU General Public License v3.0 5 votes vote down vote up
public static void register(ForgeSparkMod mod, FMLClientSetupEvent event) {
    Minecraft minecraft = event.getMinecraftSupplier().get();

    ForgeClientSparkPlugin plugin = new ForgeClientSparkPlugin(mod, minecraft);
    MinecraftForge.EVENT_BUS.register(plugin);

    plugin.scheduler.scheduleWithFixedDelay(plugin::checkCommandRegistered, 10, 10, TimeUnit.SECONDS);
}
 
Example #3
Source File: ProxyClient.java    From CodeChickenLib with GNU Lesser General Public License v2.1 5 votes vote down vote up
@Override
public void clientSetup(FMLClientSetupEvent event) {
    loadClientConfig();
    //OpenGLUtils.loadCaps();
    //        CustomParticleHandler.init();
    BlockRenderingRegistry.init();
    ModelBakery.init();
    CCRenderEventHandler.init();

    MinecraftForge.EVENT_BUS.register(new MapRenderRegistry());
    //        ClientCommandHandler.instance.registerCommand(new CCLClientCommand());
}
 
Example #4
Source File: SurvivalistMod.java    From Survivalist with BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
public void clientSetup(FMLClientSetupEvent event)
{
    ScreenManager.registerFactory(DryingRackContainer.TYPE, DryingRackScreen::new);
    ScreenManager.registerFactory(SawmillContainer.TYPE, SawmillScreen::new);

    ModelLoaderRegistry.registerLoader(location("rack"), DryingRackBakedModel.ModelLoader.INSTANCE);

    //RenderTypeLookup.setRenderLayer(SurvivalistBlocks.RACK.get(), (layer) -> layer == RenderType.getSolid() || layer == RenderType.getCutout());
}
 
Example #5
Source File: BleachHack.java    From bleachhack-1.14 with GNU General Public License v3.0 4 votes vote down vote up
public void init(FMLClientSetupEvent event) {
	fileReader.readModules();
	fileReader.readSettings();
	ClickGui.clickGui.initWindows();
	fileReader.readClickGui();
}
 
Example #6
Source File: MiningGadgets.java    From MiningGadgets with MIT License 4 votes vote down vote up
/**
 * Only run on the client making it a safe place to register client
 * components. Remember that you shouldn't reference client only
 * methods in this class as it'll crash the mod :P
 */
private void setupClient(final FMLClientSetupEvent event) {
    // Register the container screens.
    ClientSetup.setup();
    MinecraftForge.EVENT_BUS.register(ClientEvents.class);
}
 
Example #7
Source File: ForgeSparkMod.java    From spark with GNU General Public License v3.0 4 votes vote down vote up
@SubscribeEvent
public void clientInit(FMLClientSetupEvent e) {
    ForgeClientSparkPlugin.register(this, e);
}
 
Example #8
Source File: Proxy.java    From EnderStorage with MIT License 4 votes vote down vote up
public void clientSetup(FMLClientSetupEvent event) {
}
 
Example #9
Source File: EnderStorage.java    From EnderStorage with MIT License 4 votes vote down vote up
@SubscribeEvent
public void onClientSetup(FMLClientSetupEvent event) {
    proxy.clientSetup(event);
}
 
Example #10
Source File: CodeChickenLib.java    From CodeChickenLib with GNU Lesser General Public License v2.1 4 votes vote down vote up
@SubscribeEvent
public void onClientSetup(FMLClientSetupEvent event) {
    proxy.clientSetup(event);
}
 
Example #11
Source File: Proxy.java    From CodeChickenLib with GNU Lesser General Public License v2.1 4 votes vote down vote up
public void clientSetup(FMLClientSetupEvent event) {
}