mirror of
https://github.com/Ellpeck/ActuallyAdditions.git
synced 2024-11-22 07:13:28 +01:00
Fix Tiny Toch placement (Fixes #1409)
This commit is contained in:
parent
0e3a961257
commit
a6a9467dd1
1 changed files with 2 additions and 2 deletions
|
@ -34,7 +34,7 @@ import net.minecraft.world.phys.shapes.VoxelShape;
|
||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
|
|
||||||
public class BlockTinyTorch extends BlockBase {
|
public class BlockTinyTorch extends BlockBase {
|
||||||
public static final DirectionProperty FACING = DirectionProperty.create("facing", Direction.NORTH, Direction.EAST, Direction.SOUTH, Direction.WEST, Direction.UP);
|
public static final DirectionProperty FACING = DirectionProperty.create("facing", direction -> direction != Direction.DOWN);
|
||||||
|
|
||||||
public BlockTinyTorch() {
|
public BlockTinyTorch() {
|
||||||
super(Properties.of().pushReaction(PushReaction.DESTROY).sound(SoundType.WOOD).strength(0.0F, 0.8F));
|
super(Properties.of().pushReaction(PushReaction.DESTROY).sound(SoundType.WOOD).strength(0.0F, 0.8F));
|
||||||
|
@ -90,7 +90,7 @@ public class BlockTinyTorch extends BlockBase {
|
||||||
Direction facing = context.getClickedFace();
|
Direction facing = context.getClickedFace();
|
||||||
BlockPos pos = context.getClickedPos();
|
BlockPos pos = context.getClickedPos();
|
||||||
if (this.canSurvive(state, levelreader, pos)) {
|
if (this.canSurvive(state, levelreader, pos)) {
|
||||||
return state.setValue(BlockTinyTorch.FACING, facing);
|
return state.setValue(BlockTinyTorch.FACING, facing.getAxis() == Direction.Axis.Y ? Direction.UP : facing);
|
||||||
} else {
|
} else {
|
||||||
Direction[] adirection = context.getNearestLookingDirections();
|
Direction[] adirection = context.getNearestLookingDirections();
|
||||||
for(Direction direction : adirection) {
|
for(Direction direction : adirection) {
|
||||||
|
|
Loading…
Reference in a new issue