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


Java FMLNetworkEvent.ClientDisconnectionFromServerEvent方法代码示例

本文整理汇总了Java中net.minecraftforge.fml.common.network.FMLNetworkEvent.ClientDisconnectionFromServerEvent方法的典型用法代码示例。如果您正苦于以下问题:Java FMLNetworkEvent.ClientDisconnectionFromServerEvent方法的具体用法?Java FMLNetworkEvent.ClientDisconnectionFromServerEvent怎么用?Java FMLNetworkEvent.ClientDisconnectionFromServerEvent使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在net.minecraftforge.fml.common.network.FMLNetworkEvent的用法示例。


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

示例1: onClientDisconnect

import net.minecraftforge.fml.common.network.FMLNetworkEvent; //导入方法依赖的package包/类
@SubscribeEvent
public void onClientDisconnect(FMLNetworkEvent.ClientDisconnectionFromServerEvent event)
{
    Hats.eventHandlerClient.hats.clear();
    Hats.eventHandlerClient.mobHats.clear();
    Hats.eventHandlerClient.playerWornHats.clear();
    Hats.eventHandlerClient.requestedHats.clear();
    if(Hats.eventHandlerClient.guiHatUnlocked != null)
    {
        Hats.eventHandlerClient.guiHatUnlocked.hatList.clear();
    }
    if(Hats.eventHandlerClient.guiNewTradeReq != null)
    {
        Hats.eventHandlerClient.guiNewTradeReq.hatList.clear();
    }
    Hats.eventHandlerClient.worldInstance = null;
}
 
开发者ID:iChun,项目名称:Hats,代码行数:18,代码来源:EventHandlerClient.java

示例2: onClientDisconnectFromServer

import net.minecraftforge.fml.common.network.FMLNetworkEvent; //导入方法依赖的package包/类
@SubscribeEvent
@SuppressWarnings("unused")
public void onClientDisconnectFromServer(FMLNetworkEvent.ClientDisconnectionFromServerEvent event) {
    EntityPlayer player = ManeuverGear.proxy.getClientPlayer();
    if(player == null) {
        return;
    }
    unEquipGear(player);
}
 
开发者ID:InfinityRaider,项目名称:3DManeuverGear,代码行数:10,代码来源:DartHandler.java

示例3: OnClientDisconnectEvent

import net.minecraftforge.fml.common.network.FMLNetworkEvent; //导入方法依赖的package包/类
/**
 * This is used to clear out the server configuration on the client side.
 * @param event The event object.
 */
@SubscribeEvent
public static void OnClientDisconnectEvent(FMLNetworkEvent.ClientDisconnectionFromServerEvent event)
{
	// When the player logs out, make sure to re-set the server configuration. 
 	// This is so a new configuration can be successfully loaded when they switch servers or worlds (on single player.
 	((ClientProxy)Prefab.proxy).serverConfiguration = null;
 	ClientEventHandler.playerConfig.clearNonPersistedObjects();
}
 
开发者ID:Brian-Wuest,项目名称:MC-Prefab,代码行数:13,代码来源:ClientEventHandler.java

示例4: onClientDisconnect

import net.minecraftforge.fml.common.network.FMLNetworkEvent; //导入方法依赖的package包/类
@SubscribeEvent
public void onClientDisconnect(FMLNetworkEvent.ClientDisconnectionFromServerEvent event)
{
    if(renderGlobalProxy != null && renderGlobalProxy.theWorld != null)
    {
        if(saveLocation != null)
        {
            saveLocation.getParentFile().mkdirs();
            try
            {
                FileOutputStream stream = new FileOutputStream(saveLocation);
                stream.write(IOUtil.compress((new Gson()).toJson(MapSaveFile.create())));
                stream.close();
            }
            catch(Exception e)
            {
                Blocksteps.LOGGER.warn("Error saving file: " + saveLocation);
            }

            saveLocation = null;
        }
        setNewWorld(null);
        steps.clear();
        blocksToRenderByStep.clear();
        ChunkStore.clear();
        synchronized(Blocksteps.eventHandler.threadCheckBlocks.checks)
        {
            Blocksteps.eventHandler.threadCheckBlocks.checks.clear();
        }
    }
}
 
开发者ID:iChun,项目名称:Blocksteps,代码行数:32,代码来源:EventHandlerClient.java

示例5: onClientDisconnect

import net.minecraftforge.fml.common.network.FMLNetworkEvent; //导入方法依赖的package包/类
@SubscribeEvent
public void onClientDisconnect(FMLNetworkEvent.ClientDisconnectionFromServerEvent event)
{
    IThreadListener thread = Minecraft.getMinecraft();
    if(thread.isCallingFromMinecraftThread())
    {
        onClientDisconnect();
    }
    else
    {
        thread.addScheduledTask(this::onClientDisconnect);
    }
}
 
