本文整理汇总了Java中net.minecraftforge.event.world.ChunkWatchEvent.UnWatch方法的典型用法代码示例。如果您正苦于以下问题:Java ChunkWatchEvent.UnWatch方法的具体用法?Java ChunkWatchEvent.UnWatch怎么用?Java ChunkWatchEvent.UnWatch使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类net.minecraftforge.event.world.ChunkWatchEvent
的用法示例。
在下文中一共展示了ChunkWatchEvent.UnWatch方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onChunkUnWatch
import net.minecraftforge.event.world.ChunkWatchEvent; //导入方法依赖的package包/类
@SubscribeEvent
public static void onChunkUnWatch(ChunkWatchEvent.UnWatch e)
{
try
{
GlobalChunkPos pos = new GlobalChunkPos(e.getChunk().x, e.getChunk().z, e.getPlayer().dimension);
NetworkManager.sendTo(new CPacketDesyncSif(pos), e.getPlayer());
}
catch (Exception ex)
{
PurMag.INSTANCE.log.error("Can't desync the SIF chunk data with player!", ex);
}
}
示例2: unwatchChunk
import net.minecraftforge.event.world.ChunkWatchEvent; //导入方法依赖的package包/类
@SubscribeEvent
public void unwatchChunk(ChunkWatchEvent.UnWatch event) {
registrant.unregister(event.chunk.chunkXPos, event.chunk.chunkZPos);
}
示例3: onChunkUnWatch
import net.minecraftforge.event.world.ChunkWatchEvent; //导入方法依赖的package包/类
@SubscribeEvent
public void onChunkUnWatch(ChunkWatchEvent.UnWatch event) {
long index = ChunkPos2Index(event.chunk.chunkXPos, event.chunk.chunkZPos);
VintageTG.packetPipeline.sendTo(new ChunkRemoveNbt(index), event.player);
}
示例4: onChunkUnWatch
import net.minecraftforge.event.world.ChunkWatchEvent; //导入方法依赖的package包/类
@SubscribeEvent
public void onChunkUnWatch(ChunkWatchEvent.UnWatch event) {
long index = ChunkPos2Index(event.chunk.chunkXPos, event.chunk.chunkZPos);
VintageCraft.packetPipeline.sendTo(new ChunkRemoveNbtPacket(index), event.player);
}
示例5: UnloadChunk
import net.minecraftforge.event.world.ChunkWatchEvent; //导入方法依赖的package包/类
@SubscribeEvent
public void UnloadChunk(ChunkWatchEvent.UnWatch event) {
//FMLLog.info("UnloadChunk at (%s,%s) for %s", event.chunk.chunkXPos, event.chunk.chunkZPos, event.player.getDisplayName());
}