Block constructors refactoring and fixes
This commit is contained in:
parent
3dacd0727f
commit
f8eb65d600
18 changed files with 161 additions and 113 deletions
|
@ -3,7 +3,6 @@ package ru.bclib.blocks;
|
|||
import com.google.common.collect.ImmutableMap;
|
||||
import com.google.common.collect.Maps;
|
||||
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
||||
import net.fabricmc.fabric.api.tool.attribute.v1.FabricToolTags;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.Direction;
|
||||
import net.minecraft.world.item.context.BlockPlaceContext;
|
||||
|
@ -29,32 +28,32 @@ import java.util.EnumMap;
|
|||
|
||||
public abstract class BaseWallPlantBlock extends BasePlantBlock {
|
||||
private static final EnumMap<Direction, VoxelShape> SHAPES = Maps.newEnumMap(ImmutableMap.of(
|
||||
Direction.NORTH,
|
||||
Block.box(1, 1, 8, 15, 15, 16),
|
||||
Direction.SOUTH,
|
||||
Block.box(1, 1, 0, 15, 15, 8),
|
||||
Direction.WEST,
|
||||
Block.box(8, 1, 1, 16, 15, 15),
|
||||
Direction.EAST,
|
||||
Block.box(0, 1, 1, 8, 15, 15)
|
||||
Direction.NORTH, Block.box(1, 1, 8, 15, 15, 16),
|
||||
Direction.SOUTH, Block.box(1, 1, 0, 15, 15, 8),
|
||||
Direction.WEST, Block.box(8, 1, 1, 16, 15, 15),
|
||||
Direction.EAST, Block.box(0, 1, 1, 8, 15, 15)
|
||||
));
|
||||
public static final DirectionProperty FACING = HorizontalDirectionalBlock.FACING;
|
||||
|
||||
public BaseWallPlantBlock() {
|
||||
this(FabricBlockSettings.of(Material.PLANT)
|
||||
.breakByTool(FabricToolTags.SHEARS)
|
||||
.breakByHand(true)
|
||||
.sound(SoundType.GRASS)
|
||||
.noCollission());
|
||||
this(
|
||||
FabricBlockSettings
|
||||
.of(Material.PLANT)
|
||||
.breakByHand(true)
|
||||
.sound(SoundType.GRASS)
|
||||
.noCollission()
|
||||
);
|
||||
}
|
||||
|
||||
public BaseWallPlantBlock(int light) {
|
||||
this(FabricBlockSettings.of(Material.PLANT)
|
||||
.breakByTool(FabricToolTags.SHEARS)
|
||||
.breakByHand(true)
|
||||
.luminance(light)
|
||||
.sound(SoundType.GRASS)
|
||||
.noCollission());
|
||||
this(
|
||||
FabricBlockSettings
|
||||
.of(Material.PLANT)
|
||||
.breakByHand(true)
|
||||
.luminance(light)
|
||||
.sound(SoundType.GRASS)
|
||||
.noCollission()
|
||||
);
|
||||
}
|
||||
|
||||
public BaseWallPlantBlock(Properties settings) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue