net.minecraftforge.fml.common.network.FMLNetworkEvent.ClientDisconnectionFromServerEvent Java Examples

The following examples show how to use net.minecraftforge.fml.common.network.FMLNetworkEvent.ClientDisconnectionFromServerEvent. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: PlayerTracker.java    From TFC2 with GNU General Public License v3.0 5 votes vote down vote up
@SubscribeEvent
/**
 * Runs on the client
 */
public void onClientDisconnectServer(ClientDisconnectionFromServerEvent event)
{
	if(WorldGen.getInstance() != null)
	{
		WorldGen.getInstance().resetCache();
		WorldGen.ClearInstances();
		ChunkLoadHandler.loadedCentersMap.clear();
	}
}
 
Example #2
Source File: BackpacksConfig.java    From WearableBackpacks with MIT License 5 votes vote down vote up
/** Resets all synced values of the settings after disconnecting. */
@SideOnly(Side.CLIENT)
@SubscribeEvent
public void onDisconnectedFromServer(ClientDisconnectionFromServerEvent event) {
	if (!_connected) return;
	getSettings().forEach(Setting::resetSynced);
	_connected = false;
}
 
Example #3
Source File: PlanetEventHandler.java    From AdvancedRocketry with MIT License 4 votes vote down vote up
@EventHandler
public void disconnected(ClientDisconnectionFromServerEvent event) {
	zmaster587.advancedRocketry.dimension.DimensionManager.getInstance().unregisterAllDimensions();
}