9
0
mirror of https://github.com/LeavesMC/Leaves.git synced 2025-12-29 11:59:17 +00:00

fix: fix bot use vehicle(#600) but now, bot drop hurt broken

This commit is contained in:
MC_XiaoHei
2025-07-15 22:32:30 +08:00
parent dd6e1f4582
commit 42695f6d2d

View File

@@ -222,6 +222,11 @@ public class ServerBot extends ServerPlayer {
}
}
@Override
public boolean canSimulateMovement() {
return true;
}
@Override
public @Nullable ServerBot teleport(@NotNull TeleportTransition teleportTransition) {
if (this.isSleeping() || this.isRemoved()) {
@@ -440,11 +445,6 @@ public class ServerBot extends ServerPlayer {
}
}
@Override
public boolean isClientAuthoritative() {
return false;
}
public void sendPlayerInfo(ServerPlayer player) {
player.connection.send(new ClientboundPlayerInfoUpdatePacket(EnumSet.of(ClientboundPlayerInfoUpdatePacket.Action.ADD_PLAYER, ClientboundPlayerInfoUpdatePacket.Action.UPDATE_LISTED, ClientboundPlayerInfoUpdatePacket.Action.UPDATE_DISPLAY_NAME), List.of(this)));
}