9
0
mirror of https://github.com/Xiao-MoMi/craft-engine.git synced 2025-12-28 11:29:17 +00:00

refactor(block): 优化方块放置逻辑

This commit is contained in:
jhqwqmc
2025-06-24 03:46:02 +08:00
parent 50a4fd8cbe
commit 047ed1b373

View File

@@ -102,10 +102,7 @@ public class PlaceBlockBehavior extends FacingTriggerableBlockBehavior {
continue;
}
ImmutableBlockState placeBlockState = optionalBlock.get().defaultState();
if (placeBlockState.contains(this.facingProperty)) {
placeBlockState = placeBlockState.with(this.facingProperty, opposite);
}
if (blockCheck(placeBlockState.customBlockState().handle())) {
if (!blockCheck(placeBlockState.customBlockState().handle())) {
continue;
}
Location placeLocation = new Location(FastNMS.INSTANCE.method$Level$getCraftWorld(level), blockPos1.x(), blockPos1.y(), blockPos1.z());