本文整理汇总了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;
}
示例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);
}
示例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();
}
示例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();
}
}
}
示例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);
}
}
示例6: onClientDisconnect
import net.minecraftforge.fml.common.network.FMLNetworkEvent; //导入方法依赖的package包/类
@SubscribeEvent
public void onClientDisconnect(FMLNetworkEvent.ClientDisconnectionFromServerEvent event)
{
Minecraft.getMinecraft().addScheduledTask(this::disconnectFromServer);
}
示例7: clientDisconnect
import net.minecraftforge.fml.common.network.FMLNetworkEvent; //导入方法依赖的package包/类
@SubscribeEvent
public void clientDisconnect(FMLNetworkEvent.ClientDisconnectionFromServerEvent evt)
{
CreeperHost.instance.curServerId = -1;
}
示例8: onDisconnect
import net.minecraftforge.fml.common.network.FMLNetworkEvent; //导入方法依赖的package包/类
@SubscribeEvent
public void onDisconnect(FMLNetworkEvent.ClientDisconnectionFromServerEvent event) {
publicLog = null;
}
示例9: onLogout
import net.minecraftforge.fml.common.network.FMLNetworkEvent; //导入方法依赖的package包/类
@SubscribeEvent
public static void onLogout(FMLNetworkEvent.ClientDisconnectionFromServerEvent event)
{
executorService.shutdown();
}
示例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);
}
示例11: onClientDisconnect
import net.minecraftforge.fml.common.network.FMLNetworkEvent; //导入方法依赖的package包/类
@SubscribeEvent
public void onClientDisconnect(FMLNetworkEvent.ClientDisconnectionFromServerEvent event)
{
onClientConnection();
}
示例12: purgeDisconnect
import net.minecraftforge.fml.common.network.FMLNetworkEvent; //导入方法依赖的package包/类
@SubscribeEvent
public void purgeDisconnect(FMLNetworkEvent.ClientDisconnectionFromServerEvent event) {
PlayerStructureSelectionHelper.clientSelection = null;
ClientProxy.renderHelper.unloadWorld();
}
示例13: onDisconnect
import net.minecraftforge.fml.common.network.FMLNetworkEvent; //导入方法依赖的package包/类
@SubscribeEvent
public void onDisconnect(FMLNetworkEvent.ClientDisconnectionFromServerEvent e){
ColorStateHandler.getInstance().clean();
}
示例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);
}
示例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]"));
}