@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();
}
}
}
EventHandlerClient.java 文件源码
java
阅读 24
收藏 0
点赞 0
评论 0
项目:Blocksteps
作者:
评论列表
文章目录