Files
itsRevela-LCE_Revelations/Minecraft.Server.FourKit/Sound.cs
itsRevela 42a582fb9f feat: add FourKit plugin host with dual server build
Adds the FourKit .NET 10 plugin host as a second dedicated server
build flavour alongside the existing vanilla server. Both flavours
build from the same source tree, with FourKit gated by the
MINECRAFT_SERVER_FOURKIT_BUILD preprocessor define.

Build layout:

  Minecraft.Server         vanilla, no plugin support, no .NET dep
  Minecraft.Server.FourKit FourKit-enabled, ships with bundled
                           .NET 10 self-contained runtime in runtime/
                           and an empty plugins/ folder

Both produce a Minecraft.Server.exe in their own per-target output
dir. The variant identity lives in the directory name, not the
binary name, so either flavour can be shipped as a drop-in.

Native bridge (Minecraft.Server/FourKit*.{cpp,h}):

* FourKitRuntime: hosts CoreCLR via hostfxr's command-line init API
  (the runtime-config API does not support self-contained components)
* FourKitBridge: ~50 Fire* event entry points, with inline no-op
  stubs for the standalone build so gameplay code can call them
  unconditionally
* FourKitNatives: ~80 native callbacks the managed side invokes
  for player/world/inventory mutations
* FourKitMappers: type and enum mapping helpers

Managed plugin host (Minecraft.Server.FourKit/):

* Bukkit-style API: Player, World, Block, Inventory, Command,
  Listener, EventHandler attribute, ~54 event classes
* PluginLoader with per-plugin AssemblyLoadContext
* FourKitHost as the [UnmanagedCallersOnly] entry point table
* Runtime resolves plugins relative to the host process so they
  always live next to Minecraft.Server.exe regardless of where the
  managed assembly itself is loaded from

Engine hooks (Minecraft.Client/, Minecraft.World/):

* Player lifecycle (PreLogin, Login, Join, Quit, Kick, Move,
  Teleport, Portal, Death) wired into PendingConnection and
  PlayerConnection without disturbing the cipher handshake or
  identity-token security flow
* Inventory open/click/drop hooks across every container menu type
* Block place/break/grow/burn/spread/from-to hooks across the
  full tile family
* Bed enter/leave, sign change, entity damage/death, ender pearl
  teleport hooks

Regression fixes preserved while applying donor diffs:

* ServerPlayer::die() retains the LCE-Revelations hardcore branch
  (setGameMode(ADVENTURE) + banPlayerForHardcoreDeath) in both the
  FourKit and non-FourKit code paths
* ServerLevel::entityAdded() retains the sub-entity ID reassignment
  loop required by the client's handleAddMob offset, fixing Ender
  Dragon and Wither boss multi-part hit detection
* LivingEntity::travel() retains the raw Player* cast and the
  cached frictionTile, both Revelations perf wins that the donor
  silently reverted
* ServerLogger.cpp keeps the file-logging code donor stripped
* PlayerList.cpp end portal transition fix and UIScene_EndPoem
  bounds-check are intact

Build system:

* Top-level CMakeLists.txt adds the Minecraft.Server.FourKit
  subdirectory and pulls in the new shared cmake/ServerTarget.cmake
  helper
* Minecraft.Server/cmake/sources/Common.cmake is now location
  independent (uses CMAKE_CURRENT_LIST_DIR) so the source list
  can be consumed from either server target's CMakeLists.txt
* The seven FourKit*.cpp/h files live in their own
  _MINECRAFT_SERVER_COMMON_SERVER_FOURKIT variable so the
  standalone target omits them
* configure-time .NET 10 SDK check fails fast with a clear
  download link if the SDK is missing
* global.json pins the SDK to 10.0.100 with latestFeature
  rollforward

Sample plugin (samples/HelloPlugin/) demonstrates the loader and
the PlayerJoinEvent listener pattern.

CI:

* nightly.yml builds both server flavours, ships
  LCE-Revelations-Server-Win64.zip and
  LCE-Revelations-Server-Win64-FourKit.zip, attests both, and
  updates release notes for the dual-flavour layout
* pull-request.yml pulls in actions/setup-dotnet so the FourKit
  publish step works in PR validation
* All zip artifacts and the client zip are renamed from
  LCREWindows64 to LCE-Revelations-{Client,Server}-Win64

Documentation:

* COMPILE.md gets a VS 2022 quick start, .NET 10 prereq section,
  server flavours explanation, and a troubleshooting section
* docs/FOURKIT_PORT_RECON.md captures the file-by-file recon that
  drove the port
* docs/FOURKIT_PARITY.md is the canonical reference for which
  events FourKit fires

Docker:

* docker-compose.dedicated-server.yml MC_RUNTIME_DIR default points
  at the vanilla CMake output. The FourKit Docker image is
  intentionally NOT shipped yet because hosting .NET 10 self
  contained inside Wine has not been smoke-tested
2026-04-08 03:02:48 -05:00

209 lines
4.6 KiB
C#

namespace Minecraft.Server.FourKit;
/// <summary>
/// An Enum of Sounds the server is able to send to players.
/// </summary>
public enum Sound
{
AMBIENCE_CAVE = 75,
AMBIENCE_RAIN = 73,
AMBIENCE_THUNDER = 74,
ANVIL_BREAK = 110,
ANVIL_LAND = 111,
ANVIL_USE = 112,
ARROW_HIT = 56,
BAT_DEATH = 140,
BAT_HURT = 139,
BAT_IDLE = 138,
BAT_LOOP = 138,
BAT_TAKEOFF = 141,
BLAZE_BREATH = 15,
BLAZE_DEATH = 17,
BLAZE_HIT = 16,
BREATH = 81,
BURP = 63,
CAT_HISS = 54,
CAT_HIT = 54,
CAT_MEOW = 53,
CAT_PURR = 51,
CAT_PURREOW = 52,
CHEST_CLOSE = 70,
CHEST_OPEN = 69,
CHICKEN_EGG_POP = 2,
CHICKEN_HURT = 1,
CHICKEN_IDLE = 0,
CHICKEN_WALK = 148,
CLICK = 65,
COW_HURT = 4,
COW_IDLE = 3,
COW_WALK = 147,
CREEPER_DEATH = 42,
CREEPER_HISS = 41,
DIG_GRASS = 125,
DIG_GRAVEL = 126,
DIG_SAND = 127,
DIG_SNOW = 128,
DIG_STONE = 129,
DIG_WOOD = 130,
DIG_WOOL = 124,
DONKEY_ANGRY = 175,
DONKEY_DEATH = 165,
DONKEY_HIT = 169,
DONKEY_IDLE = 173,
DOOR_CLOSE = 72,
DOOR_OPEN = 71,
DRINK = 61,
EAT = 62,
ENDERDRAGON_DEATH = 101,
ENDERDRAGON_GROWL = 102,
ENDERDRAGON_HIT = 103,
ENDERDRAGON_WINGS = 104,
ENDERMAN_DEATH = 25,
ENDERMAN_HIT = 24,
ENDERMAN_IDLE = 23,
ENDERMAN_SCREAM = 151,
ENDERMAN_STARE = 150,
ENDERMAN_TELEPORT = 26,
EXPLODE = 57,
FALL_BIG = 83,
FALL_SMALL = 82,
FIRE = 80,
FIRE_IGNITE = 79,
FIREWORK_BLAST = 132,
FIREWORK_BLAST2 = 133,
FIREWORK_LARGE_BLAST = 134,
FIREWORK_LARGE_BLAST2 = 135,
FIREWORK_LAUNCH = 131,
FIREWORK_TWINKLE = 136,
FIREWORK_TWINKLE2 = 137,
FIZZ = 58,
FUSE = 60,
GHAST_CHARGE = 22,
GHAST_DEATH = 20,
GHAST_FIREBALL = 21,
GHAST_MOAN = 18,
GHAST_SCREAM = 19,
GHAST_SCREAM2 = 19,
GLASS = 66,
HORSE_ANGRY = 176,
HORSE_ARMOR = 161,
HORSE_BREATHE = 178,
HORSE_DEATH = 166,
HORSE_GALLOP = 177,
HORSE_HIT = 170,
HORSE_IDLE = 174,
HORSE_JUMP = 181,
HORSE_LAND = 160,
HORSE_SADDLE = 162,
HORSE_SKELETON_DEATH = 164,
HORSE_SKELETON_HIT = 168,
HORSE_SKELETON_IDLE = 172,
HORSE_SOFT = 180,
HORSE_WOOD = 179,
HORSE_ZOMBIE_DEATH = 163,
HORSE_ZOMBIE_HIT = 167,
HORSE_ZOMBIE_IDLE = 171,
HURT = 81,
HURT_FLESH = 81,
IRONGOLEM_DEATH = 107,
IRONGOLEM_HIT = 106,
IRONGOLEM_THROW = 105,
IRONGOLEM_WALK = 108,
ITEM_BREAK = 68,
ITEM_PICKUP = 59,
LAVA = 93,
LAVA_POP = 92,
LEVEL_UP = 188,
MAGMACUBE_JUMP = 49,
MAGMACUBE_WALK = 50,
MAGMACUBE_WALK2 = 49,
MINECART_BASE = 94,
MINECART_INSIDE = 95,
NOTE_BASS = 88,
NOTE_BASS_DRUM = 85,
NOTE_BASS_GUITAR = 88,
NOTE_PIANO = 84,
NOTE_PLING = 84,
NOTE_SNARE_DRUM = 86,
NOTE_STICKS = 87,
ORB_PICKUP = 67,
PIG_DEATH = 6,
PIG_IDLE = 5,
PIG_WALK = 149,
PISTON_EXTEND = 90,
PISTON_RETRACT = 89,
PORTAL = 76,
PORTAL_TRAVEL = 78,
PORTAL_TRIGGER = 77,
SHEEP_IDLE = 7,
SHEEP_SHEAR = 152,
SHEEP_WALK = 153,
SHOOT_ARROW = 55,
SILVERFISH_HIT = 32,
SILVERFISH_IDLE = 31,
SILVERFISH_KILL = 33,
SILVERFISH_WALK = 34,
SKELETON_DEATH = 154,
SKELETON_HURT = 36,
SKELETON_IDLE = 35,
SKELETON_WALK = 155,
SLIME_ATTACK = 40,
SLIME_WALK = 185,
SLIME_WALK2 = 186,
SPIDER_DEATH = 38,
SPIDER_IDLE = 37,
SPIDER_WALK = 156,
SPLASH = 64,
SPLASH2 = 64,
STEP_GRASS = 97,
STEP_GRAVEL = 96,
STEP_LADDER = 123,
STEP_SAND = 100,
STEP_SNOW = 122,
STEP_STONE = 94,
STEP_WOOD = 95,
STEP_WOOL = 99,
SUCCESSFUL_HIT = 56,
SWIM = 159,
THORNS = 109,
VILLAGER_DEATH = 116,
VILLAGER_HAGGLE = 113,
VILLAGER_HIT = 115,
VILLAGER_IDLE = 114,
VILLAGER_NO = 118,
VILLAGER_YES = 117,
WATER = 91,
WITCH_DEATH = 184,
WITCH_HURT = 183,
WITCH_IDLE = 182,
WITHER_DEATH = 145,
WITHER_HURT = 144,
WITHER_IDLE = 143,
WITHER_SHOOT = 146,
WITHER_SPAWN = 142,
WOLF_BARK = 11,
WOLF_DEATH = 13,
WOLF_GROWL = 8,
WOLF_HOWL = 8,
WOLF_HURT = 12,
WOLF_PANT = 10,
WOLF_SHAKE = 14,
WOLF_WALK = 157,
WOLF_WHINE = 9,
WOOD_CLICK = 65,
ZOMBIE_DEATH = 45,
ZOMBIE_HURT = 44,
ZOMBIE_IDLE = 43,
ZOMBIE_INFECT = 119,
ZOMBIE_METAL = 48,
ZOMBIE_PIG_ANGRY = 30,
ZOMBIE_PIG_DEATH = 29,
ZOMBIE_PIG_HURT = 28,
ZOMBIE_PIG_IDLE = 27,
ZOMBIE_REMEDY = 121,
ZOMBIE_STEP = 158,
ZOMBIE_UNFECT = 120,
ZOMBIE_WOOD = 46,
ZOMBIE_WOODBREAK = 47,
}