本文整理汇总了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);
}
}
}
示例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;
}
}
示例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);
}
}
示例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;
}
}
}