开发者ID:iChun,项目名称:iChunUtil,代码行数:14,代码来源:EventHandlerClient.java

示例6: onClientDisconnect

import net.minecraftforge.fml.common.network.FMLNetworkEvent; //导入方法依赖的package包/类
@SubscribeEvent
public void onClientDisconnect(FMLNetworkEvent.ClientDisconnectionFromServerEvent event)
{
    Minecraft.getMinecraft().addScheduledTask(this::disconnectFromServer);
}
 
开发者ID:iChun,项目名称:GeneralLaymansAestheticSpyingScreen,代码行数:6,代码来源:EventHandlerClient.java

示例7: clientDisconnect

import net.minecraftforge.fml.common.network.FMLNetworkEvent; //导入方法依赖的package包/类
@SubscribeEvent
public void clientDisconnect(FMLNetworkEvent.ClientDisconnectionFromServerEvent evt)
{
    CreeperHost.instance.curServerId = -1;
}
 
开发者ID:CreeperHost,项目名称:CreeperHostGui,代码行数:6,代码来源:EventHandler.java

示例8: onDisconnect

import net.minecraftforge.fml.common.network.FMLNetworkEvent; //导入方法依赖的package包/类
@SubscribeEvent
public void onDisconnect(FMLNetworkEvent.ClientDisconnectionFromServerEvent event) {
    publicLog = null;
}
 
开发者ID:fr1kin,项目名称:ForgeHax,代码行数:5,代码来源:ChatLogger.java

示例9: onLogout

import net.minecraftforge.fml.common.network.FMLNetworkEvent; //导入方法依赖的package包/类
@SubscribeEvent
public static void onLogout(FMLNetworkEvent.ClientDisconnectionFromServerEvent event)
{
    executorService.shutdown();
}
 
开发者ID:OCDiary,项目名称:Twitchy,代码行数:6,代码来源:TCEvents.java

示例10: disconnect

import net.minecraftforge.fml.common.network.FMLNetworkEvent; //导入方法依赖的package包/类
@SubscribeEvent
public static void disconnect(FMLNetworkEvent.ClientDisconnectionFromServerEvent event) {
	SolarApi.getRelativityPowerMap().clear();
	SolarApi.getRelativityMap().clear();
	SolarApi.setQuantumData(null);
}
 
开发者ID:ArekkuusuJerii,项目名称:Solar,代码行数:7,代码来源:ClientProxy.java

示例11: onClientDisconnect

import net.minecraftforge.fml.common.network.FMLNetworkEvent; //导入方法依赖的package包/类
@SubscribeEvent
public void onClientDisconnect(FMLNetworkEvent.ClientDisconnectionFromServerEvent event)
{
    onClientConnection();
}
 
开发者ID:iChun,项目名称:BackTools,代码行数:6,代码来源:EventHandlerClient.java

示例12: purgeDisconnect

import net.minecraftforge.fml.common.network.FMLNetworkEvent; //导入方法依赖的package包/类
@SubscribeEvent
public void purgeDisconnect(FMLNetworkEvent.ClientDisconnectionFromServerEvent event) {
    PlayerStructureSelectionHelper.clientSelection = null;
    ClientProxy.renderHelper.unloadWorld();
}
 
开发者ID:HellFirePvP,项目名称:ModularMachinery,代码行数:6,代码来源:SelectionBoxRenderHelper.java

示例13: onDisconnect

import net.minecraftforge.fml.common.network.FMLNetworkEvent; //导入方法依赖的package包/类
@SubscribeEvent
public void onDisconnect(FMLNetworkEvent.ClientDisconnectionFromServerEvent e){
    ColorStateHandler.getInstance().clean();
}
 
开发者ID:Tencao,项目名称:SAO-UI---1.8.8,代码行数:5,代码来源:EventCore.java

示例14: disconnectFromServer

import net.minecraftforge.fml.common.network.FMLNetworkEvent; //导入方法依赖的package包/类
@SubscribeEvent(priority = EventPriority.NORMAL)
public void disconnectFromServer(FMLNetworkEvent.ClientDisconnectionFromServerEvent event) {
    HotbarLogic.setHasCoreMod(false);
    HotbarLogic.setSentPlayerMessage(false);
}
 
开发者ID:rolandoislas,项目名称:multi-hotbar,代码行数:6,代码来源:EventHandlerClient.java

示例15: onPlayerLeaveServer

import net.minecraftforge.fml.common.network.FMLNetworkEvent; //导入方法依赖的package包/类
@SubscribeEvent
public void onPlayerLeaveServer(FMLNetworkEvent.ClientDisconnectionFromServerEvent e)
{
    ConcurrentUtil.executor.execute(() ->
            DiscordCE.client.getAccountManager().setGame("Minecraft [Menus]"));
}
 
开发者ID:duke605,项目名称:DiscordCE,代码行数:7,代码来源:MinecraftEventHandler.java


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