Игрок: хитбокс 1.45 в шифте и прыжок с места 1.5

- RsxPlayerTuning: высота при подкрадывании 1.45 (ванилла 1.65), прыжок с
  места 1.5, в движении ванильные 1.25, высота глаз в шифте 1.37.
- RsxPlayer: прыжок по наличию горизонтального ввода, глаза при подкрадывании.
- Патч в EntityPlayer.updateSize: высота при подкрадывании из нашего класса.
- Импульс прыжка считается обратным счетом по физике ваниллы.

AABB: редактор хитбоксов и их отрисовка

- Протокол: Hitbox (имя, зона, min/max, поворот), пакеты Hitboxes,
  HitboxInstances и HitboxesReload.
- Сервер: HitboxRegistry читает JSON-файл (world/hitboxes.json, можно
  указать --hitboxes), перечитывает его по запросу клиента и шлет наборы
  игрокам. Сломанный файл не стирает рабочие коробки, а объясняет причину.
- Клиент: RsxHitboxDebug рисует коробки через RenderGlobal.drawBoundingBox
  с подписями DebugRenderer, красит зоны (голова красная, тело желтое, ноги
  синие). Команды: /rsx hitboxes on|off|reload|list|show NAME.
- Новый модуль rsx-plugin-api с интерфейсом Hitboxes: плагин может
  зарегистрировать свои коробки. У сервера появился скрипт сборки.

Тесты: протокол 34, сервер 80 (было 74). Форк собирается чисто, 3279 классов.
This commit is contained in:
sasheg dev
2026-10-21 22:31:16 +03:00
parent e7e332f4ca
commit 9980c1561d
18 changed files with 1528 additions and 14 deletions
+5 -4
View File
@@ -14,10 +14,11 @@ function Say($text) { Write-Host " $text" -ForegroundColor Cyan }
$Protocol = Join-Path $Workspace 'rsx-protocol\build\classes'
$Auth = Join-Path $Workspace 'rsx-auth\build\classes'
foreach ($dep in @($Protocol, $Auth)) {
$PluginApi = Join-Path $Workspace 'rsx-plugin-api\build\classes'
foreach ($dep in @($Protocol, $Auth, $PluginApi)) {
if (-not (Test-Path $dep)) {
Write-Host " Missing dependency: $dep" -ForegroundColor Red
Write-Host ' Build rsx-protocol and rsx-auth first.' -ForegroundColor Red
Write-Host ' Build rsx-protocol, rsx-auth and rsx-plugin-api first.' -ForegroundColor Red
exit 1
}
}
@@ -32,7 +33,7 @@ $mainFiles = @(Get-ChildItem (Join-Path $Repo 'src\main\java') -Recurse -Filter
ForEach-Object { $_.FullName })
if ($mainFiles.Count -eq 0) { Write-Host ' No sources found.' -ForegroundColor Red; exit 1 }
$cp = "$Protocol;$Auth"
$cp = "$Protocol;$Auth;$PluginApi"
& javac -encoding UTF-8 --release 17 -Xlint:-options -nowarn -cp $cp -d $mainOut $mainFiles
if ($LASTEXITCODE -ne 0) { Write-Host ' Server failed to compile.' -ForegroundColor Red; exit 1 }
Say "server compiled ($($mainFiles.Count) files)"
@@ -42,7 +43,7 @@ $manifest = Join-Path $Out 'manifest.txt'
Manifest-Version: 1.0
Implementation-Title: RustNotMC server
Implementation-Version: 0.1.0
Class-Path: rsx-protocol.jar rsx-auth.jar
Class-Path: rsx-protocol.jar rsx-auth.jar rsx-plugin-api.jar
"@ | Set-Content -LiteralPath $manifest -Encoding ASCII
$jar = Join-Path $Dist 'rsx-server-core.jar'
+5 -3
View File
@@ -16,10 +16,11 @@ function Say($text) { Write-Host " $text" -ForegroundColor Cyan }
$Protocol = Join-Path $Workspace 'rsx-protocol\build\classes'
$Auth = Join-Path $Workspace 'rsx-auth\build\classes'
foreach ($dep in @($Protocol, $Auth)) {
$PluginApi = Join-Path $Workspace 'rsx-plugin-api\build\classes'
foreach ($dep in @($Protocol, $Auth, $PluginApi)) {
if (-not (Test-Path $dep)) {
Write-Host " Missing dependency: $dep" -ForegroundColor Red
Write-Host ' Build rsx-protocol and rsx-auth first.' -ForegroundColor Red
Write-Host ' Build rsx-protocol, rsx-auth and rsx-plugin-api first.' -ForegroundColor Red
exit 1
}
}
@@ -31,7 +32,7 @@ Remove-Item $mainOut -Recurse -Force -ErrorAction SilentlyContinue
New-Item -ItemType Directory -Force -Path $mainOut | Out-Null
$mainFiles = @(Get-ChildItem (Join-Path $Repo 'src\main\java') -Recurse -Filter '*.java' |
ForEach-Object { $_.FullName })
$cp = "$Protocol;$Auth"
$cp = "$Protocol;$Auth;$PluginApi"
& javac -encoding UTF-8 --release 17 -Xlint:-options -nowarn -cp $cp -d $mainOut $mainFiles
if ($LASTEXITCODE -ne 0) { Write-Host ' Main failed.' -ForegroundColor Red; exit 1 }
@@ -50,6 +51,7 @@ $suites = @(
'net.rustnotmc.server.world.NodeTest',
'net.rustnotmc.server.item.InventoryTest',
'net.rustnotmc.server.craft.CraftTest',
'net.rustnotmc.server.hitbox.HitboxTest',
'net.rustnotmc.server.PlayTest'
)
foreach ($suite in $suites) {