Java Code Examples for net.minecraft.world.World.func_181545_F()

The following are Jave code examples for showing how to use func_181545_F() of the net.minecraft.world.World class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
Example 1
Project: DecompiledMinecraft   File: StructureOceanMonumentPieces.java   Source Code and License Vote up 6 votes
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_);
                    }
                }
            }
        }
    }
}
 
Example 2
Project: DecompiledMinecraft   File: StructureStart.java   Source Code and License Vote up 6 votes
/**
 * 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);
    }
}
 
Example 3
Project: DecompiledMinecraft   File: StructureOceanMonumentPieces.java   Source Code and License Vote up 6 votes
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_);
                    }
                }
            }
        }
    }
}
 
Example 4
Project: DecompiledMinecraft   File: StructureStart.java   Source Code and License Vote up 6 votes
/**
 * 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);
    }
}
 
Example 5
Project: BaseClient   File: StructureOceanMonumentPieces.java   Source Code and License Vote up 6 votes
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_);
                    }
                }
            }
        }
    }
}
 
Example 6
Project: BaseClient   File: StructureStart.java   Source Code and License Vote up 6 votes
/**
 * 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);
    }
}
 
Example 7
Project: BaseClient   File: StructureOceanMonumentPieces.java   Source Code and License Vote up 6 votes
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_);
                    }
                }
            }
        }
    }
}
 
Example 8
Project: BaseClient   File: StructureStart.java   Source Code and License Vote up 6 votes
/**
 * 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);
    }
}