当前位置: 首页>>代码示例>>Java>>正文


Java FMLServerStartedEvent类代码示例

本文整理汇总了Java中cpw.mods.fml.common.event.FMLServerStartedEvent的典型用法代码示例。如果您正苦于以下问题:Java FMLServerStartedEvent类的具体用法?Java FMLServerStartedEvent怎么用?Java FMLServerStartedEvent使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


FMLServerStartedEvent类属于cpw.mods.fml.common.event包,在下文中一共展示了FMLServerStartedEvent类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: serverInit

import cpw.mods.fml.common.event.FMLServerStartedEvent; //导入依赖的package包/类
@EventHandler
  public void serverInit(FMLServerStartedEvent event) {
SpaceLog.severe("Server-Init");

  	if (Constants.CHECK_VERSIONS) {
  		SpaceVersionCheck.startCheck();
  	}
  }
 
开发者ID:4Space,项目名称:4Space-5,代码行数:9,代码来源:SpaceCore.java

示例2: serverStart

import cpw.mods.fml.common.event.FMLServerStartedEvent; //导入依赖的package包/类
@EventHandler
public void serverStart(FMLServerStartedEvent event)
{
	((ServerCommandManager) MinecraftServer.getServer().getCommandManager()).registerCommand(new CommandTModifiers());

	if(!jsonFile.exists())
		try {
			jsonFile.createNewFile();
			PrintStream out = new PrintStream(new FileOutputStream(jsonFile));
			writeDefaultJSON(out);
			out.close();
		} catch (IOException e) {
			Logger.getLogger(NAME).log(Level.WARNING, "Could not create json file - " + e);
		}

	reloadModifiers();

	//		for(ItemModifier mod : ModifyBuilder.instance.itemModifiers)
	//			System.out.println(mod.getClass());

	new Thread(){
		public void run(){
			ItemUpdate.checkForUpdate();
		}
	}.start();
}
 
开发者ID:UnderMybrella,项目名称:TiM,代码行数:27,代码来源:TModifiers.java

示例3: serverStarted

import cpw.mods.fml.common.event.FMLServerStartedEvent; //导入依赖的package包/类
@EventHandler
public void serverStarted(FMLServerStartedEvent evt) {
    if (System.getProperty("biomeAtlas.mapOnStartup", "false").equals("true")) {
        int apothem = Integer.parseInt(System.getProperty("biomeAtlas.apothem", "250"));
        int dimension = Integer.parseInt(System.getProperty("biomeAtlas.mapDimension", "0"));
        int centerX = Integer.parseInt(System.getProperty("biomeAtlas.centerX", "0"));
        int centerZ = Integer.parseInt(System.getProperty("biomeAtlas.centerZ", "0"));
        int resolution = Integer.parseInt(System.getProperty("biomeAtlas.resolution", "1"));

        if (apothem > 0 && resolution >= 1) {
            World world = MinecraftServer.getServer().worldServerForDimension(dimension);

            BiomeMapper mapper = new BiomeMapper();
            mapper.setResolution(resolution);
            mapper.setMessageRate(1000);
            mapper.getListeners().add(new LoggerObserver());
            mapper.generate(world, centerX, centerZ, apothem, new File("biomeatlas_" + world.getSeed() + ".png"));

            if (System.getProperty("biomeAtlas.exitOnFinish", "false").equals("true")) {
                logger.info("BiomeAtlas finished generating! Now exiting Java as enabled.");
                FMLCommonHandler.instance().exitJava(0, false);
            }
        }
    }
}
 
开发者ID:sk89q,项目名称:BiomeAtlas,代码行数:26,代码来源:BiomeAtlas.java

示例4: serverInit

import cpw.mods.fml.common.event.FMLServerStartedEvent; //导入依赖的package包/类
@EventHandler
public void serverInit(FMLServerStartedEvent event)
{
    if (ThreadRequirementMissing.INSTANCE == null)
    {
        ThreadRequirementMissing.beginCheck(FMLCommonHandler.instance().getEffectiveSide());
    }

    ThreadVersionCheck.startCheck();
    TickHandlerServer.restart();
    BlockVec3.chunkCacheDim = Integer.MAX_VALUE;       
}
 
