Lotus stem states

This commit is contained in:
paulevsGitch 2020-10-20 17:33:50 +03:00
parent 00eafec536
commit bd8ba7df7a
13 changed files with 135 additions and 24 deletions

View file

@ -11,31 +11,34 @@ import net.minecraft.fluid.Fluids;
import net.minecraft.item.ItemPlacementContext;
import net.minecraft.state.StateManager;
import net.minecraft.state.property.BooleanProperty;
import net.minecraft.state.property.EnumProperty;
import net.minecraft.state.property.Properties;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.Direction;
import net.minecraft.util.shape.VoxelShape;
import net.minecraft.world.BlockView;
import net.minecraft.world.WorldAccess;
import ru.betterend.blocks.BlockProperties.TripleShape;
import ru.betterend.blocks.basis.BlockBase;
public class BlockEndLotusStem extends BlockBase implements Waterloggable {
private static final VoxelShape SHAPE = Block.createCuboidShape(5, 0, 5, 11, 16, 11);
public static final BooleanProperty WATERLOGGED = Properties.WATERLOGGED;
public static final EnumProperty<TripleShape> SHAPE = BlockProperties.TRIPLE_SHAPE;
private static final VoxelShape VSHAPE = Block.createCuboidShape(6, 0, 6, 10, 16, 10);
public BlockEndLotusStem() {
super(FabricBlockSettings.copyOf(Blocks.OAK_PLANKS));
this.setDefaultState(getDefaultState().with(WATERLOGGED, false));
this.setDefaultState(getDefaultState().with(WATERLOGGED, false).with(SHAPE, TripleShape.MIDDLE));
}
@Override
public VoxelShape getOutlineShape(BlockState state, BlockView view, BlockPos pos, ShapeContext ePos) {
return SHAPE;
return VSHAPE;
}
@Override
protected void appendProperties(StateManager.Builder<Block, BlockState> builder) {
builder.add(WATERLOGGED);
builder.add(WATERLOGGED, SHAPE);
}
@Override