當前位置: 首頁>>代碼示例>>Java>>正文


Java GameData.initializeServerGate方法代碼示例

本文整理匯總了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)
    {
    }
}
 
開發者ID:HATB0T,項目名稱:RuneCraftery,代碼行數:23,代碼來源:ModIdMapPacket.java

示例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)
    {
    }
}
 
開發者ID:HATB0T,項目名稱:RuneCraftery,代碼行數:23,代碼來源:ModIdMapPacket.java

示例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);
}
 
開發者ID:HATB0T,項目名稱:RuneCraftery,代碼行數:10,代碼來源:FMLServerHandler.java

示例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();
    }

}
 
開發者ID:HATB0T,項目名稱:RuneCraftery,代碼行數:41,代碼來源:Minecraft.java


注:本文中的cpw.mods.fml.common.registry.GameData.initializeServerGate方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。