Fixed in-editor blocks not being placeable on empty/space blocks
Some checks failed
Validate Gradle Wrapper / Validation (push) Successful in 23s
Tests / runPush (push) Failing after 1m8s

This commit is contained in:
Anuken 2024-11-29 00:10:05 -05:00
parent 8672dcf9f9
commit 7e3572df51

View File

@ -239,7 +239,7 @@ public class Build{
(check.floor().isDeep() && !type.floating && !type.requiresWater && !type.placeableLiquid) || //deep water
(type == check.block() && check.build != null && rotation == check.build.rotation && type.rotate && !((type == check.block && team != Team.derelict && check.team() == Team.derelict))) || //same block, same rotation
!check.interactable(team) || //cannot interact
!check.floor().placeableOn || //solid floor
!check.floor().placeableOn && !type.ignoreBuildDarkness || //solid floor
(!checkVisible && !check.block().alwaysReplace) || //replacing a block that should be replaced (e.g. payload placement)
!(((type.canReplace(check.block()) || (type == check.block && team != Team.derelict && state.rules.derelictRepair && check.team() == Team.derelict)) || //can replace type OR can replace derelict block of same type
(check.build instanceof ConstructBuild build && build.current == type && check.centerX() == tile.x && check.centerY() == tile.y)) && //same type in construction