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


Java Chunk.setLastSaveTime方法代码示例

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


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

示例1: saveChunkData

import net.minecraft.world.chunk.Chunk; //导入方法依赖的package包/类
private void saveChunkData(Chunk p_73242_1_)
{
    if (this.chunkLoader != null)
    {
        try
        {
            p_73242_1_.setLastSaveTime(this.worldObj.getTotalWorldTime());
            this.chunkLoader.saveChunk(this.worldObj, p_73242_1_);
        }
        catch (IOException ioexception)
        {
            logger.error((String)"Couldn\'t save chunk", (Throwable)ioexception);
        }
        catch (MinecraftException minecraftexception)
        {
            logger.error((String)"Couldn\'t save chunk; already in use by another instance of Minecraft?", (Throwable)minecraftexception);
        }
    }
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:20,代码来源:ChunkProviderServer.java

示例2: loadChunkFromFile

import net.minecraft.world.chunk.Chunk; //导入方法依赖的package包/类
@Nullable
private Chunk loadChunkFromFile(int x, int z)
{
    try
    {
        Chunk chunk = this.chunkLoader.loadChunk(this.worldObj, x, z);

        if (chunk != null)
        {
            chunk.setLastSaveTime(this.worldObj.getTotalWorldTime());
            this.chunkGenerator.recreateStructures(chunk, x, z);
        }

        return chunk;
    }
    catch (Exception exception)
    {
        LOGGER.error((String)"Couldn\'t load chunk", (Throwable)exception);
        return null;
    }
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:22,代码来源:ChunkProviderServer.java

示例3: saveChunkData

import net.minecraft.world.chunk.Chunk; //导入方法依赖的package包/类
private void saveChunkData(Chunk chunkIn)
{
    try
    {
        chunkIn.setLastSaveTime(this.worldObj.getTotalWorldTime());
        this.chunkLoader.saveChunk(this.worldObj, chunkIn);
    }
    catch (IOException ioexception)
    {
        LOGGER.error((String)"Couldn\'t save chunk", (Throwable)ioexception);
    }
    catch (MinecraftException minecraftexception)
    {
        LOGGER.error((String)"Couldn\'t save chunk; already in use by another instance of Minecraft?", (Throwable)minecraftexception);
    }
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:17,代码来源:ChunkProviderServer.java

示例4: loadChunkFromFile

import net.minecraft.world.chunk.Chunk; //导入方法依赖的package包/类
private Chunk loadChunkFromFile(int x, int z)
{
    if (this.chunkLoader == null)
    {
        return null;
    }
    else
    {
        try
        {
            Chunk chunk = this.chunkLoader.loadChunk(this.worldObj, x, z);

            if (chunk != null)
            {
                chunk.setLastSaveTime(this.worldObj.getTotalWorldTime());

                if (this.serverChunkGenerator != null)
                {
                    this.serverChunkGenerator.recreateStructures(chunk, x, z);
                }
            }

            return chunk;
        }
        catch (Exception exception)
        {
            logger.error((String)"Couldn\'t load chunk", (Throwable)exception);
            return null;
        }
    }
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:32,代码来源:ChunkProviderServer.java


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