Skip to content

Commit

Permalink
fix: Set facing earlier for no reason because it should make no diffe…
Browse files Browse the repository at this point in the history
…rence but this crash makes no sense at all #913
  • Loading branch information
BlayTheNinth committed Oct 23, 2024
1 parent 281c630 commit 02c4602
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,10 @@ public class WaystoneBlock extends WaystoneBlockBase {
public WaystoneBlock(Properties properties) {
super(properties);
registerDefaultState(this.stateDefinition.any()
.setValue(FACING, Direction.NORTH)
.setValue(HALF, DoubleBlockHalf.LOWER)
.setValue(ORIGIN, WaystoneOrigin.UNKNOWN)
.setValue(WATERLOGGED, false)
.setValue(FACING, Direction.NORTH));
.setValue(WATERLOGGED, false));
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ public abstract class WaystoneBlockBase extends BaseEntityBlock implements Simpl
public WaystoneBlockBase(Properties properties) {
super(properties.pushReaction(PushReaction.BLOCK));
this.registerDefaultState(this.stateDefinition.any()
.setValue(FACING, Direction.NORTH)
.setValue(WATERLOGGED, false)
.setValue(ORIGIN, WaystoneOrigin.UNKNOWN)
.setValue(FACING, Direction.NORTH));
.setValue(ORIGIN, WaystoneOrigin.UNKNOWN));
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,14 @@ public boolean place(FeaturePlaceContext<NoneFeatureConfiguration> context) {
BlockState stateAbove = world.getBlockState(posAbove);
if (state.isAir() && stateAbove.isAir()) {
world.setBlock(pos, waystoneState
.setValue(WaystoneBlock.FACING, facing)
.setValue(WaystoneBlock.HALF, DoubleBlockHalf.LOWER)
.setValue(WaystoneBlockBase.ORIGIN, WaystoneOrigin.WILDERNESS)
.setValue(WaystoneBlock.FACING, facing), 2);
.setValue(WaystoneBlockBase.ORIGIN, WaystoneOrigin.WILDERNESS), 2);

world.setBlock(posAbove, waystoneState
.setValue(WaystoneBlock.FACING, facing)
.setValue(WaystoneBlock.HALF, DoubleBlockHalf.UPPER)
.setValue(WaystoneBlockBase.ORIGIN, WaystoneOrigin.WILDERNESS)
.setValue(WaystoneBlock.FACING, facing), 2);
.setValue(WaystoneBlockBase.ORIGIN, WaystoneOrigin.WILDERNESS), 2);

WaystoneBlockEntity tileEntity = (WaystoneBlockEntity) world.getBlockEntity(pos);
if (tileEntity != null) {
Expand Down

0 comments on commit 02c4602

Please sign in to comment.