From 031fcf3babb3bc2de2de1208a3a0ca695175a950 Mon Sep 17 00:00:00 2001 From: NewJumper Date: Thu, 9 Jan 2025 20:35:51 -0600 Subject: [PATCH] fixed some blooming stem placement issues --- .../deeperdarker/content/blocks/BloomingStemBlock.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/kyanite/deeperdarker/content/blocks/BloomingStemBlock.java b/src/main/java/com/kyanite/deeperdarker/content/blocks/BloomingStemBlock.java index 317a51a59..91234e352 100644 --- a/src/main/java/com/kyanite/deeperdarker/content/blocks/BloomingStemBlock.java +++ b/src/main/java/com/kyanite/deeperdarker/content/blocks/BloomingStemBlock.java @@ -65,7 +65,7 @@ public BlockState getStateForPlacement(BlockPlaceContext context) { BlockState belowState = level.getBlockState(pos.below()); Direction clickedFace = context.getClickedFace(); - if(validBase(belowState)) return this.defaultBlockState().setValue(DOWN, true); + if(validBase(belowState) && clickedFace == Direction.UP) return this.defaultBlockState().setValue(DOWN, true); return this.defaultBlockState().setValue(PipeBlock.PROPERTY_BY_DIRECTION.get(clickedFace.getOpposite()), true); } @@ -157,12 +157,12 @@ protected void randomTick(BlockState state, ServerLevel level, BlockPos pos, Ran @Override public boolean canSurvive(BlockState state, LevelReader level, BlockPos pos) { - if(validBase(level.getBlockState(pos.below()))) return true; + if(validBase(level.getBlockState(pos.below())) && state.getValue(DOWN)) return true; for(Direction direction : Direction.Plane.HORIZONTAL) { BlockState adjacent = level.getBlockState(pos.relative(direction)); BlockState belowAdjacent = level.getBlockState(pos.relative(direction).below()); - if(isStem(adjacent) && validBase(belowAdjacent) && state.getValue(PipeBlock.PROPERTY_BY_DIRECTION.get(direction))) return true; + if(isStem(adjacent) && validBase(belowAdjacent) && adjacent.getValue(DOWN) && state.getValue(PipeBlock.PROPERTY_BY_DIRECTION.get(direction))) return true; } return false;