本文整理了Java中net.minecraft.block.Block.getBedDirection()
方法的一些代码示例,展示了Block.getBedDirection()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Block.getBedDirection()
方法的具体详情如下:
包路径:net.minecraft.block.Block
类名称:Block
方法名:getBedDirection
暂无
代码示例来源:origin: P3pp3rF1y/AncientWarfare2
@SideOnly(Side.CLIENT)
public float getBedOrientationInDegrees() {
BlockPos bedLocation = getBedPosition();
IBlockState state = bedLocation == null ? null : this.world.getBlockState(bedLocation);
if (state != null && state.getBlock().isBed(state, world, bedLocation, this)) {
EnumFacing enumfacing = state.getBlock().getBedDirection(state, world, bedLocation);
switch (enumfacing) {
case SOUTH:
return 90.0F;
case WEST:
return 0.0F;
case NORTH:
return 270.0F;
case EAST:
return 180.0F;
}
}
return 0.0F;
}
代码示例来源:origin: ldtteam/minecolonies
/**
* Returns the orientation of the bed in degrees.
*/
@SideOnly(Side.CLIENT)
public float getBedOrientationInDegrees()
{
final IBlockState state = getBedLocation() == null ? null : citizen.world.getBlockState(getBedLocation());
if (state != null && state.getBlock().isBed(state, citizen.world, getBedLocation(), citizen))
{
final EnumFacing enumfacing = state.getBlock().getBedDirection(state, citizen.world, getBedLocation());
switch (enumfacing)
{
case SOUTH:
return NINETY_DEGREE;
case WEST:
return 0.0F;
case NORTH:
return THREE_QUARTERS;
case EAST:
return HALF_ROTATION;
default:
return 0F;
}
}
return 0.0F;
}
代码示例来源:origin: PenguinSquad/Harvest-Festival
if (player.world.isBlockLoaded(bedLocation)) state = player.world.getBlockState(bedLocation);
if (state != null && state.getBlock().isBed(state, player.world, bedLocation, player)) {
EnumFacing enumfacing = state.getBlock().getBedDirection(state, player.world, bedLocation);
float f = 0.5F;
float f1 = 0.5F;
代码示例来源:origin: TeamLapen/Vampirism
if (player.world.isBlockLoaded(bedLocation)) state = player.world.getBlockState(bedLocation);
if (state != null && state.getBlock().isBed(state, player.world, bedLocation, player)) {
EnumFacing enumfacing = state.getBlock().getBedDirection(state, player.world, bedLocation);
float f = 0.5F;
float f1 = 0.5F;
代码示例来源:origin: ValkyrienWarfare/Valkyrien-Warfare-Revamped
angleYaw = (float) (block.getBedDirection(state, entity.world, bedPos).getHorizontalIndex() * 90);
angleYaw += 180;
代码示例来源:origin: ValkyrienWarfare/Valkyrien-Warfare-Revamped
angleYaw = (float) (block.getBedDirection(state, entityIn.world, bedPos).getHorizontalIndex() * 90);
代码示例来源:origin: McJtyMods/LostCities
return false;
EnumFacing direction = Blocks.BED.getBedDirection(state, world, pos);
Block b1 = world.getBlockState(pos.down()).getBlock();
Block b2 = world.getBlockState(pos.offset(direction.getOpposite()).down()).getBlock();
内容来源于网络,如有侵权,请联系作者删除!