diff --git a/gradle.properties b/gradle.properties index bf09a07..86a9b1a 100644 --- a/gradle.properties +++ b/gradle.properties @@ -15,4 +15,4 @@ botania=1.19.2-437-FORGE jei_version=13.1.0.2 version_major=2 -version_minor=10 \ No newline at end of file +version_minor=11 \ No newline at end of file diff --git a/src/main/java/thetadev/constructionwand/wand/undo/PlaceSnapshot.java b/src/main/java/thetadev/constructionwand/wand/undo/PlaceSnapshot.java index ca17038..732c2b0 100644 --- a/src/main/java/thetadev/constructionwand/wand/undo/PlaceSnapshot.java +++ b/src/main/java/thetadev/constructionwand/wand/undo/PlaceSnapshot.java @@ -6,8 +6,6 @@ import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.context.BlockPlaceContext; import net.minecraft.world.level.Level; -import net.minecraft.world.level.block.Block; -import net.minecraft.world.level.block.Blocks; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.block.state.properties.BlockStateProperties; import net.minecraft.world.level.block.state.properties.Property; @@ -100,7 +98,7 @@ private static BlockState getPlaceBlockstate(Level world, Player player, BlockHi // Can block be placed? BlockState blockState = item.getBlock().getStateForPlacement(ctx); - if(blockState == null) return null; + if(blockState == null || !blockState.canSurvive(world, pos)) return null; // Forbidden Tile Entity? if(!WandUtil.isTEAllowed(blockState)) return null; @@ -108,11 +106,6 @@ private static BlockState getPlaceBlockstate(Level world, Player player, BlockHi // No entities colliding? if(WandUtil.entitiesCollidingWithBlock(world, blockState, pos)) return null; - // Adjust blockstate to neighbors - // TODO: verify that - blockState = Block.updateFromNeighbourShapes(blockState, world, pos); - if(blockState.getBlock() == Blocks.AIR || !blockState.canSurvive(world, pos)) return null; - // Copy block properties from supporting block if(targetMode && supportingBlock != null) { // Block properties to be copied (alignment/rotation properties)