本文整理汇总了Java中net.minecraft.world.World.func_190526_b方法的典型用法代码示例。如果您正苦于以下问题:Java World.func_190526_b方法的具体用法?Java World.func_190526_b怎么用?Java World.func_190526_b使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类net.minecraft.world.World
的用法示例。
在下文中一共展示了World.func_190526_b方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getClosestStrongholdPos
import net.minecraft.world.World; //导入方法依赖的package包/类
public BlockPos getClosestStrongholdPos(World worldIn, BlockPos pos, boolean p_180706_3_)
{
int i = 1000;
int j = pos.getX() >> 4;
int k = pos.getZ() >> 4;
for (int l = 0; l <= 1000; ++l)
{
for (int i1 = -l; i1 <= l; ++i1)
{
boolean flag = i1 == -l || i1 == l;
for (int j1 = -l; j1 <= l; ++j1)
{
boolean flag1 = j1 == -l || j1 == l;
if (flag || flag1)
{
int k1 = j + i1;
int l1 = k + j1;
this.rand.setSeed((long)(k1 ^ l1) ^ worldIn.getSeed());
this.rand.nextInt();
if (this.canSpawnStructureAtCoords(k1, l1) && (!p_180706_3_ || !worldIn.func_190526_b(k1, l1)))
{
return new BlockPos((k1 << 4) + 8, 64, (l1 << 4) + 8);
}
}
}
}
}
return null;
}
示例2: getClosestStrongholdPos
import net.minecraft.world.World; //导入方法依赖的package包/类
public BlockPos getClosestStrongholdPos(World worldIn, BlockPos pos, boolean p_180706_3_)
{
int i = 1000;
int j = pos.getX() >> 4;
int k = pos.getZ() >> 4;
for (int l = 0; l <= 1000; ++l)
{
for (int i1 = -l; i1 <= l; ++i1)
{
boolean flag = i1 == -l || i1 == l;
for (int j1 = -l; j1 <= l; ++j1)
{
boolean flag1 = j1 == -l || j1 == l;
if (flag || flag1)
{
int k1 = j + i1;
int l1 = k + j1;
if (this.canSpawnStructureAtCoords(k1, l1) && (!p_180706_3_ || !worldIn.func_190526_b(k1, l1)))
{
return new BlockPos((k1 << 4) + 8, 64, (l1 << 4) + 8);
}
}
}
}
}
return null;
}
示例3: func_191069_a
import net.minecraft.world.World; //导入方法依赖的package包/类
protected static BlockPos func_191069_a(World p_191069_0_, MapGenStructure p_191069_1_, BlockPos p_191069_2_, int p_191069_3_, int p_191069_4_, int p_191069_5_, boolean p_191069_6_, int p_191069_7_, boolean p_191069_8_)
{
int i = p_191069_2_.getX() >> 4;
int j = p_191069_2_.getZ() >> 4;
int k = 0;
for (Random random = new Random(); k <= p_191069_7_; ++k)
{
for (int l = -k; l <= k; ++l)
{
boolean flag = l == -k || l == k;
for (int i1 = -k; i1 <= k; ++i1)
{
boolean flag1 = i1 == -k || i1 == k;
if (flag || flag1)
{
int j1 = i + p_191069_3_ * l;
int k1 = j + p_191069_3_ * i1;
if (j1 < 0)
{
j1 -= p_191069_3_ - 1;
}
if (k1 < 0)
{
k1 -= p_191069_3_ - 1;
}
int l1 = j1 / p_191069_3_;
int i2 = k1 / p_191069_3_;
Random random1 = p_191069_0_.setRandomSeed(l1, i2, p_191069_5_);
l1 = l1 * p_191069_3_;
i2 = i2 * p_191069_3_;
if (p_191069_6_)
{
l1 = l1 + (random1.nextInt(p_191069_3_ - p_191069_4_) + random1.nextInt(p_191069_3_ - p_191069_4_)) / 2;
i2 = i2 + (random1.nextInt(p_191069_3_ - p_191069_4_) + random1.nextInt(p_191069_3_ - p_191069_4_)) / 2;
}
else
{
l1 = l1 + random1.nextInt(p_191069_3_ - p_191069_4_);
i2 = i2 + random1.nextInt(p_191069_3_ - p_191069_4_);
}
MapGenBase.func_191068_a(p_191069_0_.getSeed(), random, l1, i2);
random.nextInt();
if (p_191069_1_.canSpawnStructureAtCoords(l1, i2))
{
if (!p_191069_8_ || !p_191069_0_.func_190526_b(l1, i2))
{
return new BlockPos((l1 << 4) + 8, 64, (i2 << 4) + 8);
}
}
else if (k == 0)
{
break;
}
}
}
if (k == 0)
{
break;
}
}
}
return null;
}