Throne - Missing rotation methods
This commit is contained in:
parent
36c2d9cda8
commit
d8a224e0fa
2 changed files with 16 additions and 1 deletions
1
TODO.txt
1
TODO.txt
|
@ -1,7 +1,6 @@
|
|||
Part ASM? Description
|
||||
-------------------------------------------------------------------------------------------------------
|
||||
deco No Armchairs
|
||||
deco No Thrones
|
||||
deco No Copper pots
|
||||
deco No Copper plates
|
||||
deco No Lanterns
|
||||
|
|
|
@ -32,6 +32,8 @@ import net.minecraft.tileentity.TileEntity;
|
|||
import net.minecraft.util.BlockRenderLayer;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.EnumHand;
|
||||
import net.minecraft.util.Mirror;
|
||||
import net.minecraft.util.Rotation;
|
||||
import net.minecraft.util.math.AxisAlignedBB;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.RayTraceResult;
|
||||
|
@ -202,6 +204,20 @@ public class DThroneBlock
|
|||
}
|
||||
|
||||
|
||||
@Override
|
||||
public IBlockState withRotation( final IBlockState state , final Rotation rot )
|
||||
{
|
||||
return state.withProperty( DThroneBlock.FACING , rot.rotate( state.getValue( DThroneBlock.FACING ) ) );
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public IBlockState withMirror( final IBlockState state , final Mirror mirrorIn )
|
||||
{
|
||||
return state.withRotation( mirrorIn.toRotation( state.getValue( DThroneBlock.FACING ) ) );
|
||||
}
|
||||
|
||||
|
||||
// *************************************************************************************************
|
||||
// BLOCK PLACEMENT
|
||||
// *************************************************************************************************
|
||||
|
|
Reference in a new issue