Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class StrippedLogs extends LogBlock {
- public StrippedLogs(MaterialColor verticalColorIn, Properties properties) {
- super(verticalColorIn, properties);
- }
- protected static final Map<Block, Block> STRIPPED_LOGS = (new ImmutableMap.Builder<Block, Block>()).put(ModBlock.DANDELION_LOG.get(), ModBlock.STRIPPED_DANDELION_LOG.get()).put(ModBlock.LEMON_LIME_LOG.get(), ModBlock.STRIPPED_LEMON_LIME_LOG.get()).put(ModBlock.SEAFOAM_LOG.get(), ModBlock.STRIPPED_SEAFOAM_LOG.get()).put(ModBlock.TROPICAL_LOG.get(), ModBlock.STRIPPED_TROPICAL_LOG.get()).put(ModBlock.STRAWBERRRY_LOG.get(), ModBlock.STRIPPED_STRAWBERRY_LOG.get()).put(ModBlock.SWEET_STRAWBERRY_LOG.get(), ModBlock.STRIPPED_SWEET_STRAWBERRY_LOG.get()).put(ModBlock.LAVENDER_LOG.get(), ModBlock.STRIPPED_LAVENDER_LOG.get()).put(ModBlock.MYSTIC_LOG.get(), ModBlock.STRIPPED_MYSTIC_LOG.get()).build();
- @Override
- public ActionResultType onBlockActivated(BlockState state, World worldIn, BlockPos pos, PlayerEntity player, Hand handIn, BlockRayTraceResult hit) {
- if(player.getHeldItemMainhand().getItem() instanceof AxeItem) {
- worldIn.setBlockState(pos, (BlockState) STRIPPED_LOGS.get(state.getBlock().getDefaultState()));
- }
- return ActionResultType.SUCCESS;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement