diff --git a/gradle.properties b/gradle.properties index d1eb2f49e..d45e85b11 100644 --- a/gradle.properties +++ b/gradle.properties @@ -12,7 +12,7 @@ javaVersion=21 useJavaToolChains=true #The currently running forge. -forgeVersion=21.1.72 +forgeVersion=21.1.84 fmlRange=[4,) forgeRange=[21.0.143,) diff --git a/src/main/java/com/ldtteam/structurize/util/BlockUtils.java b/src/main/java/com/ldtteam/structurize/util/BlockUtils.java index a41050eff..ef9d24e08 100644 --- a/src/main/java/com/ldtteam/structurize/util/BlockUtils.java +++ b/src/main/java/com/ldtteam/structurize/util/BlockUtils.java @@ -110,7 +110,7 @@ public static void checkOrInit() { BuiltInRegistries.BLOCK.stream() .filter(BlockUtils::canBlockSurviveWithoutSupport) - .filter(block -> !block.defaultBlockState().isAir() && !(block instanceof LiquidBlock) && !block.builtInRegistryHolder().is(ModTags.WEAK_SOLID_BLOCKS)) + .filter(block -> !block.defaultBlockState().canBeReplaced() && block.hasCollision && !block.defaultBlockState().isAir() && !(block instanceof LiquidBlock) && !block.builtInRegistryHolder().is(ModTags.WEAK_SOLID_BLOCKS)) .forEach(trueSolidBlocks::add); } } @@ -802,6 +802,11 @@ public static boolean isWeakSolidBlock(final BlockState blockState) return blockState.isRandomlyTicking(); } + if (blockState.canBeReplaced() || !blockState.getBlock().hasCollision) + { + return false; + } + final Block block = blockState.getBlock(); return block.builtInRegistryHolder().is(ModTags.WEAK_SOLID_BLOCKS) && canBlockSurviveWithoutSupport(block); } diff --git a/src/main/resources/META-INF/accesstransformer.cfg b/src/main/resources/META-INF/accesstransformer.cfg index 8fa4e81b1..ac4a2aacb 100644 --- a/src/main/resources/META-INF/accesstransformer.cfg +++ b/src/main/resources/META-INF/accesstransformer.cfg @@ -25,3 +25,5 @@ public net.minecraft.client.KeyMapping clickCount # itemHandler public net.minecraft.world.entity.decoration.GlowItemFrame getFrameItemStack()Lnet/minecraft/world/item/ItemStack; public net.minecraft.world.entity.decoration.ItemFrame getFrameItemStack()Lnet/minecraft/world/item/ItemStack; + +public net.minecraft.world.level.block.state.BlockBehaviour hasCollision # hasCollision \ No newline at end of file