本文整理汇总了Java中net.minecraft.block.BlockStairs.EnumShape.INNER_RIGHT属性的典型用法代码示例。如果您正苦于以下问题:Java EnumShape.INNER_RIGHT属性的具体用法?Java EnumShape.INNER_RIGHT怎么用?Java EnumShape.INNER_RIGHT使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类net.minecraft.block.BlockStairs.EnumShape
的用法示例。
在下文中一共展示了EnumShape.INNER_RIGHT属性的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: isSideSolid
@Override
public boolean isSideSolid(IBlockState state,IBlockAccess world, BlockPos pos, EnumFacing side)
{
boolean flipped = state.getValue(BlockStairs.HALF) == EnumHalf.TOP;
EnumShape shape = (EnumShape)state.getValue(BlockStairs.SHAPE);
EnumFacing facing = (EnumFacing)state.getValue(BlockStairs.FACING);
if (side == EnumFacing.UP) return flipped;
if (side == EnumFacing.DOWN) return !flipped;
if (facing == side) return true;
if (flipped)
{
if (shape == EnumShape.INNER_LEFT) return side == facing.rotateYCCW();
if (shape == EnumShape.INNER_RIGHT) return side == facing.rotateY();
}
else
{
if (shape == EnumShape.INNER_LEFT) return side == facing.rotateY();
if (shape == EnumShape.INNER_RIGHT) return side == facing.rotateYCCW();
}
return false;
}
示例2: doesSideBlockRendering
@Override
public boolean doesSideBlockRendering(IBlockState state, IBlockAccess world, BlockPos pos, EnumFacing face)
{
if (net.minecraftforge.common.ForgeModContainer.disableStairSlabCulling)
return super.doesSideBlockRendering(state, world, pos, face);
if ( state.isOpaqueCube() )
return true;
state = this.getActualState(state, world, pos);
EnumHalf half = state.getValue(BlockStairs.HALF);
EnumFacing side = state.getValue(BlockStairs.FACING);
EnumShape shape = state.getValue(BlockStairs.SHAPE);
if (face == EnumFacing.UP) return half == EnumHalf.TOP;
if (face == EnumFacing.DOWN) return half == EnumHalf.BOTTOM;
if (shape == EnumShape.OUTER_LEFT || shape == EnumShape.OUTER_RIGHT) return false;
if (face == side) return true;
if (shape == EnumShape.INNER_LEFT && face.rotateY() == side) return true;
if (shape == EnumShape.INNER_RIGHT && face.rotateYCCW() == side) return true;
return false;
}
示例3: matchBlockState
@Override
public boolean matchBlockState(IBlockState b1, IBlockState b2)
{
final EnumFacing b1Facing = b1.getValue(BlockHorizontal.FACING);
final EnumFacing b2Facing = b2.getValue(BlockHorizontal.FACING);
final EnumHalf b1Half = b1.getValue(HALF);
final EnumHalf b2Half = b2.getValue(HALF);
final EnumShape b1Shape = b1.getValue(SHAPE);
final EnumShape b2Shape = b2.getValue(SHAPE);
if (b1Half != b2Half)
{
return false;
}
if (b1Facing == b2Facing)
{
return b1Shape == b2Shape;
}
if (b1Facing.getOpposite() == b2Facing)
{
return false;
}
if ((b1Shape == EnumShape.OUTER_RIGHT && b2Shape == EnumShape.OUTER_LEFT) ||
(b1Shape == EnumShape.INNER_RIGHT && b2Shape == EnumShape.INNER_LEFT) ||
(b1Shape == EnumShape.OUTER_LEFT && b2Shape == EnumShape.OUTER_RIGHT) ||
(b1Shape == EnumShape.INNER_LEFT && b2Shape == EnumShape.INNER_RIGHT))
{
return true;
}
return false;
}