Skip to content

Commit 7d3d4a1

Browse files
authored
feat: Track Placement breaks flowers (#5821)
* feat: tracks break flowers during placement * chore: cleanup import
1 parent f551107 commit 7d3d4a1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main/java/com/simibubi/create/content/trains/track/TrackPlacement.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
import net.minecraft.nbt.CompoundTag;
3434
import net.minecraft.nbt.NbtUtils;
3535
import net.minecraft.nbt.Tag;
36+
import net.minecraft.tags.BlockTags;
3637
import net.minecraft.util.Mth;
3738
import net.minecraft.world.InteractionHand;
3839
import net.minecraft.world.entity.player.Inventory;
@@ -508,8 +509,7 @@ private static PlacementInfo placeTracks(Level level, PlacementInfo info, BlockS
508509
// copy over all shared properties from the shaped state to the correct track material block
509510
BlockState toPlace = BlockHelper.copyProperties(state, info.trackMaterial.getBlock().defaultBlockState());
510511

511-
boolean canPlace = stateAtPos.getMaterial()
512-
.isReplaceable();
512+
boolean canPlace = stateAtPos.getMaterial().isReplaceable() || stateAtPos.is(BlockTags.FLOWERS);
513513
if (canPlace)
514514
info.requiredTracks++;
515515
if (simulate)

0 commit comments

Comments
 (0)