本文整理汇总了Java中net.minecraft.world.World.func_181545_F方法的典型用法代码示例。如果您正苦于以下问题:Java World.func_181545_F方法的具体用法?Java World.func_181545_F怎么用?Java World.func_181545_F使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类net.minecraft.world.World
的用法示例。
在下文中一共展示了World.func_181545_F方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: func_181655_a
import net.minecraft.world.World; //导入方法依赖的package包/类
protected void func_181655_a(World p_181655_1_, StructureBoundingBox p_181655_2_, int p_181655_3_, int p_181655_4_, int p_181655_5_, int p_181655_6_, int p_181655_7_, int p_181655_8_, boolean p_181655_9_)
{
for (int i = p_181655_4_; i <= p_181655_7_; ++i)
{
for (int j = p_181655_3_; j <= p_181655_6_; ++j)
{
for (int k = p_181655_5_; k <= p_181655_8_; ++k)
{
if (!p_181655_9_ || this.getBlockStateFromPos(p_181655_1_, j, i, k, p_181655_2_).getBlock().getMaterial() != Material.air)
{
if (this.getYWithOffset(i) >= p_181655_1_.func_181545_F())
{
this.setBlockState(p_181655_1_, Blocks.air.getDefaultState(), j, i, k, p_181655_2_);
}
else
{
this.setBlockState(p_181655_1_, field_175822_f, j, i, k, p_181655_2_);
}
}
}
}
}
}
示例2: markAvailableHeight
import net.minecraft.world.World; //导入方法依赖的package包/类
/**
* offsets the structure Bounding Boxes up to a certain height, typically 63 - 10
*/
protected void markAvailableHeight(World worldIn, Random rand, int p_75067_3_)
{
int i = worldIn.func_181545_F() - p_75067_3_;
int j = this.boundingBox.getYSize() + 1;
if (j < i)
{
j += rand.nextInt(i - j);
}
int k = j - this.boundingBox.maxY;
this.boundingBox.offset(0, k, 0);
for (StructureComponent structurecomponent : this.components)
{
structurecomponent.func_181138_a(0, k, 0);
}
}