Skip to content

Commit 0e77243

Browse files
committed
remove old comments, generalize check (#824)
1 parent 73c068b commit 0e77243

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

src/main/java/com/ldtteam/structurize/placement/StructurePlacer.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
import net.minecraft.world.level.block.LiquidBlock;
2929
import net.minecraft.world.level.block.entity.BlockEntity;
3030
import net.minecraft.world.level.block.state.BlockState;
31+
import net.minecraft.world.level.block.state.properties.BlockStateProperties;
3132
import net.minecraft.world.level.block.state.properties.DoubleBlockHalf;
3233
import net.minecraft.world.level.material.FluidState;
3334
import net.minecraft.world.phys.AABB;
@@ -291,8 +292,8 @@ public BlockPlacementResult handleBlockPlacement(
291292
if (!(worldState.getBlock() instanceof AirBlock))
292293
{
293294
if (!sameBlockInWorld
294-
&& !worldState.isAir()
295-
&& !(worldState.getBlock() instanceof DoublePlantBlock && worldState.getValue(DoublePlantBlock.HALF).equals(DoubleBlockHalf.UPPER)))
295+
&& !worldState.isAir()
296+
&& (!localState.hasProperty(BlockStateProperties.DOUBLE_BLOCK_HALF) || localState.getValue(DoublePlantBlock.HALF).equals(DoubleBlockHalf.LOWER)))
296297
{
297298
removalHandler.handleRemoval(handler, world, worldPos, tileEntityData);
298299
}

src/main/java/com/ldtteam/structurize/placement/handlers/placement/IPlacementHandler.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,6 @@ static boolean doesWorldStateMatchBlueprintState(@NotNull BlockInfo blockInfo, @
4747
blockEntityData = new Tuple<>(blockEntity, blockInfo.getTileEntityData());
4848
}
4949

50-
//todo domum blocks on minecol side
51-
//todo minecolonies racks on minecol side
52-
//todo minecolonies allow conversion of dirt like to dirt
53-
5450
return placementHandler.doesWorldStateMatchBlueprintState(structureHandler.getWorld().getBlockState(worldPos), blockInfo.getState(), blockEntityData, structureHandler);
5551
}
5652

0 commit comments

Comments
 (0)