Added a bunch of the dungeon blocks to the mod.
Mainly only the "Raw" variants right now. No recipes have been added yet.
This commit is contained in:
parent
cb2db9bc50
commit
ddadbef425
117 changed files with 2547 additions and 4 deletions
|
@ -0,0 +1,58 @@
|
|||
package wayoftime.bloodmagic.common.block.base;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.item.BlockItemUseContext;
|
||||
import net.minecraft.state.DirectionProperty;
|
||||
import net.minecraft.state.StateContainer;
|
||||
import net.minecraft.state.properties.BlockStateProperties;
|
||||
import net.minecraft.util.Mirror;
|
||||
import net.minecraft.util.Rotation;
|
||||
|
||||
public class BlockPillarCap extends Block
|
||||
{
|
||||
public static final DirectionProperty FACING = BlockStateProperties.FACING;
|
||||
|
||||
public BlockPillarCap(Properties prop)
|
||||
{
|
||||
super(prop);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BlockState getStateForPlacement(BlockItemUseContext context)
|
||||
{
|
||||
return this.getDefaultState().with(FACING, context.getFace());
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the blockstate with the given rotation from the passed blockstate. If
|
||||
* inapplicable, returns the passed blockstate.
|
||||
*
|
||||
* @deprecated call via {@link IBlockState#withRotation(Rotation)} whenever
|
||||
* possible. Implementing/overriding is fine.
|
||||
*/
|
||||
@Override
|
||||
public BlockState rotate(BlockState state, Rotation rot)
|
||||
{
|
||||
return state.with(FACING, rot.rotate(state.get(FACING)));
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the blockstate with the given mirror of the passed blockstate. If
|
||||
* inapplicable, returns the passed blockstate.
|
||||
*
|
||||
* @deprecated call via {@link IBlockState#withMirror(Mirror)} whenever
|
||||
* possible. Implementing/overriding is fine.
|
||||
*/
|
||||
@Override
|
||||
public BlockState mirror(BlockState state, Mirror mirrorIn)
|
||||
{
|
||||
return state.rotate(mirrorIn.toRotation(state.get(FACING)));
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void fillStateContainer(StateContainer.Builder<Block, BlockState> builder)
|
||||
{
|
||||
builder.add(FACING);
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue