本文整理匯總了Java中cpw.mods.fml.common.registry.GameData.initializeServerGate方法的典型用法代碼示例。如果您正苦於以下問題:Java GameData.initializeServerGate方法的具體用法?Java GameData.initializeServerGate怎麽用?Java GameData.initializeServerGate使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類cpw.mods.fml.common.registry.GameData
的用法示例。
在下文中一共展示了GameData.initializeServerGate方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: execute
import cpw.mods.fml.common.registry.GameData; //導入方法依賴的package包/類
@Override
public void execute(INetworkManager network, FMLNetworkHandler handler, NetHandler netHandler, String userName)
{
byte[] allData = Bytes.concat(partials);
GameData.initializeServerGate(1);
try
{
NBTTagCompound serverList = CompressedStreamTools.func_74792_a(allData);
NBTTagList list = serverList.func_74761_m("List");
Set<ItemData> itemData = GameData.buildWorldItemData(list);
GameData.validateWorldSave(itemData);
MapDifference<Integer, ItemData> serverDifference = GameData.gateWorldLoadingForValidation();
if (serverDifference!=null)
{
FMLCommonHandler.instance().disconnectIDMismatch(serverDifference, netHandler, network);
}
}
catch (IOException e)
{
}
}
示例2: execute
import cpw.mods.fml.common.registry.GameData; //導入方法依賴的package包/類
@Override
public void execute(INetworkManager network, FMLNetworkHandler handler, NetHandler netHandler, String userName)
{
byte[] allData = Bytes.concat(partials);
GameData.initializeServerGate(1);
try
{
NBTTagCompound serverList = CompressedStreamTools.decompress(allData);
NBTTagList list = serverList.getTagList("List");
Set<ItemData> itemData = GameData.buildWorldItemData(list);
GameData.validateWorldSave(itemData);
MapDifference<Integer, ItemData> serverDifference = GameData.gateWorldLoadingForValidation();
if (serverDifference!=null)
{
FMLCommonHandler.instance().disconnectIDMismatch(serverDifference, netHandler, network);
}
}
catch (IOException e)
{
}
}
示例3: finishServerLoading
import cpw.mods.fml.common.registry.GameData; //導入方法依賴的package包/類
/**
* Called a bit later on during server initialization to finish loading mods
*/
public void finishServerLoading()
{
Loader.instance().initializeMods();
LanguageRegistry.reloadLanguageTable();
GameData.initializeServerGate(1);
}
示例4: launchIntegratedServer
import cpw.mods.fml.common.registry.GameData; //導入方法依賴的package包/類
/**
* Arguments: World foldername, World ingame name, WorldSettings
*/
public void launchIntegratedServer(String par1Str, String par2Str, WorldSettings par3WorldSettings)
{
this.loadWorld((WorldClient)null);
System.gc();
ISaveHandler isavehandler = this.saveLoader.getSaveLoader(par1Str, false);
WorldInfo worldinfo = isavehandler.loadWorldInfo();
if (worldinfo == null && par3WorldSettings != null)
{
worldinfo = new WorldInfo(par3WorldSettings, par1Str);
isavehandler.saveWorldInfo(worldinfo);
}
if (par3WorldSettings == null)
{
par3WorldSettings = new WorldSettings(worldinfo);
}
this.statFileWriter.readStat(StatList.startGameStat, 1);
GameData.initializeServerGate(2);
this.theIntegratedServer = new IntegratedServer(this, par1Str, par2Str, par3WorldSettings);
this.theIntegratedServer.startServerThread();
MapDifference<Integer, ItemData> idDifferences = GameData.gateWorldLoadingForValidation();
if (idDifferences!=null)
{
FMLClientHandler.instance().warnIDMismatch(idDifferences, true);
}
else
{
GameData.releaseGate(true);
continueWorldLoading();
}
}