Merge branch 'master' of https://github.com/paulevsGitch/BetterEnd
This commit is contained in:
commit
1a2ec137f1
2 changed files with 10 additions and 3 deletions
|
@ -8,7 +8,7 @@
|
||||||
loader_version = 0.10.1+build.209
|
loader_version = 0.10.1+build.209
|
||||||
|
|
||||||
# Mod Properties
|
# Mod Properties
|
||||||
mod_version = 0.3.0-alpha
|
mod_version = 0.3.1-alpha
|
||||||
maven_group = ru.betterend
|
maven_group = ru.betterend
|
||||||
archives_base_name = better-end
|
archives_base_name = better-end
|
||||||
|
|
||||||
|
|
|
@ -27,9 +27,11 @@ import net.minecraft.world.BlockView;
|
||||||
import net.minecraft.world.WorldAccess;
|
import net.minecraft.world.WorldAccess;
|
||||||
import ru.betterend.blocks.BlockProperties.TripleShape;
|
import ru.betterend.blocks.BlockProperties.TripleShape;
|
||||||
import ru.betterend.blocks.basis.BlockBase;
|
import ru.betterend.blocks.basis.BlockBase;
|
||||||
|
import ru.betterend.client.ERenderLayer;
|
||||||
|
import ru.betterend.client.IRenderTypeable;
|
||||||
import ru.betterend.util.BlocksHelper;
|
import ru.betterend.util.BlocksHelper;
|
||||||
|
|
||||||
public class BlockEndLotusStem extends BlockBase implements Waterloggable {
|
public class BlockEndLotusStem extends BlockBase implements Waterloggable, IRenderTypeable {
|
||||||
public static final EnumProperty<Direction> FACING = Properties.FACING;
|
public static final EnumProperty<Direction> FACING = Properties.FACING;
|
||||||
public static final BooleanProperty WATERLOGGED = Properties.WATERLOGGED;
|
public static final BooleanProperty WATERLOGGED = Properties.WATERLOGGED;
|
||||||
public static final BooleanProperty LEAF = BooleanProperty.of("leaf");
|
public static final BooleanProperty LEAF = BooleanProperty.of("leaf");
|
||||||
|
@ -43,7 +45,7 @@ public class BlockEndLotusStem extends BlockBase implements Waterloggable {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public VoxelShape getOutlineShape(BlockState state, BlockView view, BlockPos pos, ShapeContext ePos) {
|
public VoxelShape getOutlineShape(BlockState state, BlockView view, BlockPos pos, ShapeContext ePos) {
|
||||||
return SHAPES.get(state.get(FACING).getAxis());
|
return state.get(LEAF) ? SHAPES.get(Axis.Y) : SHAPES.get(state.get(FACING).getAxis());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -81,6 +83,11 @@ public class BlockEndLotusStem extends BlockBase implements Waterloggable {
|
||||||
return state;
|
return state;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ERenderLayer getRenderLayer() {
|
||||||
|
return ERenderLayer.CUTOUT;
|
||||||
|
}
|
||||||
|
|
||||||
static {
|
static {
|
||||||
SHAPES.put(Axis.X, Block.createCuboidShape(0, 6, 6, 16, 10, 10));
|
SHAPES.put(Axis.X, Block.createCuboidShape(0, 6, 6, 16, 10, 10));
|
||||||
SHAPES.put(Axis.Y, Block.createCuboidShape(6, 0, 6, 10, 16, 10));
|
SHAPES.put(Axis.Y, Block.createCuboidShape(6, 0, 6, 10, 16, 10));
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue