[PR #2951] [MERGED] Fix /list, the missing /damage types and /datapack create #4706

Closed
opened 2026-11-03 05:07:21 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/2951
Author: @kacpherek
Created: 10/27/2026
Status: ✅ Merged
Merged: 10/29/2026
Merged by: @levzzz5154

Base: main ← Head: fix/list-damage-datapack-commands


📝 Commits (7)

  • ff1b016 List every online player in /list
  • 136b352 Give 15 vanilla damage types their own /damage kind
  • 41f6056 Add /datapack create
  • 21ba38e Merge main into fix/list-damage-datapack-commands
  • cdefed7 Merge main into this branch
  • 08c0fc1 Merge remote-tracking branch 'hr/main' into pr-2951
  • fdcefc0 /list uuids in single player shows the player's saved profile id, as the other commands do, instead of the offline id of the name.

📊 Changes

13 files changed (+255 additions, -50 deletions)

View changed files

📝 crates/horizon-client/src/game/commands.rs (+58 -18)
📝 crates/horizon-client/src/game/commands/extra.rs (+4 -13)
📝 crates/horizon-client/src/game/commands/text_commands.rs (+1 -1)
📝 crates/horizon-client/src/game/commands/world_cmds.rs (+15 -0)
📝 crates/horizon-client/src/game/creatures.rs (+11 -0)
📝 crates/horizon-client/src/game/functions.rs (+70 -0)
📝 crates/horizon-client/src/game/lan_actions.rs (+5 -2)
📝 crates/horizon-client/src/game/server_mods.rs (+3 -3)
📝 crates/horizon-client/src/mobs.rs (+67 -5)
📝 crates/horizon-client/src/mobs/creaking.rs (+1 -1)
📝 crates/horizon-client/src/mobs/gear.rs (+18 -5)
📝 crates/horizon-client/src/mobs/warden.rs (+1 -1)
📝 crates/horizon-client/src/mobs/wither.rs (+1 -1)

📄 Description

What and why

  • /list printed a fixed "1 of a max of 8" and only the host. It now lists every online player: the host of a single-player or LAN world first, then the placed guests in join order, with the real count and the hub's max. /list uuids shows each name with its UUID. A single-player owner is already a guest of the in-process server, so the host entry is left out there and the owner is not listed twice.
  • /damage fell back to the Generic kind for 15 vanilla damage types (cramming, falling_anvil, falling_block, fireworks, generic_kill, lightning_bolt, out_of_world, outside_border, sonic_boom, spit, stalagmite, starve, sulfur_cube_hot, wind_charge, wither). Each now has its own kind, and the armour, knockback, panic, fire, projectile, helmet and invulnerability rules follow the vanilla damage type tags. Creaking, Warden and Wither now ask "bypasses invulnerability" instead of "is Generic", so out_of_world and generic_kill get through them as in vanilla. Protection enchantments do not reduce those two either (protection skips #bypasses_invulnerability). falling_stalactite is not included.
  • /datapack create <id> <description> fell into the disable branch and replied with an empty unknown-pack key. It now writes <world>/datapacks/<id>/ with a data folder and a pack.mcmeta, and replies with vanilla's success and failure keys.

Vanilla reference

  • ListPlayersCommand.java:33-38 (format: every player, count and max, uuids form)
  • DataPackCommand.java:156-170 (create branch, LEVEL_OWNERS), :173 (createPack: id checks, exists check, pack.mcmeta, data folder, keys)
  • Damage type tags in data/minecraft/tags/damage_type/: bypasses_armor, no_knockback, panic_causes, panic_environmental_causes, is_fire, is_projectile, damages_helmet, bypasses_wolf_armor, bypasses_invulnerability, bypasses_enchantments
  • Creaking.java:153-157 (hurtServer: bypasses invulnerability goes to the normal hurt), Warden.java:162-164 (isInvulnerableTo), WitherBoss.java:464-466 (invulnerable ticks)
  • PackFormat.java (packCodec: min_format/max_format written as bare major numbers for 121.0)

Self-check

clippy (-D warnings, all targets) and fmt pass for horizon-client. Not run in game.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/horizon-rust/horizon/pull/2951 **Author:** [@kacpherek](https://github.com/kacpherek) **Created:** 10/27/2026 **Status:** ✅ Merged **Merged:** 10/29/2026 **Merged by:** [@levzzz5154](https://github.com/levzzz5154) **Base:** `main` ← **Head:** `fix/list-damage-datapack-commands` --- ### 📝 Commits (7) - [`ff1b016`](https://github.com/horizon-rust/horizon/commit/ff1b01616fe5aa53f502c2c50646d378e7d7ef7e) List every online player in /list - [`136b352`](https://github.com/horizon-rust/horizon/commit/136b352e4fdbcbfc8b49ba7474dc88d8486121e7) Give 15 vanilla damage types their own /damage kind - [`41f6056`](https://github.com/horizon-rust/horizon/commit/41f60562fdcfa93ad5db6414b2e7e2a6c7bbfabd) Add /datapack create - [`21ba38e`](https://github.com/horizon-rust/horizon/commit/21ba38e633b1ff8116fdc11c447f38e521e9770a) Merge main into fix/list-damage-datapack-commands - [`cdefed7`](https://github.com/horizon-rust/horizon/commit/cdefed7a191024eaf6f52b168af9cdb205b257e3) Merge main into this branch - [`08c0fc1`](https://github.com/horizon-rust/horizon/commit/08c0fc128668e1376ec06926b1924e059caadbe2) Merge remote-tracking branch 'hr/main' into pr-2951 - [`fdcefc0`](https://github.com/horizon-rust/horizon/commit/fdcefc0d9003e9e133ba443e54cb7c090ca3b798) /list uuids in single player shows the player's saved profile id, as the other commands do, instead of the offline id of the name. ### 📊 Changes **13 files changed** (+255 additions, -50 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game/commands.rs` (+58 -18) 📝 `crates/horizon-client/src/game/commands/extra.rs` (+4 -13) 📝 `crates/horizon-client/src/game/commands/text_commands.rs` (+1 -1) 📝 `crates/horizon-client/src/game/commands/world_cmds.rs` (+15 -0) 📝 `crates/horizon-client/src/game/creatures.rs` (+11 -0) 📝 `crates/horizon-client/src/game/functions.rs` (+70 -0) 📝 `crates/horizon-client/src/game/lan_actions.rs` (+5 -2) 📝 `crates/horizon-client/src/game/server_mods.rs` (+3 -3) 📝 `crates/horizon-client/src/mobs.rs` (+67 -5) 📝 `crates/horizon-client/src/mobs/creaking.rs` (+1 -1) 📝 `crates/horizon-client/src/mobs/gear.rs` (+18 -5) 📝 `crates/horizon-client/src/mobs/warden.rs` (+1 -1) 📝 `crates/horizon-client/src/mobs/wither.rs` (+1 -1) </details> ### 📄 Description ## What and why - `/list` printed a fixed "1 of a max of 8" and only the host. It now lists every online player: the host of a single-player or LAN world first, then the placed guests in join order, with the real count and the hub's max. `/list uuids` shows each name with its UUID. A single-player owner is already a guest of the in-process server, so the host entry is left out there and the owner is not listed twice. - `/damage` fell back to the Generic kind for 15 vanilla damage types (cramming, falling_anvil, falling_block, fireworks, generic_kill, lightning_bolt, out_of_world, outside_border, sonic_boom, spit, stalagmite, starve, sulfur_cube_hot, wind_charge, wither). Each now has its own kind, and the armour, knockback, panic, fire, projectile, helmet and invulnerability rules follow the vanilla damage type tags. Creaking, Warden and Wither now ask "bypasses invulnerability" instead of "is Generic", so out_of_world and generic_kill get through them as in vanilla. Protection enchantments do not reduce those two either (`protection` skips `#bypasses_invulnerability`). falling_stalactite is not included. - `/datapack create <id> <description>` fell into the disable branch and replied with an empty unknown-pack key. It now writes `<world>/datapacks/<id>/` with a `data` folder and a `pack.mcmeta`, and replies with vanilla's success and failure keys. ## Vanilla reference - ListPlayersCommand.java:33-38 (`format`: every player, count and max, `uuids` form) - DataPackCommand.java:156-170 (`create` branch, `LEVEL_OWNERS`), :173 (`createPack`: id checks, exists check, `pack.mcmeta`, `data` folder, keys) - Damage type tags in `data/minecraft/tags/damage_type/`: bypasses_armor, no_knockback, panic_causes, panic_environmental_causes, is_fire, is_projectile, damages_helmet, bypasses_wolf_armor, bypasses_invulnerability, bypasses_enchantments - Creaking.java:153-157 (`hurtServer`: bypasses invulnerability goes to the normal hurt), Warden.java:162-164 (`isInvulnerableTo`), WitherBoss.java:464-466 (invulnerable ticks) - PackFormat.java (`packCodec`: `min_format`/`max_format` written as bare major numbers for 121.0) ## Self-check clippy (`-D warnings`, all targets) and fmt pass for horizon-client. Not run in game. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 05:07:21 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
horizon-rust/horizon#4706
No description provided.