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