本文整理了Java中net.minecraft.util.Rotation.rotate
方法的一些代码示例,展示了Rotation.rotate
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Rotation.rotate
方法的具体详情如下:
包路径:net.minecraft.util.Rotation
类名称:Rotation
方法名:rotate
暂无
代码示例来源:origin: Esteemed-Innovation/Esteemed-Innovation
@Nonnull
@Override
public IBlockState withRotation(@Nonnull IBlockState state, Rotation rot) {
return state.withProperty(FACING, rot.rotate(state.getValue(FACING)));
}
代码示例来源:origin: Esteemed-Innovation/Esteemed-Innovation
@Nonnull
@Override
public IBlockState withRotation(@Nonnull IBlockState state, Rotation rot) {
return state.withProperty(FACING, rot.rotate(state.getValue(FACING)));
}
代码示例来源:origin: SleepyTrousers/EnderIO
@Override
public @Nonnull IBlockState withRotation(@Nonnull IBlockState state, @Nonnull Rotation rot) {
return state.withProperty(FACING, rot.rotate(state.getValue(FACING)));
}
代码示例来源:origin: ldtteam/minecolonies
/**
* Convert the BlockState into the correct metadata value.
*
* @deprecated (Remove this as soon as minecraft offers anything better).
*/
@NotNull
@Override
@Deprecated
public IBlockState withRotation(@NotNull final IBlockState state, final Rotation rot)
{
return state.withProperty(FACING, rot.rotate(state.getValue(FACING)));
}
代码示例来源:origin: ldtteam/minecolonies
/**
* Convert the BlockState into the correct metadata value.
*
* @deprecated (Remove this as soon as minecraft offers anything better).
*/
@NotNull
@Override
@Deprecated
public IBlockState withRotation(@NotNull final IBlockState state, final Rotation rot)
{
return state.withProperty(FACING, rot.rotate(state.getValue(FACING)));
}
代码示例来源:origin: NanamiArihara/FoodCraft-Reloaded
/**
* Returns the blockstate with the given rotation from the passed blockstate. If inapplicable, returns the passed
* blockstate.
*/
@Override
@Nonnull
public IBlockState withRotation(@Nonnull IBlockState state, Rotation rot) {
return state.withProperty(FACING, rot.rotate(state.getValue(FACING)));
}
代码示例来源:origin: PenguinSquad/Harvest-Festival
@SuppressWarnings("deprecation")
@Override
@Nonnull
public IBlockState withRotation(@Nonnull IBlockState state, Rotation rot) {
return state.withProperty(FACING, rot.rotate(state.getValue(FACING)));
}
代码示例来源:origin: ForestryMC/ForestryMC
@Override
public IBlockState withRotation(IBlockState state, Rotation rot) {
EnumFacing facing = state.getValue(FACING);
return state.withProperty(FACING, rot.rotate(facing));
}
代码示例来源:origin: Ellpeck/ActuallyAdditions
@Override
public IBlockState withRotation(IBlockState state, Rotation rot){
return state.withProperty(BlockHorizontal.FACING, rot.rotate(state.getValue(BlockHorizontal.FACING)));
}
代码示例来源:origin: Ellpeck/ActuallyAdditions
@Override
public IBlockState withRotation(IBlockState state, Rotation rot){
return state.withProperty(BlockHorizontal.FACING, rot.rotate(state.getValue(BlockHorizontal.FACING)));
}
代码示例来源:origin: Ellpeck/ActuallyAdditions
@Override
public IBlockState withRotation(IBlockState state, Rotation rot){
return state.withProperty(BlockHorizontal.FACING, rot.rotate(state.getValue(BlockHorizontal.FACING)));
}
代码示例来源:origin: PenguinSquad/Harvest-Festival
@SuppressWarnings("deprecation")
@Override
public IBlockState withRotation(IBlockState state, Rotation rot) {
return state.withProperty(FACING, rot.rotate(state.getValue(FACING)));
}
代码示例来源:origin: vadis365/TheErebus
@Override
public IBlockState withRotation(IBlockState state, Rotation rot) {
return state.withProperty(FACING, rot.rotate((EnumFacing) state.getValue(FACING)));
}
代码示例来源:origin: ldtteam/minecolonies
@Override
public IBlockState withRotation(final IBlockState state, final Rotation rot)
{
return state.withProperty(FACING, rot.rotate((EnumFacing) state.getValue(FACING)));
}
代码示例来源:origin: WayofTime/BloodMagic
@Override
public IBlockState withRotation(IBlockState state, Rotation rot) {
return state.withProperty(FACING, rot.rotate(state.getValue(FACING)));
}
代码示例来源:origin: Vazkii/Quark
@Override
public IBlockState withRotation(IBlockState state, Rotation rot) {
return state.withProperty(FACING, rot.rotate((EnumFacing) state.getValue(FACING)));
}
代码示例来源:origin: PenguinSquad/Harvest-Festival
@Override
public void postPlace(World world, BlockPos pos, Rotation rotation) {
TileEntity tile = world.getTileEntity(pos);
if (tile instanceof IFaceable) {
EnumFacing orientation = rotation.rotate(facing);
((IFaceable) tile).setFacing(orientation);
}
}
}
代码示例来源:origin: ValkyrienWarfare/Valkyrien-Warfare-Revamped
/**
* Returns the blockstate with the given rotation from the passed blockstate. If inapplicable, returns the passed
* blockstate.
*/
public IBlockState withRotation(IBlockState state, Rotation rot) {
return state.withProperty(LOOKING, rot.rotate(state.getValue(LOOKING)));
}
代码示例来源:origin: Ellpeck/ActuallyAdditions
@Override
public IBlockState withRotation(IBlockState state, Rotation rot){
return state.withProperty(BlockDirectional.FACING, rot.rotate(state.getValue(BlockDirectional.FACING)));
}
代码示例来源:origin: PenguinSquad/Harvest-Festival
@SuppressWarnings("deprecation")
@Override
public IBlockState withRotation(IBlockState state, Rotation rot) {
return state.withProperty(FACING, rot.rotate(state.getValue(FACING)).getOpposite());
}
内容来源于网络,如有侵权,请联系作者删除!