From bc3dfb80b26f8a755ef6bcdbbdaaf81eff271198 Mon Sep 17 00:00:00 2001 From: Gegy Date: Tue, 19 Nov 2024 01:40:56 +0100 Subject: [PATCH] Fix: only destroy glass blocks --- .../common/content/river_race/behaviour/TriviaBehaviour.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/lovetropics/minigames/common/content/river_race/behaviour/TriviaBehaviour.java b/src/main/java/com/lovetropics/minigames/common/content/river_race/behaviour/TriviaBehaviour.java index 58421819..9d7a8e00 100644 --- a/src/main/java/com/lovetropics/minigames/common/content/river_race/behaviour/TriviaBehaviour.java +++ b/src/main/java/com/lovetropics/minigames/common/content/river_race/behaviour/TriviaBehaviour.java @@ -46,6 +46,7 @@ import net.minecraft.world.level.block.Block; import net.minecraft.world.level.block.entity.BlockEntity; import net.minecraft.world.level.block.state.BlockState; +import net.neoforged.neoforge.common.Tags; import net.neoforged.neoforge.network.PacketDistributor; import org.jetbrains.annotations.Nullable; @@ -244,7 +245,7 @@ private static void findNeighboursOfTypeAndDestroy(GameScheduler scheduler, Serv for (Direction direction : Direction.values()) { BlockPos relative = pos.relative(direction); BlockState blockState = world.getBlockState(relative); - if (!blockState.isAir()) { + if (!blockState.isAir() && blockState.is(Tags.Blocks.GLASS_BLOCKS)) { if (blockType == null) { blockType = blockState.getBlock(); }