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


Java Mirror.NONE属性代码示例

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


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

示例1: setBlockState

protected void setBlockState(World worldIn, IBlockState blockstateIn, int x, int y, int z, StructureBoundingBox boundingboxIn)
{
    BlockPos blockpos = new BlockPos(this.getXWithOffset(x, z), this.getYWithOffset(y), this.getZWithOffset(x, z));

    if (boundingboxIn.isVecInside(blockpos))
    {
        if (this.mirror != Mirror.NONE)
        {
            blockstateIn = blockstateIn.withMirror(this.mirror);
        }

        if (this.rotation != Rotation.NONE)
        {
            blockstateIn = blockstateIn.withRotation(this.rotation);
        }

        worldIn.setBlockState(blockpos, blockstateIn, 2);
    }
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:19,代码来源:StructureComponent.java

示例2: setCoordBaseMode

public void setCoordBaseMode(@Nullable EnumFacing facing)
{
    this.coordBaseMode = facing;

    if (facing == null)
    {
        this.rotation = Rotation.NONE;
        this.mirror = Mirror.NONE;
    }
    else
    {
        switch (facing)
        {
            case SOUTH:
                this.mirror = Mirror.LEFT_RIGHT;
                this.rotation = Rotation.NONE;
                break;

            case WEST:
                this.mirror = Mirror.LEFT_RIGHT;
                this.rotation = Rotation.CLOCKWISE_90;
                break;

            case EAST:
                this.mirror = Mirror.NONE;
                this.rotation = Rotation.CLOCKWISE_90;
                break;

            default:
                this.mirror = Mirror.NONE;
                this.rotation = Rotation.NONE;
        }
    }
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:34,代码来源:StructureComponent.java

示例3: setCoordBaseMode

public void setCoordBaseMode(@Nullable EnumFacing facing)
{
    this.coordBaseMode = facing;

    if (facing == null)
    {
        this.rotation = Rotation.NONE;
        this.mirror = Mirror.NONE;
    }
    else
    {
        switch (facing)
        {
            case SOUTH:
                this.mirror = Mirror.LEFT_RIGHT;
                this.rotation = Rotation.NONE;
                break;
            case WEST:
                this.mirror = Mirror.LEFT_RIGHT;
                this.rotation = Rotation.CLOCKWISE_90;
                break;
            case EAST:
                this.mirror = Mirror.NONE;
                this.rotation = Rotation.CLOCKWISE_90;
                break;
            default:
                this.mirror = Mirror.NONE;
                this.rotation = Rotation.NONE;
        }
    }
}
 
开发者ID:F1r3w477,项目名称:CustomWorldGen,代码行数:31,代码来源:StructureComponent.java

示例4: MansionTemplate

public MansionTemplate(TemplateManager p_i47355_1_, String p_i47355_2_, BlockPos p_i47355_3_, Rotation p_i47355_4_)
{
    this(p_i47355_1_, p_i47355_2_, p_i47355_3_, p_i47355_4_, Mirror.NONE);
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:4,代码来源:WoodlandMansionPieces.java

示例5: func_191127_a

private void func_191127_a(List<WoodlandMansionPieces.MansionTemplate> p_191127_1_, BlockPos p_191127_2_, Rotation p_191127_3_, EnumFacing p_191127_4_, EnumFacing p_191127_5_, WoodlandMansionPieces.RoomCollection p_191127_6_)
{
    int i = 0;
    int j = 0;
    Rotation rotation = p_191127_3_;
    Mirror mirror = Mirror.NONE;

    if (p_191127_5_ == EnumFacing.EAST && p_191127_4_ == EnumFacing.SOUTH)
    {
        i = -7;
    }
    else if (p_191127_5_ == EnumFacing.EAST && p_191127_4_ == EnumFacing.NORTH)
    {
        i = -7;
        j = 6;
        mirror = Mirror.LEFT_RIGHT;
    }
    else if (p_191127_5_ == EnumFacing.NORTH && p_191127_4_ == EnumFacing.EAST)
    {
        i = 1;
        j = 14;
        rotation = p_191127_3_.add(Rotation.COUNTERCLOCKWISE_90);
    }
    else if (p_191127_5_ == EnumFacing.NORTH && p_191127_4_ == EnumFacing.WEST)
    {
        i = 7;
        j = 14;
        rotation = p_191127_3_.add(Rotation.COUNTERCLOCKWISE_90);
        mirror = Mirror.LEFT_RIGHT;
    }
    else if (p_191127_5_ == EnumFacing.SOUTH && p_191127_4_ == EnumFacing.WEST)
    {
        i = 7;
        j = -8;
        rotation = p_191127_3_.add(Rotation.CLOCKWISE_90);
    }
    else if (p_191127_5_ == EnumFacing.SOUTH && p_191127_4_ == EnumFacing.EAST)
    {
        i = 1;
        j = -8;
        rotation = p_191127_3_.add(Rotation.CLOCKWISE_90);
        mirror = Mirror.LEFT_RIGHT;
    }
    else if (p_191127_5_ == EnumFacing.WEST && p_191127_4_ == EnumFacing.NORTH)
    {
        i = 15;
        j = 6;
        rotation = p_191127_3_.add(Rotation.CLOCKWISE_180);
    }
    else if (p_191127_5_ == EnumFacing.WEST && p_191127_4_ == EnumFacing.SOUTH)
    {
        i = 15;
        mirror = Mirror.FRONT_BACK;
    }

    BlockPos blockpos = p_191127_2_.offset(p_191127_3_.rotate(EnumFacing.EAST), i);
    blockpos = blockpos.offset(p_191127_3_.rotate(EnumFacing.SOUTH), j);
    p_191127_1_.add(new WoodlandMansionPieces.MansionTemplate(this.field_191134_a, p_191127_6_.func_191101_d(this.field_191135_b), blockpos, rotation, mirror));
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:59,代码来源:WoodlandMansionPieces.java

示例6: withMirror

/**
 * Returns the blockstate with the given mirror of the passed blockstate. If inapplicable, returns the passed
 * blockstate.
 */
public IBlockState withMirror(IBlockState state, Mirror mirrorIn)
{
    return mirrorIn == Mirror.NONE ? state : state.withRotation(mirrorIn.toRotation((EnumFacing)state.getValue(FACING))).cycleProperty(HINGE);
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:8,代码来源:BlockDoor.java

示例7: readFromNBT

public void readFromNBT(NBTTagCompound compound)
{
    super.readFromNBT(compound);
    this.setName(compound.getString("name"));
    this.author = compound.getString("author");
    this.metadata = compound.getString("metadata");
    int i = MathHelper.clamp(compound.getInteger("posX"), -32, 32);
    int j = MathHelper.clamp(compound.getInteger("posY"), -32, 32);
    int k = MathHelper.clamp(compound.getInteger("posZ"), -32, 32);
    this.position = new BlockPos(i, j, k);
    int l = MathHelper.clamp(compound.getInteger("sizeX"), 0, 32);
    int i1 = MathHelper.clamp(compound.getInteger("sizeY"), 0, 32);
    int j1 = MathHelper.clamp(compound.getInteger("sizeZ"), 0, 32);
    this.size = new BlockPos(l, i1, j1);

    try
    {
        this.rotation = Rotation.valueOf(compound.getString("rotation"));
    }
    catch (IllegalArgumentException var11)
    {
        this.rotation = Rotation.NONE;
    }

    try
    {
        this.mirror = Mirror.valueOf(compound.getString("mirror"));
    }
    catch (IllegalArgumentException var10)
    {
        this.mirror = Mirror.NONE;
    }

    try
    {
        this.mode = TileEntityStructure.Mode.valueOf(compound.getString("mode"));
    }
    catch (IllegalArgumentException var9)
    {
        this.mode = TileEntityStructure.Mode.DATA;
    }

    this.ignoreEntities = compound.getBoolean("ignoreEntities");
    this.powered = compound.getBoolean("powered");
    this.showAir = compound.getBoolean("showair");
    this.showBoundingBox = compound.getBoolean("showboundingbox");

    if (compound.hasKey("integrity"))
    {
        this.integrity = compound.getFloat("integrity");
    }
    else
    {
        this.integrity = 1.0F;
    }

    this.seed = compound.getLong("seed");
    this.updateBlockState();
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:59,代码来源:TileEntityStructure.java

示例8: readFromNBT

public void readFromNBT(NBTTagCompound compound)
{
    super.readFromNBT(compound);
    this.setName(compound.getString("name"));
    this.author = compound.getString("author");
    this.metadata = compound.getString("metadata");
    int i = MathHelper.clamp_int(compound.getInteger("posX"), -32, 32);
    int j = MathHelper.clamp_int(compound.getInteger("posY"), -32, 32);
    int k = MathHelper.clamp_int(compound.getInteger("posZ"), -32, 32);
    this.position = new BlockPos(i, j, k);
    int l = MathHelper.clamp_int(compound.getInteger("sizeX"), 0, 32);
    int i1 = MathHelper.clamp_int(compound.getInteger("sizeY"), 0, 32);
    int j1 = MathHelper.clamp_int(compound.getInteger("sizeZ"), 0, 32);
    this.size = new BlockPos(l, i1, j1);

    try
    {
        this.rotation = Rotation.valueOf(compound.getString("rotation"));
    }
    catch (IllegalArgumentException var11)
    {
        this.rotation = Rotation.NONE;
    }

    try
    {
        this.mirror = Mirror.valueOf(compound.getString("mirror"));
    }
    catch (IllegalArgumentException var10)
    {
        this.mirror = Mirror.NONE;
    }

    try
    {
        this.mode = TileEntityStructure.Mode.valueOf(compound.getString("mode"));
    }
    catch (IllegalArgumentException var9)
    {
        this.mode = TileEntityStructure.Mode.DATA;
    }

    this.ignoreEntities = compound.getBoolean("ignoreEntities");
    this.powered = compound.getBoolean("powered");
    this.showAir = compound.getBoolean("showair");
    this.showBoundingBox = compound.getBoolean("showboundingbox");

    if (compound.hasKey("integrity"))
    {
        this.integrity = compound.getFloat("integrity");
    }
    else
    {
        this.integrity = 1.0F;
    }

    this.seed = compound.getLong("seed");
    this.updateBlockState();
}
 
开发者ID:F1r3w477,项目名称:CustomWorldGen,代码行数:59,代码来源:TileEntityStructure.java


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