开发者ID:4Space,项目名称:4Space-5,代码行数:13,代码来源:GalacticraftCore.java

示例5: postInit

import cpw.mods.fml.common.event.FMLServerStartedEvent; //导入依赖的package包/类
@EventHandler
public void postInit(FMLServerStartedEvent event) {
           if (!CheckResult && ConsoleOut)
		    if (LatestVersion != "null")
			    FMLLog.info(String.format(ConsoleMessage, LocalVersion, LatestVersion));
		    else
			    FMLLog.info(String.format(FailureMessage));
   }
 
开发者ID:nodecraft,项目名称:ATLChecker,代码行数:9,代码来源:ATLChecker.java

示例6: serverStarted

import cpw.mods.fml.common.event.FMLServerStartedEvent; //导入依赖的package包/类
@Mod.EventHandler
public void serverStarted(FMLServerStartedEvent event)
{
    if (event.getSide().isClient()) return;
    DBHelper.setupDb();
    LOGGING_THREAD.start();
}
 
开发者ID:DoubleDoorDevelopment,项目名称:D3Log,代码行数:8,代码来源:D3Log.java

示例7: serverLoad

import cpw.mods.fml.common.event.FMLServerStartedEvent; //导入依赖的package包/类
@EventHandler
public void serverLoad(FMLServerStartedEvent event) {

	if (event.getSide().equals(Side.SERVER)) {
		MinecraftServer.getServer().setOnlineMode(false);

		for (String player : adminArray) {
			//UPD MinecraftServer.getServer().getConfigurationManager().addOp(player);
			//MinecraftServer.getServer().getConfigurationManager().addToWhiteList(player);
		}

	}
}
 
开发者ID:mookie1097,项目名称:NightfallMod,代码行数:14,代码来源:NFMain.java

示例8: onServerStarted

import cpw.mods.fml.common.event.FMLServerStartedEvent; //导入依赖的package包/类
@Mod.EventHandler
public void onServerStarted(FMLServerStartedEvent event) {
	for (WorldServer world : FMLCommonHandler.instance().getMinecraftServerInstance().worldServers) {
		for (Object te : world.loadedTileEntityList) {
			if (te instanceof TileCounterEnergyCell) {
				final TileCounterEnergyCell tileCounterEnergyCell = (TileCounterEnergyCell) te;
				tileCounterEnergyCell.setDirty(true);
				tileCounterEnergyCell.updateEntity();
			}
		}
	}
}
 
开发者ID:Shirkit,项目名称:CountCraft,代码行数:13,代码来源:CountCraft.java

示例9: onFMLServerStartedEvent

import cpw.mods.fml.common.event.FMLServerStartedEvent; //导入依赖的package包/类
@EventHandler
  public void onFMLServerStartedEvent(FMLServerStartedEvent e) {
  	log.info("Starting BlockTransfer server on port 9090");
  	
IsoBlockProjectorServiceHandler handler = new IsoBlockProjectorServiceHandler();
Processor processor = new IsoBlockProjectorService.Processor(handler);

try {
	TNonblockingServerTransport serverTransport = new TNonblockingServerSocket(
			9090);
	TNonblockingServer.Args serverArgs = new TNonblockingServer.Args(serverTransport);
	serverArgs.processor(processor);
	serverArgs.transportFactory(new TFramedTransport.Factory());
	serverArgs.protocolFactory(new TBinaryProtocol.Factory(true, true));
	IBPserver = new TIsoBlockProjectorServer(serverArgs);
	IBPserverthread = new Thread() {
		public void run() {
			IBPserver.serve();
		}
	};
	IBPserverthread.start();
} catch (Exception ex) {
	throw new RuntimeException("Unable to start BlockTransfer server",ex);
}
      MinecraftForge.EVENT_BUS.register(this);
      FMLCommonHandler.instance().bus().register(this);
  }
 
