fix: 错误的stopride调用
This commit is contained in:
parent
8317afd584
commit
e0487ac8ba
|
|
@ -26,7 +26,9 @@ import org.jetbrains.annotations.Nullable;
|
|||
import top.r3944realms.eroticdungeongame.api.EroticDungeonGameApi;
|
||||
import top.r3944realms.eroticdungeongame.content.animation.EDGAnimation;
|
||||
import top.r3944realms.eroticdungeongame.content.block.ISeatBlock;
|
||||
import top.r3944realms.eroticdungeongame.content.block.blockentity.BaseSeatBlockEntity;
|
||||
import top.r3944realms.eroticdungeongame.content.util.FurnitureHelper;
|
||||
import top.r3944realms.eroticdungeongame.util.IEDGEntity;
|
||||
import top.r3944realms.lib39.core.sync.CachedSyncManager;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
|
@ -85,8 +87,8 @@ public class DungeonDataSyncManager extends CachedSyncManager<UUID, AbstractPlay
|
|||
public static void logout(@NotNull Player player) {
|
||||
player.getCapability(EroticDungeonGameApi.PLAYER_DUNGEON_DATA_CAP).ifPresent(
|
||||
cap -> {
|
||||
if (cap.getDeviceMainBlockPos() != null) {
|
||||
player.stopRiding();
|
||||
if (cap.getDeviceMainBlockPos() != null && player.level().getBlockEntity(cap.getDeviceMainBlockPos()) instanceof BaseSeatBlockEntity seat) {
|
||||
((IEDGEntity)player).releaseEntityFromEDGDevice(seat.getLockCode());
|
||||
FurnitureHelper.setSeatOccupied(player.level(), cap.getDeviceMainBlockPos(), false);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -152,8 +152,8 @@ public class SeatService {
|
|||
return seat;
|
||||
}
|
||||
}
|
||||
} else if (deviceMainBlockPos != null) {
|
||||
player.stopRiding();
|
||||
} else if (deviceMainBlockPos != null && player.level().getBlockEntity(cap.getDeviceMainBlockPos()) instanceof BaseSeatBlockEntity seat) {
|
||||
((IEDGEntity)player).releaseEntityFromEDGDevice(seat.getLockCode());
|
||||
try {
|
||||
if (bindPlayerToSeat(player, deviceMainBlockPos)) {
|
||||
return player.getVehicle();
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user