Concrete with bars

This commit is contained in:
Andrew-71 2023-08-05 23:41:38 +03:00
parent 48423a2325
commit 9da21d3fe8
28 changed files with 144 additions and 1901 deletions

View file

@ -0,0 +1,26 @@
package su.a71.new_soviet.blocks;
import net.minecraft.block.Block;
import net.minecraft.block.BlockState;
import net.minecraft.block.HorizontalFacingBlock;
import net.minecraft.item.ItemPlacementContext;
import net.minecraft.state.StateManager;
import net.minecraft.state.property.Properties;
import net.minecraft.util.math.Direction;
public class ConcreteWithBarsBlock extends HorizontalFacingBlock {
public ConcreteWithBarsBlock(Settings settings) {
super(settings);
setDefaultState(getDefaultState().with(Properties.HORIZONTAL_FACING, Direction.NORTH));
}
@Override
protected void appendProperties(StateManager.Builder<Block, BlockState> builder) {
builder.add(Properties.HORIZONTAL_FACING);
}
@Override
public BlockState getPlacementState(ItemPlacementContext ctx) {
return super.getPlacementState(ctx).with(Properties.HORIZONTAL_FACING, ctx.getHorizontalPlayerFacing().getOpposite());
}
}

View file

@ -39,5 +39,4 @@ public class TVBlock extends HorizontalFacingBlock {
public BlockState getPlacementState(ItemPlacementContext ctx) {
return super.getPlacementState(ctx).with(Properties.HORIZONTAL_FACING, ctx.getHorizontalPlayerFacing().getOpposite());
}
}