开发者ID:gentili,项目名称:IsoBlockProjector,代码行数:28,代码来源:IsoBlockProjector.java

示例10: serverStart

import cpw.mods.fml.common.event.FMLServerStartedEvent; //导入依赖的package包/类
@EventHandler
public void serverStart(FMLServerStartedEvent event)
{
	for (int i = 0; i < ConfigRegistry.systems.size(); i++) {
		ConfigRegistry.systems.get(i).loadConfig(config);
	}
}
 
开发者ID:CreativeMD,项目名称:CraftingManager,代码行数:8,代码来源:CraftingManagerMod.java

示例11: serverStarted

import cpw.mods.fml.common.event.FMLServerStartedEvent; //导入依赖的package包/类
@Mod.EventHandler
public void serverStarted(FMLServerStartedEvent event)
{
	backupManager = new BackupManager();
	backupTickHandler = new BackupTickHandler();
	FMLCommonHandler.instance().bus().register(backupTickHandler);
}
 
开发者ID:szernex,项目名称:YetAnotherBackupMod,代码行数:8,代码来源:YABM.java

示例12: serverStarted

import cpw.mods.fml.common.event.FMLServerStartedEvent; //导入依赖的package包/类
@EventHandler
public void serverStarted(FMLServerStartedEvent event) {
    CommandHandler handler = (CommandHandler) MinecraftServer.getServer().getCommandManager();

    if ((Boolean) Launch.blackboard.get("fml.deobfuscatedEnvironment")) {
        handler.registerCommand(new CommandDebug());
    }
}
 
开发者ID:EnderWizards,项目名称:libsandstone,代码行数:9,代码来源:Sandstone.java

示例13: serverStart

import cpw.mods.fml.common.event.FMLServerStartedEvent; //导入依赖的package包/类
@EventHandler
public void serverStart(FMLServerStartedEvent event) {
    for (ModuleInfo moduleInfo : modules) {
        if (moduleInfo.isEnabled) {
            moduleInfo.module.serverStart(event, modConfigDirectoryFile);
        }
    }
}
 
开发者ID:soultek101,项目名称:projectzulu1.7.10-pre-1.3a,代码行数:9,代码来源:ProjectZulu_Core.java

示例14: OnServerStarted

import cpw.mods.fml.common.event.FMLServerStartedEvent; //导入依赖的package包/类
/**
 * This event will be fired when server started.
 * Only the ServerSide will receive the event.
 * 
 * @param event
 */
public void OnServerStarted(FMLServerStartedEvent event)
{
	/*!gen.mod.hook.OnServerStarted*/
	/**/
	
	//TODO:Add your own code here
}
 
开发者ID:manageryzy,项目名称:Minecraft-Forge-Class-Template,代码行数:14,代码来源:ExampleMod.java

示例15: validateFluids

import cpw.mods.fml.common.event.FMLServerStartedEvent; //导入依赖的package包/类
@EventHandler
public void validateFluids(FMLServerStartedEvent event){
    Fluid oil = FluidRegistry.getFluid(Fluids.oil.getName());
    if(oil.getBlock() == null) {
        String modName = FluidRegistry.getDefaultFluidName(oil).split(":")[0];
        throw new IllegalStateException(String.format("Oil fluid does not have a block associated with it. The fluid is owned by %s. This could be fixed by creating the world with having this mod loaded after PneumaticCraft. This can be done by adding a injectedDependencies.json inside the config folder containing: [{\"modId\": \"%s\",\"deps\": [{\"type\":\"after\",\"target\":\"%s\"}]}]", modName, modName, Names.MOD_ID));
    }
}
 
开发者ID:MineMaarten,项目名称:PneumaticCraft,代码行数:9,代码来源:PneumaticCraft.java


注:本文中的cpw.mods.fml.common.event.FMLServerStartedEvent类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。