9
0
mirror of https://github.com/Xiao-MoMi/craft-engine.git synced 2025-12-31 04:46:37 +00:00

改进一下方法

This commit is contained in:
XiaoMoMi
2025-05-12 01:12:52 +08:00
parent 4da834d318
commit 40adb5b93f
2 changed files with 2 additions and 2 deletions

View File

@@ -331,7 +331,7 @@ public class LoadedFurniture implements Furniture {
}
}
public void spawnSeatEntityForPlayer(org.bukkit.entity.Player player, Seat seat) {
private void spawnSeatEntityForPlayer(org.bukkit.entity.Player player, Seat seat) {
Location location = this.calculateSeatLocation(seat);
Entity seatEntity = seat.limitPlayerRotation() ?
EntityUtils.spawnEntity(player.getWorld(), VersionHelper.isOrAbove1_20_2() ? location.subtract(0,0.9875,0) : location.subtract(0,0.990625,0), EntityType.ARMOR_STAND, entity -> {

View File

@@ -1740,7 +1740,7 @@ public class PacketConsumers {
} else {
furniture.findFirstAvailableSeat(entityId).ifPresent(seatPos -> {
if (furniture.tryOccupySeat(seatPos)) {
furniture.spawnSeatEntityForPlayer(Objects.requireNonNull(player.getPlayer()), seatPos);
furniture.spawnSeatEntityForPlayer(serverPlayer, seatPos);
}
});
}