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


Java Chunk.getChunkCoordIntPair方法代码示例

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


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

示例1: getPendingBlockUpdates

import net.minecraft.world.chunk.Chunk; //导入方法依赖的package包/类
public List<NextTickListEntry> getPendingBlockUpdates(Chunk chunkIn, boolean p_72920_2_)
{
    ChunkCoordIntPair chunkcoordintpair = chunkIn.getChunkCoordIntPair();
    int i = (chunkcoordintpair.chunkXPos << 4) - 2;
    int j = i + 16 + 2;
    int k = (chunkcoordintpair.chunkZPos << 4) - 2;
    int l = k + 16 + 2;
    return this.func_175712_a(new StructureBoundingBox(i, 0, k, j, 256, l), p_72920_2_);
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:10,代码来源:WorldServer.java

示例2: getPendingBlockUpdates

import net.minecraft.world.chunk.Chunk; //导入方法依赖的package包/类
@Nullable
public List<NextTickListEntry> getPendingBlockUpdates(Chunk chunkIn, boolean p_72920_2_)
{
    ChunkPos chunkpos = chunkIn.getChunkCoordIntPair();
    int i = (chunkpos.chunkXPos << 4) - 2;
    int j = i + 16 + 2;
    int k = (chunkpos.chunkZPos << 4) - 2;
    int l = k + 16 + 2;
    return this.getPendingBlockUpdates(new StructureBoundingBox(i, 0, k, j, 256, l), p_72920_2_);
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:11,代码来源:WorldServer.java

示例3: canPlayerEditChunk

import net.minecraft.world.chunk.Chunk; //导入方法依赖的package包/类
static boolean canPlayerEditChunk(World world, EntityPlayer player, Chunk chunk) 
{
	// Safeties
	if (player == null) { return false; }	// Who're you?
	if (world == null) { return false; }	// Where are you?
	if (chunk == null) { return false; }	// What're you trying to do?
	
	// Step 1, is the chunk claimed by any particular faction?
	ChunkPos chunkPos = chunk.getChunkCoordIntPair();
	
	_FactionSaveData faction = getFactionByChunkPos(world.provider.getDimension(), chunkPos);
	
	if (faction == null)
	{
		// Isn't claimed by any faction, so no contest there.
		return true;
	}
	
	if (!faction.isProtected())
	{
		// Isn't currently protected
		return true;
	}
	
	// Step 2, is the player is a member of that faction?
	return isPlayerMemberOfFaction(faction.getID(), player, player.capabilities.isCreativeMode);	// If you are you get to edit the chunk.
}
 
开发者ID:Domochevsky,项目名称:minecraft-territorialdealings,代码行数:28,代码来源:TerritoryHandler.java


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