9
0
mirror of https://github.com/Xiao-MoMi/craft-engine.git synced 2025-12-26 02:19:23 +00:00

fix(bukkit): 修复?

This commit is contained in:
jhqwqmc
2025-06-22 22:57:32 +08:00
parent 33ec42169c
commit 1547740fd9
2 changed files with 2 additions and 1 deletions

View File

@@ -41,7 +41,7 @@ public abstract class FacingTriggerableBlockBehavior extends BukkitBlockBehavior
@Override
public ImmutableBlockState updateStateForPlacement(BlockPlaceContext context, ImmutableBlockState state) {
return state.owner().value().defaultState().with(this.facingProperty, context.getNearestLookingDirection().opposite());
return state.owner().value().defaultState().with(this.facingProperty, Direction.orderedByNearest(context.getPlayer())[1]);
}
protected abstract Object getTickPriority();

View File

@@ -97,6 +97,7 @@ public class PlaceBlockBehavior extends FacingTriggerableBlockBehavior {
if (placeLocation.getBlock().getType() != Material.AIR) {
break;
}
// TODO: 修复放置多方块自定义方块问题
if (CraftEngineBlocks.place(placeLocation, optionalBlock.get().defaultState(), UpdateOption.UPDATE_ALL_IMMEDIATE, true)) {
return true;
}