Skip to content
VSPT

1.23: the engine

This chapter covers VintagestoryLib.dll, the game’s engine: the client (ClientMain, the screens, the renderer, the OpenGL platform), the server (ServerMain and its systems), and the code both share (mod loading, assets, networking, chunks, inventories). It is closed source and not part of the modding API, so nothing in it is promised to stay the same between versions. It is for mod developers who Harmony-patch the engine (prefixes, postfixes and transpilers), who reach into it by reflection, or who call its public types directly, for example by casting api.World to ClientMain or ServerMain.

Other chapters cover the public API (VintagestoryAPI), the base game mods (VSEssentials, VSSurvivalMod, VSCreativeMod), content (JSON assets), shaders and the bundled libraries. Many engine changes here are the implementation of an API change; where that is so, this chapter describes the engine side and says “see the API chapter” for the rest.

How it was made: the engine of both versions was decompiled with the same decompiler and the same settings, so every difference between the two decompiles is a real change in the code, not decompiler noise. The decompiles were compared file by file, and a member-level list was made from the compiled metadata of both assemblies, private members included. Everything here was checked against the decompiled code; points that are inference rather than something read directly in the code are marked “(inferred)”. Short decompiled snippets are quoted where they show a changed patch point; you will need your own decompile for anything longer.

1.23.0-pre.1 is a pre-release. Anything here can change again before 1.23.0, and engine internals change more freely than the API. Re-check your patches against each new pre-release.

Count
Decompiled files changed 286 (11,118 lines added, 5,857 removed)
Files added / removed 14 / 14 (two of each are compiler-generated helpers)
Types added / removed / changed 27 / 11 / 11
Members added / removed / changed 534 / 164 / 131
Of the removed members, reachable without reflection 88
Types that became internal 6 (the master-server packet types)

The engine no longer references ICSharpCode.SharpZipLib (mod zips are read with System.IO.Compression), embeds a JSON schema for dialogue assets, and reports its version as 1.23.0-pre.1 (assembly version 1.23.0.0). The network protocol version went from 1.22.6 to 1.23.2, so 1.22 and 1.23 clients and servers cannot play together.

These follow from the shape of the diff and apply to almost every patch.

  • Target patches by full signature. Many methods gained overloads beside the old ones: FastBlockPos overloads on the block accessors, WorldMap, ClientWorldMap and ServerWorldMap; ClientEventManager.TriggerChunkRetesselated(Vec3i, int); TextureAtlasManager.InsertTextureOrAddReference; ServerMain.SendPacket(ConnectedClient, ...). A [HarmonyPatch(typeof(X), "Name")] without argument types that worked in 1.22.7 can now be ambiguous, and a patch on the old overload may no longer see the engine’s own calls, which moved to the new one.
  • Transpilers that count locals or match calls will drift. Several kinds of change move IL without changing behaviour:
    • the HiDPI work replaced window.ClientSize and Platform.WindowSize with FramebufferSize in dozens of methods (same call count, different getter);
    • methods gained locals (ClientPlatformWindows.SetupDefaultFrameBuffers, ChunkRenderer.RenderOpaque, SystemRenderEntities.OnRenderOpaque3D, GameMain.RayTraceForSelection) or lost them (ScreenManager.Render);
    • string.Format and Path.Combine argument buffers now use the runtime’s System.Runtime.CompilerServices.InlineArrayN<T> instead of compiler-generated <>y__InlineArrayN<T> types, which changes generic type tokens in many methods (a newer compiler, inferred);
    • binary reads moved from MemoryStream plus BinaryReader to the API’s BinarySpanReader, removing locals and using blocks;
    • version strings ("1.22.7" to "1.23.0-pre.1") are literals in many methods.
  • Value types and spans. NetIncomingMessage became a struct, SpawnOppurtunity became the struct SpawnOpportunity, and the master-server packets became internal structs. A prefix that takes a struct must take it by ref to change it. ServerMain’s broadcast methods take params ReadOnlySpan<IServerPlayer>; a patch must declare the parameter with that type, and span parameters cannot be boxed into __args (inferred).
  • Fields that became properties. Camera.Fov, Asset.FilePath and WorldChunk.BlockEntities changed from fields to properties. A mod compiled against 1.22.7 that touches them fails with MissingFieldException until it is rebuilt, and GetField reflection returns null.
  • Primary constructors. ClientPlayerInventoryManager and ServerPlayerInventoryManager now use primary constructors, so their private game and server fields are gone; the captured values live in compiler-generated fields (<game>P, <server>P).
  • Renamed parameters. Harmony injects arguments by name, so a renamed parameter breaks a patch that names it: TextureAtlasManager.GetOrInsertTexture (loc to path), BleedingJsonTesselator.TryGetCustomTexture (result to cTexResult), APIBase.LoadModConfig and friends (filename to fileName), ServerMain.HandleChatMessage (groupid to groupId), ServerPlayer.Disconnect (message to logMessage).
  • Async rewrites. Several methods became async (GuiScreenDownloadMods.installAsync, GuiScreenGetUpdate.downloadInstallerAsync, ServerConnectData.FromHostAsync, ServerSystemHeartbeat.SendRequestAsync). Their bodies live in compiler-generated state machines; patch the state machine’s MoveNext or, better, patch something else.
  • Rebuild against 1.23. Constants such as GameVersion.NetworkVersion and the generated packet field ids are inlined into your assembly when you compile it. A mod built against 1.22.7 keeps the old values.
# Change Who it breaks
1 Window size and framebuffer size are separate (HiDPI, Wayland). ClientMain.Width/Height and IRenderAPI.FrameWidth/FrameHeight are now framebuffer pixels, with new WindowWidth/WindowHeight; RuntimeEnv.GUIScale now includes the display scale; every viewport and framebuffer uses FramebufferSize; mouse positions are scaled on macOS and Wayland. Transpilers on ClientSize/WindowSize reads (rendering, screens, screenshots); GUI or overlay code that divides by ClientSettings.GUIScale or converts FrameWidth to pixels itself. Platform and window
2 WorldChunk.BlockEntities is keyed by in-chunk index. It went from a public Dictionary<BlockPos, BlockEntity> field to a lazily created Dictionary<int, BlockEntity> property keyed by pos.ToIndex3d(). Anything that indexes or iterates a chunk’s block entities; compiled mods fail with MissingFieldException. Block accessors and chunk data
3 Mod loading changed. ModContainer’s constructor is private (use CreateIfSourceTypeIsUnderstood); ModLoader.LoadMods and ModCompilationContext take an EnumAppSide; wrong-side mods, content-only ones included, are now disabled before they are unpacked; source mods are parsed, not compiled, to read their mod info; SharpZipLib is gone. Mod managers, loaders and patches on mod discovery; content mods marked "side": "Server"; source mods that relied on [ModDependency]. Mods
4 The network transport and the server’s send paths were rewritten. NetIncomingMessage is a struct, ReadMessage() became TryReadMessage(out ...), INetworkConnection uses spans, ServerNetManager is gone, a ConnectedClient is made only on the first login packet, broadcasts take params ReadOnlySpan<IServerPlayer> and send by ConnectedClient. Raw byte[] sends to remote clients appear to disconnect them in pre.1 (inferred). Network patches, proxies and bots; mods that pass a null in a broadcast skip list, use a custom IServerPlayer, or send raw byte arrays. Networking
5 The world has a separate worldgen seed. SaveGame.SeedWorldgen drives terrain; Seed (and World.Seed) is random for new worlds and re-randomised once for 1.22 worlds; clients never receive the terrain seed. Worldgen code and terrain tools that read World.Seed, WorldManager.Seed or SaveGame.Seed. The worldgen seed
6 Hotbar slot numbers. The skill slot is active slot -1 and the off-hand -2; slots 10 and up are always backpack slots; the off-hand hunger penalty uses the key offhandpenalty. Code that uses 10 for the skill slot or shifts backpack slots by one; HUD patches. Player inventories
7 Recipe registries became custom registries. GameMain.GetRecipeRegistry returns CustomRegistryBase and is obsolete; ClassRegistry’s recipe-registry members were renamed. Mods that register or look up recipe registries through the engine types. Registries
8 Anti-abuse is on by default, and bans are by UID. ServerConfig.AntiAbuse defaults to Auto (public dedicated servers run at Basic), placements count, the range slack fell to 0.25 and pickingrange no longer exempts; PlayerDataManager keeps bans and the whitelist in UID dictionaries and lost GetPlayerBan/GetPlayerWhitelist. Server admin mods, mods that place or break blocks for players, mods that read ban lists. Anti-abuse
9 Spawner hooks moved. OnTrySpawnEntity now runs on the spawner thread per candidate position; OnTrySpawnGroupNearOffthread is gone (use OnEntityGroupSpawning); SpawnOppurtunity is the struct SpawnOpportunity. Spawn control mods. Entities and spawning
10 Rendering patch points moved. OIT textures now live in the transparent framebuffer (static ids removed), the selection outline and debug wireframes draw at AfterOIT, SetupDefaultFrameBuffers gained a local, JsonTesselator was rewritten (public decor helpers gone; a missing atlas pool now skips the block), tesselations carry ids, and atlas textures can be freed at run time. Renderer mods, shader-pipeline patches, chunk-mesh transpilers, atlas readers. Rendering systems
11 Joining and sounds in ScreenManager. ConnectToMultiplayer(string, string) is internal and takes a Task<ServerConnectData>; ServerConnectData.FromHost became FromHostAsync; PlaySound(string) and PlaySound(AssetLocation) need a bool randomizePitch. Server-list and auto-join mods, menu mods that play sounds. Connecting to a server
12 Both packet handler overloads are called. For block entities and entities, client and server, the engine calls the new SerializedData overload and then the old byte[] one. Classes that override both handle each packet twice. Packet handling on the client

The systems below follow the engine’s own layout, client first, then shared code, networking and the server.

Client start-up, the main loop and screens

Section titled “Client start-up, the main loop and screens”

Three things run through this whole area. First, the engine now keeps the window’s logical size and its framebuffer’s pixel size apart (HiDPI and Wayland support): every screen, ElementWindowBounds, the main menu background and ScreenManager.Render(float) read Platform.FramebufferSize where they read Platform.WindowSize, and every layout that divided by ClientSettings.GUIScale now divides by RuntimeEnv.GUIScale, which is set to ClientSettings.GUIScale * RuntimeEnv.DPIHScale (in the MainMenuAPI constructor and in the guiScale settings watcher). On a display with a DPI scale of 1 the numbers are the same (inferred); on a scaled display a mod screen that still uses WindowSize or ClientSettings.GUIScale lays out at the wrong size. ClientPlatformAbstract.FramebufferSize and the platform side are covered under “Platform and window”. Second, ScreenManager now calls GuiScreen.OnScreenUnload() (which existed in 1.22.7 but was never called) on every screen it leaves, and routes StartMainMenu and StartGame through LoadScreen. Third, many methods compare against the version literal, which changed from "1.22.7" to "1.23.0-pre.1" (ldstr): a transpiler that matches the old literal no longer finds it.

Member (1.22.7) 1.23.0-pre.1 What to do
ScreenManager.Render(float) (internal): locals width, height from Platform.WindowSize locals removed; viewport, ortho matrix and version label use Platform.FramebufferSize Re-anchor transpilers; there are two fewer locals
ScreenManager.BeginClipArea(ElementBounds) scissor Y from FramebufferSize.Height Use the framebuffer height in your own clip maths
GuiScreen.dialogBase(string, double, double) (protected), GuiScreen.Cmp_OnRecomposed() FramebufferSize and RuntimeEnv.GUIScale Mod screens built on dialogBase follow automatically; mirror it in hand-built layouts
ElementWindowBounds (internal): constructor, CalcWorldBounds(), RequiresRecalculation FramebufferSize None unless patched
GuiCompositeMainMenuLeft, GuiScreenMainRight, GuiScreenConnectingToServer, GuiScreenLoadingGame, GuiScreenCredits, GuiScreenMods, GuiScreenOnlineMods, GuiScreenMultiplayer, GuiScreenSingleplayer, GuiScreenSingleplayerNewWorld, GuiScreenWorldCustomize, GuiScreenPublicServers layout code WindowSize became FramebufferSize; ClientSettings.GUIScale became RuntimeEnv.GUIScale Transpilers matching get_WindowSize or ClientSettings.get_GUIScale in these methods break
GuiScreenRunningGame.RenderToPrimary(float) 3D viewport is FramebufferSize * SSAA / RuntimeEnv.DPIHScale (and DPIVScale for height) The world renders at logical size times SSAA, not at framebuffer size (inferred from the expression); re-anchor patches
GuiScreenRunningGame.RenderToDefaultFramebuffer(float): locals width, height removed; FramebufferSize inline Re-anchor transpilers
ClientProgram.Start (private) also sets platform.FramebufferSize from gamewindow.FramebufferSize None
MainMenuAPI constructor calls ClientPlatformWindows.UpdateDpiScale() and sets RuntimeEnv.GUIScale None
// ScreenManager.Render(float), 1.22.7
int width = Platform.WindowSize.Width;
int height = Platform.WindowSize.Height;
Platform.GlViewport(0, 0, width, height);
// ScreenManager.Render(float), 1.23.0-pre.1
Platform.GlViewport(0, 0, Platform.FramebufferSize.Width, Platform.FramebufferSize.Height);
// GuiScreenRunningGame.RenderToPrimary(float), 1.23.0-pre.1
int width = platform.FramebufferSize.Width;
int height = platform.FramebufferSize.Height;
int fullWidth = (int)((float)width * ssaaLevel / RuntimeEnv.DPIHScale);
int fullHeight = (int)((float)height * ssaaLevel / RuntimeEnv.DPIVScale);

DoGameInitStage1() (run on its own thread from ScreenManager.Start) now sets loadingText and logs “Loading assets” before it asks SessionManager.GetNewestVersion for the newest version; GetNewestVersion now fetches latestunstable.txt over HTTPS instead of lateststable.txt. More important, GuiScreenLoadingGame.RenderToDefaultFramebuffer no longer waits for ScreenManager.loadingText to become null (the end of stage 1) before it calls DoGameInitStage2(): it shows “Loading shaders” on its first frame and calls stage 2 on its second. A patch that assumed stage 2 (shaders, cursors, hotkeys, the login check) always runs after assets and sounds have loaded can no longer rely on the loading screen to enforce that. Stage 2’s ShaderRegistry.Load() now also registers the default shader programs itself (the static constructor that did it is gone; see Shaders).

// GuiScreenLoadingGame.RenderToDefaultFramebuffer(float), 1.22.7
if (ScreenManager.loadingText == null && !loadingShaders)
{
textElem.SetNewText("Loading shaders");
// ...
loadingShaders = true;
return;
}
// GuiScreenLoadingGame.RenderToDefaultFramebuffer(float), 1.23.0-pre.1
if (!shadersLoaded)
{
if (!loadingShaders)
{
textElem.SetNewText(Lang.Get("Loading shaders"));
// ...
loadingShaders = true;
return;
}
ScreenManager.DoGameInitStage2();
shadersLoaded = true;
}

Other start-up changes in ScreenManager: registerSettingsWatchers() adds watchers on optimizeRamMode and developerMode that call a new private setupJsonLoadSettings(), which calls JsonUtil.setupLoadSettings(OptimizeRamMode == 2 && !DeveloperMode) (see the API chapter); loadCursors() loads a new trim cursor; LoadCursor(string) no longer skips macOS, so custom cursors now load there too; the glintmod check is null-safe on ModContainer.Info; the command-line world start sets StartServerArgs.DeveloperMode.

Member (1.22.7) 1.23.0-pre.1 What to do
ScreenManager.DoGameInitStage1() (public) first statements reordered; one more Logger.Notification call Re-anchor transpilers on the call order
GuiScreenLoadingGame.RenderToDefaultFramebuffer(float); field accum (private) no wait on loadingText; accum and the “Waiting for async sound loading…” log removed Do not rely on stage 1 having finished when stage 2 runs
SessionManager.GetNewestVersion queries https://api.vintagestory.at/latestunstable.txt None
ScreenManager.LoadCursor(string) (private) no macOS early-out Patches that skipped Mac are now reached on Mac
- ScreenManager.setupJsonLoadSettings() (private) Hook here to follow RAM-mode JSON settings

LoadScreen(GuiScreen), LoadScreenNoLoadCall(GuiScreen) and LoadAndCacheScreen(Type) now call CurrentScreen.OnScreenUnload() on the outgoing screen before the dispose check (which is unchanged). StartMainMenu() used to assign CurrentScreen = mainScreen and call OnScreenLoaded() directly; it now calls LoadScreen(mainScreen). StartGame(bool, StartServerArgs, ServerConnectData) used to assign CurrentScreen = new GuiScreenConnectingToServer(...) directly; it now calls LoadScreen, so the outgoing screen gets OnScreenUnload() and is disposed (unless cached), and GuiScreenConnectingToServer gets the base GuiScreen.OnScreenLoaded(), which runs the cached-session-key check (inferred effect: an expired session now redirects to the login screen at this point). Because initMainMenu() still disposes CurrentScreen (and clears the screen cache) first, the screen that is current when StartMainMenu() runs now gets one more Dispose() call, from LoadScreen, and an OnScreenUnload() after it has been disposed (read from the code path, not traced at run time; make Dispose overrides idempotent). GuiScreenCredits now overrides OnScreenLoaded() to rebuild its layout and no longer runs the base session check.

// ScreenManager.LoadScreen(GuiScreen), 1.22.7
if (CurrentScreen != null && !CachedScreens.ContainsKey(CurrentScreen) && screen != CurrentScreen && screen != null && screen.ShouldDisposePreviousScreen)
{
CurrentScreen.Dispose();
}
// ScreenManager.LoadScreen(GuiScreen), 1.23.0-pre.1
if (CurrentScreen != null)
{
CurrentScreen.OnScreenUnload();
if (!CachedScreens.ContainsKey(CurrentScreen) && screen != CurrentScreen && screen != null && screen.ShouldDisposePreviousScreen)
{
CurrentScreen.Dispose();
}
}
Member (1.22.7) 1.23.0-pre.1 What to do
GuiScreen.OnScreenUnload() (public virtual) now called by LoadScreen, LoadScreenNoLoadCall, LoadAndCacheScreen Overrides in mod screens now run; use it to stop background work
ScreenManager.StartMainMenu() (internal) LoadScreen(mainScreen) instead of direct assignment Prefix/postfix still work; a transpiler on the old stfld/OnScreenLoaded pair breaks
ScreenManager.StartGame(bool, StartServerArgs, ServerConnectData) (public) LoadScreen(new GuiScreenConnectingToServer(...)) Expect the previous screen to be unloaded and disposed here
GuiScreenCredits new OnScreenLoaded() override None

GuiScreenRunningGame.ExitOrRedirect(bool, string, EnumExitMode) now reads runningGame.GetRedirect() before DestroyGameSession and, on a normal (not disconnect) exit with no local server still running, calls ScreenManager.TryRedirect and returns instead of calling StartMainMenu(). In 1.22.7 the redirect ran after the branch in every case, including disconnects and after StartMainMenu(). TryRedirect(MultiplayerServerEntry) (internal) now calls AskForConnectToMultiplayer, so a server redirect shows a confirmation screen instead of connecting at once. Reconnect() (private) follows a pending redirect instead of reconnecting to the same server. OnWindowClosed() now waits up to 30 seconds (600 polls of 50 ms) for Platform.IsServerRunning to clear before returning; ReloadWorld’s wait loop sleeps 10 ms instead of 5.

Member (1.22.7) 1.23.0-pre.1 What to do
GuiScreenRunningGame.ExitOrRedirect(...) (public) redirect captured early; early return on redirect Postfixes that assumed the main menu is loaded afterwards may now see the confirmation screen
GuiScreenRunningGame.OnWindowClosed() (public override) blocks up to 30 s while the singleplayer server stops None
ScreenManager.TryRedirect(MultiplayerServerEntry) (internal) asks for confirmation None

MainMenuAPI and MainMenuInputAPI implement the new ICoreClientAPI and IInputAPI members (see the API chapter). Most of them throw NotImplementedException in the main menu. Note that MainMenuAPI.PlatformUtils throws while the obsolete Forms still works there, so main-menu code should keep using Forms for now.

Member (1.22.7) 1.23.0-pre.1 What to do
MainMenuAPI.HideGuis get (throws) get and set, both throw Do not use in the main menu
MainMenuAPI.RegisterRecipeRegistry<T>(string) removed; RegisterCustomRegistry<T>(string) (throws) See the API chapter
- MainMenuAPI.PlatformUtils (throws), DeltaTimeLimiter (throws), InDeveloperMode (returns ClientSettings.DeveloperMode) Use Forms in the main menu
- MainMenuInputAPI.PreviousKeyboardKeyState, GetPickingRayFromMousePosition(), GetPickingRayFromMousePosition(int, int) (all throw) Do not use in the main menu
MainMenuGuiAPI.PlaySound(string, bool, float) passes randomizePitch through to ScreenManager.PlaySound None
Section titled “Main menu screens and mods with broken mod info”

ModContainer.Info can now be null (a mod whose modinfo failed to load; see Mods), and the screens handle it: GuiScreenMods.LoadModCells() lists such a mod by file name with “ModInfo failed to load!”; GuiCompositeMainMenuLeft, GuiScreenWorldCustomize, SystemModHandler, ModDbUtil and CrashReporter skip it or print its file name. GuiScreenWorldCustomize’s mod sort keeps core mods first (rewritten, same order) and falls back to the file name when a mod has no name. The singleplayer screens (GuiScreenSingleplayer, GuiScreenSingleplayerModify, GuiScreenSingleplayerNewWorld) now set StartServerArgs.DeveloperMode (an internal field) from ClientSettings.DeveloperMode; GuiScreenSingleplayerModify shows SaveGame.GetSeedWorldgenForGUI() instead of SaveGame.Seed; GuiScreenSingleplayer probes saves with requireWrite: false; the new-world dice button now has the key "dice" and plays a pitched diceroll sound.

Member (1.22.7) 1.23.0-pre.1 What to do
GuiScreenMods.OnClickCellLeft(int) (private, empty) removed Drop patches on it
GuiScreenMods.LoadModCells() (private) local allMods and modinfo removed; null-Info branch Re-anchor transpilers
GuiScreenSingleplayerModify (private seed read) SaveGame.GetSeedWorldgenForGUI() Read the same method if you show the seed
CrashReporter crash message mods without info listed by FileName None

ClientSystemStartup checks the server’s network version against "1.23.2" (was "1.22.6"); it now calls Lock() on CollectibleTagRegistry and EntityTagRegistry straight after registering the server’s tags; it loads the server’s recipes through game.GetCustomRegistry(code) instead of GetRecipeRegistry (see the API chapter); and it allocates ClientMain.BleedOverlayTextureSubIdsByBlockId as int[][] plus a new BleedCornerOverlayTextureSubIdsByBlockId (see Textures, atlases, bleeding and decals). ClientLogger’s constructor now sets ILogger.fallback and ILogger.instance (see the API chapter).

ClientMain (public, sealed) is the client’s GameMain. Its changes are small but touch fields that mods reach for often.

  • Sizes. Width and Height now return Platform.FramebufferSize (pixels) where they returned Platform.WindowSize; the new WindowWidth and WindowHeight return the window size. OrthoMode in RenderToDefaultFramebuffer(float), the aspect ratio in Set3DProjection(float, float) and the viewport in OnResize() use the framebuffer size. See the platform section below for what the two sizes mean.
  • Client systems. Start() builds clientSystems as a ClientSystem[39] (was 40): SystemCinematicCamera is gone from the engine (it is now Vintagestory.GameContent.SystemCinematicCamera in VSEssentials, see the base game mods chapter), so every system after SystemRenderSunMoon moved up one index. Find systems by type or Name, never by index.
  • Removed and renamed fields. AllowFreemove is gone (fly-mode hotkeys and .freemove no longer test it). currentGroupid is now CurrentGroupId.
  • EntityDebugMode is no longer an auto-property: the setter stores a private entityDebugMode, and the getter returns it only while the player is in creative mode.
  • New settings watchers in the constructor: retroMode (sets RuntimeEnv.RetroMode and queues ReloadTextures on the main thread) and liquidDepthFullResolution (rebuilds the framebuffers). See Client settings.
  • OnFowChanged(int) no longer sets MainCamera.ZNear; the Camera.Fov setter does (see Camera).
  • OnOwnPlayerDataReceived() resets ClientSettings.Minbrightness to 0 when it is not 0 and the player lacks the new Privilege.minbrightness (see the API chapter).
  • ExitAndSwitchServer(MultiplayerServerEntry) sets doReconnect instead of exitToMainMenu, so a server redirect goes through the reconnect path (the screen side is under “Leaving a running game and redirects”).
  • SendPacket(byte[]) calls MainNetClient.SendUncompressed (was Send; see Networking). Connect() no longer logs the UDP local endpoint.
  • Dispose() also disposes CollisionScene (see Collision). TrySetWorldConfig(byte[]) reads through the span overload of TreeAttribute.FromBytes. The debug screen gets a memcomitted line.
  • Bleeding fields changed type; see Textures.
Member (1.22.7) 1.23.0-pre.1 What to do
ClientMain.Width, Height (public) framebuffer size; new WindowWidth, WindowHeight Use Width/Height for GL work, WindowWidth/WindowHeight for anything in window coordinates (mouse)
ClientMain.clientSystems (40 entries) 39 entries, SystemCinematicCamera removed Look systems up by type or Name
ClientMain.AllowFreemove (public field) removed Gate fly mode in your own code
ClientMain.currentGroupid (public field) CurrentGroupId Rename reflection and transpiler field references
ClientMain.EntityDebugMode (auto-property) property over private entityDebugMode; true only in creative Do not rely on it in survival
ClientMain.BleedOverlayTextureSubIdsByBlockId (int[]) int[][]; new BleedCornerOverlayTextureSubIdsByBlockId (int[][]) See Textures
ClientMain.OnFowChanged(int) (private) no longer sets ZNear Patch Camera.Fov instead
ClientMain.ExitAndSwitchServer(MultiplayerServerEntry) sets doReconnect Patches that expected the exit to the main menu must follow the reconnect

Connecting to a server and the server browser

Section titled “Connecting to a server and the server browser”

ScreenManager.ConnectToMultiplayer(string host, string password) was public and resolved the host synchronously; it is now internal and takes a task: ConnectToMultiplayer(Task<ServerConnectData> connectionProvider, string? password), which reads connectionProvider.Result. Callers build the task with ServerConnectData.FromHostAsync(host). The vintagestoryjoin:// confirmation moved into a new internal AskForConnectToMultiplayer(string host, string? password), which now confirms every host (not only join links), starts FromHostAsync before the player answers, and is used by UriHandler.HandleConnect and TryRedirect. The command line, the saved-server list, the public server view, the server dashboard and the mod download screen call ConnectToMultiplayer directly, with no confirmation. Errors from the task arrive wrapped in an AggregateException, so the disconnected screen’s message changes form (inferred).

// GuiScreenMultiplayer.OnClickCellLeft(int), 1.22.7
ScreenManager.ConnectToMultiplayer(entry.host, entry.password);
// GuiScreenMultiplayer.OnClickCellLeft(int), 1.23.0-pre.1
ScreenManager.ConnectToMultiplayer(ServerConnectData.FromHostAsync(entry.host), entry.password);

ServerConnectData split its work into internal async helpers. TryResolveConnectionStringAsync returns an error message instead of throwing for unknown, expired or empty vintagehosting (vh-) addresses; FromHostAsync turns that into an ArgumentException. PerformDnsSvrLookupAsync returns a DnsSvrLookupResult instead of logging inline; note that a missing SRV record now reports DnsSvrLookupOutcome.NoServers, so FromHostAsync logs “No name servers found” as an error where 1.22.7 logged “No SRV record found” (observed in the code; harmless, the supplied host is still used).

The multiplayer screen now probes every saved server. GuiScreenMultiplayer builds a raw server-query packet once (static constructor), and OnScreenLoaded() starts one probe task per entry (StartProbingServerAsync, which opens a TCP connection, sends the query and repeats with an IncrementalBackoff from 30 seconds, growing 1.5 times per failure, up to 5 minutes) plus a task that animates the probing dots; OnScreenUnload() cancels them. The cells changed from SavegameCellEntry / GuiElementMainMenuCell to ServerCellEntry / GuiElementServerCell (see the API chapter), and InitGui() runs only when the composer is not yet composed.

Member (1.22.7) 1.23.0-pre.1 What to do
ScreenManager.ConnectToMultiplayer(string host, string password) (public) internal ConnectToMultiplayer(Task<ServerConnectData> connectionProvider, string? password) Reflect, or call ServerConnectData.FromHostAsync(host) and pass the task; patch signatures change
ScreenManager join-link handling inside ConnectToMultiplayer internal AskForConnectToMultiplayer(string host, string? password) Patch this to intercept confirmed joins (URI handler, redirects)
ServerConnectData.FromHost(string) (public static) FromHostAsync(string) returning Task<ServerConnectData> Await it or pass the task on
ServerConnectData.ResolveConnectionString(string) (private) internal TryResolveConnectionStringAsync(string, CancellationToken) returning (string? ErrorMessage, string? ResolvedHost) Re-target patches
- internal PerformDnsSvrLookupAsync(string, CancellationToken), nested DnsSvrLookupResult, DnsSvrLookupOutcome Patch here for SRV lookups
UriHandler.HandleConnect(string) (private) private static; calls AskForConnectToMultiplayer Patches on an instance method need static handling
GuiScreenMultiplayer.LoadServerEntries() (private, returned List<SavegameCellEntry>) LoadServerEntriesAndStartConnectionTests() (private, void) Re-target; the list lives in the serverCells field
GuiScreenMultiplayer.serverentries (private) serverEntries (private readonly), plus serverCells, currentlyProbingCells, stillLookingAtThisScreenCTS Update reflection names
GuiScreenMultiplayer.createCellElem(SavegameCellEntry, ElementBounds) createCellElem(ServerCellEntry, ElementBounds) returning a GuiElementServerCell Re-target
GuiScreenMultiplayer.OnNewScrollbarvalue(float) OnNewScrollbarValue(float) Rename
- GuiScreenMultiplayer.OnScreenUnload(), ProbeServerAsync, StartProbingServerAsync, ServerCellSetError (public), ServerCellUpdateWithQueryAnswer, ServerCellStartUpdatingProbingIndicator, ServerCellStopUpdatingAndHideProbingIndicator Hook points for the probe
ServerListEntry fields (public, plain) required members with [JsonProperty(Required = Required.Always)] (all but serverUrl and gameDescription); the parameterless constructor carries the compiler’s required-members [Obsolete] error Set every required member in an object initialiser, or use the new ServerListEntry.MakeFakeEntry(); a master-server entry missing a field now fails the whole list
ServerListPlaystyle fields required, [JsonObject(ItemRequired = Required.Always)] As above
GuiScreenPublicServers.getServersAsync (private) throws when the response deserialises to null; error cell from MakeFakeEntry() None
GuiScreenPublicServerView.OnJoin() (private) one ConnectToMultiplayer(FromHostAsync(...), password) call; password box hides characters Re-anchor transpilers (two calls became one)
GuiScreenServerDashboard.onJoinServer() (private) ConnectToMultiplayer(ServerConnectData.FromHostAsync(connectionString), _password) Re-anchor

Platform and window: ClientPlatformWindows, HiDPI and input events

Section titled “Platform and window: ClientPlatformWindows, HiDPI and input events”

The platform layer now keeps two sizes apart. The window size (WindowSize, the OpenTK ClientSize) is in screen coordinates; the framebuffer size (the new FramebufferSize, the OpenTK FramebufferSize) is in pixels. They are equal on an unscaled display and differ on a scaled display under Wayland and on macOS. Everything that allocates or binds GL surfaces now uses the framebuffer size: SetupDefaultFrameBuffers(), LoadFrameBuffer(EnumFrameBuffer) (the default framebuffer and the blur and god-ray viewports), UnloadFrameBuffer(EnumFrameBuffer), RenderPostprocessingEffects(float[]) (all viewports, and its width/height locals), RenderFinalComposition() (invFrameSizeIn), BlitPrimaryToDefault(), SaveScreenshot(...), GrabScreenshot(...) and Vintagestory.ClientNative.Screenshot.GrabScreenshot. The call count is the same in most of these methods, but the property read is different (get_FramebufferSize instead of get_ClientSize), so a transpiler that matched the old getter finds nothing.

  • ClientPlatformAbstract.FramebufferSize is a new abstract Size2i property; a custom platform subclass must implement it.
  • IRenderAPI.FrameWidth and FrameHeight (RenderAPIBase) now return the framebuffer size; the new WindowWidth and WindowHeight return the window size. RenderAPIBase.PushScissor and PopScissor use the framebuffer height.
  • The OpenTK FramebufferResize event is wired to a new private onFramebufferResize, which schedules the same delayed resize as a window resize. Window_Resize() now rebuilds the framebuffers when the framebuffer size changes (it compared the client size), stores both sizes, then calls the new public UpdateDpiScale() and, if the scale changed, fires the guiScale settings watcher.
  • UpdateDpiScale() sets RuntimeEnv.DPIHScale and DPIVScale from the current monitor’s scale, or under Wayland from framebuffer size ÷ client size. RuntimeEnv.GUIScale is now the guiScale setting times DPIHScale (set by the ScreenManager settings watcher and the MainMenuAPI constructor). Divide pixel sizes by RuntimeEnv.GUIScale, not by ClientSettings.GUIScale, or GUI built on a scaled display comes out the wrong size.
  • SetMousePosition(float, float) (private) multiplies mouse coordinates by DPIHScale/DPIVScale on macOS and under Wayland, so mouse positions are in framebuffer pixels there. The old macOS fix, adding ClientSettings.WeirdMacOSMouseYOffset, is gone along with the setting.
  • LoadMouseCursor(string, int, int, BitmapRef) scales the cursor image, and now its hot spot, by DPIHScale (not on macOS); it used ClientSettings.GUIScale.
// ClientPlatformWindows.Window_Resize(), 1.22.7
else if (window.ClientSize.X != windowsize.Width || window.ClientSize.Y != windowsize.Height)
{
RebuildFrameBuffers();
// 1.23.0-pre.1
else if (window.FramebufferSize.X != framebuffersize.Width || window.FramebufferSize.Y != framebuffersize.Height)
{
RebuildFrameBuffers();
...
UpdateDpiScale();
Member (1.22.7) 1.23.0-pre.1 What to do
- ClientPlatformAbstract.FramebufferSize (public abstract), ClientPlatformWindows.FramebufferSize, private framebuffersize Implement in custom platforms; read it for any GL size
RenderAPIBase.FrameWidth, FrameHeight (window size) framebuffer size; new WindowWidth, WindowHeight Mods that converted FrameWidth to pixels themselves now double-scale
ClientPlatformWindows.Window_Resize() (private) compares framebuffer size; calls UpdateDpiScale() Re-anchor transpilers
- ClientPlatformWindows.UpdateDpiScale() (public), onFramebufferResize(FramebufferResizeEventArgs) (private) Call UpdateDpiScale() after moving the window yourself
SetupDefaultFrameBuffers(), LoadFrameBuffer, UnloadFrameBuffer, RenderPostprocessingEffects, RenderFinalComposition, BlitPrimaryToDefault, SaveScreenshot, GrabScreenshot, Screenshot.GrabScreenshot window.FramebufferSize instead of window.ClientSize Re-anchor transpilers on the getter
SetMousePosition(float, float) (private) DPI-scaled on macOS and Wayland Mouse coordinates may be pixels, not window units
LoadMouseCursor(...) scaled by DPIHScale, hot spot too None
ClientSettings.WeirdMacOSMouseYOffset (public static) removed Drop

LogAndTestHardwareInfosStage2() now calls a new private DetectOpenGlCapabilities(), which reads the GL version and the extension list once and sets three private flags. If ClientSettings.AllowSSBOs is on but the driver lacks vertex shader storage blocks, at least four storage-buffer bindings, or a storage block large enough for ModelDataPoolMaxVertexSize * 16 bytes, it logs a warning and sets AllowSSBOs = false. A missing required extension now throws a plain Exception whose message starts with troubleshooting advice (was NotSupportedException). With the settings migration turning allowSSBOs back on for everyone (see Client settings), most players now run the SSBO terrain path.

  • supportsPersistentMapping (private) is renamed supportsBufferStorage, and is now also true on OpenGL 4.4 and later without the extension. New private supportsSSBOs and maxShaderStorageBlockSize.
  • AllocateEmptySSBOMesh(...) now throws NotSupportedException when SSBOs are unsupported and ArgumentOutOfRangeException when the requested position buffer exceeds the driver’s limit. It falls back to BufferData when buffer storage is unavailable, and it always (re)creates the shared index buffer when ClientPlatformAbstract.singleIndexBufferId is 0 (previously only when the size grew).
  • VAO gained OwnsIndexBuffer (default true; false for SSBO meshes) and an IndexBufferId property that returns the current shared index buffer for meshes that do not own theirs. The three RenderMesh overloads and RenderMeshInstanced bind vao.IndexBufferId instead of vao.vboIdIndex; VAO.Dispose deletes the index buffer only when OwnsIndexBuffer. ClientPlatformAbstract.DisposeIndexBuffer() now also resets singleIndexBufferSize.
  • UpdateSSBOMesh(MeshRef, MeshData) clamps out-of-range UVs to the valid range instead of zeroing them.
  • GlClearDepthBuffer() is new on ClientPlatformAbstract (abstract), ClientPlatformWindows and RenderAPIBase (it backs depth-tested GUI; see the API chapter).
  • UpdateSoundDevices() (public) is new; the sound engine calls it when the audio device changes (see Sound).
  • The GL debug callback appends the managed stack trace to the exception it throws on a GL error.
Member (1.22.7) 1.23.0-pre.1 What to do
ClientPlatformWindows.supportsPersistentMapping (private) supportsBufferStorage; new supportsSSBOs, maxShaderStorageBlockSize Update reflection names
- DetectOpenGlCapabilities() (private, returns the extension set) Patch here to change capability detection
AllocateEmptySSBOMesh(...) can throw NotSupportedException or ArgumentOutOfRangeException Check ClientSettings.AllowSSBOs / UseSSBOs before calling it yourself
VAO.vboIdIndex bound in RenderMesh* VAO.IndexBufferId; new VAO.OwnsIndexBuffer Bind IndexBufferId in your own draw code
LogAndTestHardwareInfosStage2() can switch AllowSSBOs off; different exception type Re-anchor transpilers
- GlClearDepthBuffer() on ClientPlatformAbstract (abstract), ClientPlatformWindows, RenderAPIBase Custom platforms must implement it
  • GlGenerateTex2DMipmaps() saves the bound texture’s GL_TEXTURE_BASE_LEVEL, sets it to 0, generates mipmaps and restores it. BuildMipMaps(int) now calls it instead of GL.GenerateMipmap, and then sets the base level to 2 when RuntimeEnv.RetroMode is on, 0 otherwise. Every texture whose mipmaps are built through BuildMipMaps (the atlases) is affected.
  • LoadOrUpdateCairoTexture(ImageSurface, bool, ref LoadedTexture) clamps the uploaded size to GlGetMaxTextureSize() and logs an error instead of failing on an oversized GUI surface. A texture taller or wider than the limit is cropped.

Mouse_WheelChanged was rewritten. The fields of the API’s MouseWheelEventArgs that every handler receives changed meaning (the type itself is in the API chapter):

Field 1.22.7 1.23.0-pre.1
delta (int) vertical offset × sensitivity, clamped to ±1 on macOS (int) vertical offset × sensitivity, no macOS clamp
deltaPrecise same value as delta (truncated) the unrounded float
value running sum of deltas (prevWheelValue) (int) milliseconds since start (EllapsedMs)
valuePrecise running sum of deltas milliseconds since start
DeltaX, DeltaY - horizontal and vertical offset × sensitivity
DeltaXInt, DeltaYInt - whole steps accumulated over a burst; the remainder carries to the next event
IsFresh - true when more than 17 ms passed since the previous wheel event

A handler that used value as a scroll position (zoom levels, list scrolling) now gets a timestamp. Use DeltaY or DeltaYInt and keep your own total. The private prevWheelValue field is gone; new private lastScrollMs, accumScrollDeltaX, accumScrollDeltaY and the constant freshScrollMs (17).

// ClientPlatformWindows.Mouse_WheelChanged(MouseWheelEventArgs), 1.23.0-pre.1
Vintagestory.API.Client.MouseWheelEventArgs e2 = new Vintagestory.API.Client.MouseWheelEventArgs
{
delta = (int)dy,
deltaPrecise = dy,
value = (int)EllapsedMs,
valuePrecise = EllapsedMs,
DeltaX = dx, DeltaY = dy,
DeltaXInt = (int)accumScrollDeltaX, DeltaYInt = (int)accumScrollDeltaY,
IsFresh = fresh
};

PickingRayUtil.GetPickingRayByMouseCoordinates(ClientMain) became GetPickingRayByMouseCoordinates(ClientMain game, int mouseX, int mouseY); it unprojects against WindowWidth/WindowHeight (window coordinates) instead of Width/ Height. The new IInputAPI.GetPickingRayFromMousePosition overloads (see Input) call it.

Transparency (OIT) and the transparent framebuffer

Section titled “Transparency (OIT) and the transparent framebuffer”

The order-independent transparency targets moved out of SystemRenderOITLayers and into the transparent framebuffer itself. In 1.22.7 BeforeOIT.rebuild() created a reveal texture and a three-layer accumulation array outside the framebuffer list and kept their ids in private statics. In 1.23 SetupDefaultFrameBuffers() creates them as part of FrameBuffers[1] (EnumFrameBuffer.Transparent):

FrameBuffers[1].ColorTextureIds[n] 1.22.7 1.23.0-pre.1
0 Rgba16f 2D (replaced at run time by the OIT reveal texture on attachment 0) Rgb8 2D, nearest, clamped: the OIT reveal target
1 R16f 2D unchanged
2 2D (glow) unchanged
3 - Rgba16f 2D array, 3 layers, on colour attachments 3, 4 and 5: the OIT accumulation

ColorTextureIds has four entries, so code that iterated it or assumed three breaks. The shader side of the OIT rewrite is in the shaders chapter.

// SystemRenderOITLayers.AfterOIT.OnRenderFrame(float, EnumRenderStage), 1.22.7
GL.BindTexture(TextureTarget.Texture2D, revealTextureId);
GL.ActiveTexture(TextureUnit.Texture7);
GL.BindTexture(TextureTarget.Texture2DArray, accumTextureId);
// 1.23.0-pre.1
FrameBufferRef transparentfb = capi.Render.FrameBuffers[1];
GL.BindTexture(TextureTarget.Texture2D, transparentfb.ColorTextureIds[0]);
GL.ActiveTexture(TextureUnit.Texture7);
GL.BindTexture(TextureTarget.Texture2DArray, transparentfb.ColorTextureIds[3]);

SetupDefaultFrameBuffers() also gained a local before the liquid-depth framebuffer (index 5), whose size is now fullWidth / liquidResolutionDiv:

// ClientPlatformWindows.SetupDefaultFrameBuffers(), 1.23.0-pre.1
int liquidResolutionDiv = (ClientSettings.LiquidDepthFullResolution ? 1 : 4);

Every local declared after it moves up one slot (the shadow-map width and height locals included), so a transpiler that loads or stores locals by index in this method breaks.

Member (1.22.7) 1.23.0-pre.1 What to do
SystemRenderOITLayers.accumTextureId, revealTextureId (private static), layers (private const) removed Read FrameBuffers[1].ColorTextureIds[3] and [0]
SystemRenderOITLayers.BeforeOIT.transparentfb, rebuild(), freeResources() removed; Dispose() does nothing Drop patches; the framebuffer owns the textures
SystemRenderOITLayers.AfterOIT() AfterOIT(ICoreClientAPI capi), new private capi Re-target constructor patches
FrameBuffers[1].ColorTextureIds (3 entries, index 0 Rgba16f) 4 entries; index 0 Rgb8 Do not assume three textures or a float reveal target
FrameBuffers[5] (liquid depth) at quarter resolution full resolution unless liquidDepthFullResolution is off Do not assume a quarter-size liquid depth
Renderer 1.22.7 1.23.0-pre.1
SystemSelectedBlockOutline ("sbo", order 0.9) AfterFinalComposition AfterOIT
SystemRenderDebugWireframes ("debwf", order 0.5) Opaque AfterOIT
SystemPlayerSounds wireframe ("playersoundswireframe", order 0.9) Opaque AfterOIT
PlayerCamera.OnBeforeRenderFrame3D ("camera", stage Before) order 0.0 order 0.03

A renderer that ran after the selection outline at AfterFinalComposition to draw over it, or that expected the outline drawn after post-processing, now sees it earlier in the frame, before bloom and the final composition. A Before-stage renderer registered with an order between 0 and 0.03 now runs before the camera updates.

SystemSelectedBlockOutline also draws rotated selection boxes: a box that is a RotatedCuboidf with IsRotated() true goes through a new private selectionMatrix and the API’s WireframeCube.Render(ICoreClientAPI, Matrixf, float, int) overload (see the API chapter); other boxes keep the old call.

SystemRenderDebugWireframes has a new collider view (wfmodes.Colliders, toggled by .debug wireframe colliders), drawn by a new private renderColliders(int) from the collision scene within 32 blocks of the player. Its block-entity view iterates the chunk’s Dictionary<int, BlockEntity> and rebuilds positions with FastBlockPos.FromIndex3d (see “Block accessors, the world map and chunk data”).

ChunkRenderer.RenderOpaque(float) and SystemRenderEntities.OnRenderOpaque3D(float) read the new ClientSettings.RetroMode into a new local, doBlend, and pass it to every GlToggleBlend call they make. With retro mode on, opaque chunks and entities draw without blending, and the entity alpha test rises from 0.05 to 0.4. Each method gained a local and changed its GlToggleBlend(true) constants into local loads, so transpilers on them break.

SystemRenderAim.OnRenderFrame2DOverlay(float) sizes the crosshair by RuntimeEnv.DPIHScale (was a fixed 32 px) and no longer switches to the hostile crosshair by distance when the world config obbCombat is true. A new private DrawAttackAimIndicator(ItemStack, bool) draws arrows for the held item’s attack direction (EntityPlayer.GetHeldTpHitAimIndicator, see the API chapter) with four textures generated in the constructor by GenerateAttackAimArrowTexture(...) and drawn with Render2DTexturePremultipliedAlpha. Dispose frees them.

RenderAPIBase and RenderAPIGame implement the new IRenderAPI members (see the API chapter): MainCamera (the PlayerCamera, which now implements ICameraAPI), AllowCameraControl, CreateAviWriter, GetAvailableCodecs, GlClearDepthBuffer, RenderWireframeSphere, WindowWidth and WindowHeight. In RenderAPIBase the virtual MainCamera, AllowCameraControl and RenderWireframeSphere throw NotImplementedException, so they work in game but not in the main menu. Note that in 1.23.0-pre.1 RenderAPIGame.AllowCameraControl reads and writes ClientMain.AllowCharacterControl, not ClientMain.AllowCameraControl. RenderAPIGame.CameraOffset is [Obsolete("Use MainCamera.CameraOffset instead")]. RenderAPIGame.RenderLine now ends in a new private RenderMesh(BlockPos, MeshData), which RenderWireframeSphere shares.

Member (1.22.7) 1.23.0-pre.1 What to do
Camera.Fov (public field) public property over a new protected field fov; the setter also sets ZNear Recompile (field access fails with MissingFieldException); set Fov and then ZNear if you need your own near plane
ClientMain.OnFowChanged setting ZNear moved into the Fov setter Patches that adjusted the near plane after OnFowChanged must run after any Fov assignment
PlayerCamera : Camera PlayerCamera : Camera, ICameraAPI (explicit deltaSum, CameraShakeStrength, UpdateCameraPos, CameraOffset) Reach it through capi.Render.MainCamera
PlayerCamera renderer order 0.0 in Before 0.03 See the stage table above
Camera.LimitThirdPersonCameraToWalls(...) the two side probes shift only the eye, by 0.15 at yaw ± 90°, and aim at the unshifted target (1.22.7 shifted eye and target by ±0.15 along the yaw) Third-person camera distance near walls differs
Camera.GetIntersectionDistance(...) (private) ray length Tppcameradistance + 1 (was TppCameraDistanceMax) -
Vintagestory.Client.NoObf.SystemCinematicCamera, CameraPoint, CameraKeyframe, EnumAutoCamAngleMode removed from the engine Use Vintagestory.GameContent.SystemCinematicCamera and CameraPoint in VSEssentials (base game mods chapter)
RenderAPIGame.CameraOffset [Obsolete] Use MainCamera.CameraOffset
// Camera.Fov setter, 1.23.0-pre.1
set
{
fov = value;
ZNear = GameMath.Clamp(0.1f - value * (180f / (float)Math.PI) / 90f / 25f, 0.025f, 0.1f);
}

The near plane formula is the one OnFowChanged used in 1.22.7 (0.1 minus the field of view in degrees ÷ 2250, clamped to 0.025 to 0.1), but it now runs on every assignment to Fov, including assignments by mods and by the cinematic camera.

Each chunk tesselation now carries the number of the tesselation request it came from, so a slow, older result can no longer replace a newer one that was uploaded first. ChunkTesselatorManager.TesselateChunk(...) stamps centerTesselationId (the chunk’s quantityDrawn, or 0 when the centre was skipped) and edgeTesselationId on the new TesselatedChunk. TesselatedChunk.AddCenterToPools and AddEdgeToPools dispose the parts and return false when the id is older than the chunk’s new uploadedCenterTesselationId / uploadedEdgeTesselationId, and record the id after a successful upload. MergeIfEqual carries the ids over with the parts and now merges the two bounding spheres instead of keeping the first.

The retesselation listeners (IClientWorldAccessor “run this when the chunk has been redrawn” callbacks) are fired against the id of the upload that just completed, not against the chunk’s request counter:

// ClientEventManager, 1.23.0-pre.1
public void TriggerChunkRetesselated(Vec3i chunkPos, ClientChunk chunk)
{
TriggerChunkRetesselated(chunkPos, chunk.uploadedCenterTesselationId);
}
public void TriggerChunkRetesselated(Vec3i chunkPos, int completedTesselationId)
{
...
if (listener.AtDrawCount < completedTesselationId) // 1.22.7: < chunk.quantityDrawn

ChunkTesselatorManager.OnBeforeFrame calls the int overload with tesschunk.centerTesselationId in both its upload paths. A name-only patch on TriggerChunkRetesselated is now ambiguous, and a patch on the (Vec3i, ClientChunk) overload no longer sees the engine’s calls.

Member (1.22.7) 1.23.0-pre.1 What to do
ClientEventManager.TriggerChunkRetesselated(Vec3i, ClientChunk) (public) forwards to new TriggerChunkRetesselated(Vec3i, int completedTesselationId) Patch the int overload, with argument types
- TesselatedChunk.centerTesselationId, edgeTesselationId; ClientChunk.uploadedCenterTesselationId, uploadedEdgeTesselationId (internal) Read these to tell old results from new
TesselatedChunk.AddCenterToPools(...), AddEdgeToPools(...) return false and dispose a stale result A postfix must check the result
TesselatedChunk.MergeIfEqual(TesselatedChunk) copies the ids; merges bounding spheres Re-anchor transpilers
ChunkTesselatorManager.TesselateChunk(...), OnBeforeFrame(float) ids in the initialiser; int overload call Re-anchor transpilers

ClientChunk follows the new WorldChunk.BlockEntities (Dictionary<int, BlockEntity>, keyed by in-chunk index; see “Block accessors, the world map and chunk data”). PreLoadBlockEntitiesFromPacket returns early for an empty packet, creates the dictionary on demand and stores by Pos.ToIndex3d(); InitBlockEntitiesFromPacket and the block-entity update path tolerate a null dictionary. The internal BlockEntitiesCount field is gone. TCTCache.blockEntitiesOfChunk is a Dictionary<int, BlockEntity>, and ChunkTesselatorManager fills it from the chunk’s blockEntities field (it may be null). BleedingJsonTesselator.Tesselate looks block entities up by pos.ToIndex3d(). Block entity data is read with BinarySpanReader and TreeAttribute.FromBytes(ref BinarySpanReader) (see the API chapter), so the MemoryStream/BinaryReader locals and their using blocks are gone from these methods.

Member (1.22.7) 1.23.0-pre.1 What to do
ClientChunk.BlockEntitiesCount (internal) removed Count blockEntities yourself (null means none)
TCTCache.blockEntitiesOfChunk (Dictionary<BlockPos, BlockEntity>) Dictionary<int, BlockEntity>, may be null Look up with pos.ToIndex3d()
ClientChunk.PreLoadBlockEntitiesFromPacket(...) (internal) span reader; early return on zero Re-anchor transpilers
ClientWorldMap.GetChunk(BlockPos), GetBlockEntity(BlockPos), GetClientChunkAtBlockPos(BlockPos) FastBlockPos overloads added beside them Patch with argument types; the engine calls the FastBlockPos forms in some places

JsonTesselator.AddJsonModelDataToMesh(MeshData, int, TCTCache, IMeshPoolSupplier, float[], IJsonTesselatorHooks, int), the method that writes every JSON-shaped block face into the chunk mesh pools, was rewritten as a two-pass pipeline built on new private structs (PreparedGeometry, FaceGeometry, FaceSurface, FaceLighting, PreparedUvMapping, PoolRequest, PreparedMeshFace, MeshWriter, DecorFaceData, and enums EnumMaterialType, EnumUvSource). It now prepares wind flags (PrepareWindFlags), checks face topology (ValidateFaceTopology), resolves geometry once (ResolveMeshGeometry), and for each face computes geometry (GetFaceGeometry), culls (IsFaceCulled) and resolves the texture and pool (TryPrepareFaceSurface, MeshWriter.TrySelectPool). Only then does it write all faces (PrepareFaceLighting, MeshWriter.AppendFace). Both public signatures are unchanged, but there is nothing left inside for an old transpiler to anchor on: rewrite it against the new private methods, or move the patch to a prefix or postfix.

One behaviour change is visible to mods. When a face’s texture has no atlas pool yet, 1.22.7 threw a RetryTesselationException and the chunk was tesselated again later. 1.23 logs a warning (“Skipping mesh for block … texture ID … has no atlas pool”) and returns without writing any face of that block; the chunk is not retried for it. A block that adds textures to the block atlas late (after the atlas pages exist) can now be missing from the chunk until something else retesselates it (inferred from the code path).

The decor helpers became private: CalcAutoUVsForDecor, ApplyDecorUVs, FindDecorMaxPos and SkipDecorFace (all public in 1.22.7) are gone, replaced by private TryPrepareDecorFace, WriteDecorUVs and AdvanceDecorOffset. The private fields decorFace, decorVertexOffset, decoru1, decoru2, decorv1, decorv2, decorSeamAdjustX1 to decorSeamAdjustZ2 and tmpCoords are gone. BleedingJsonTesselator.TryGetCustomTexture(...) renamed its out parameter from result to cTexResult (it matters to Harmony __result-style or named parameter injection). Whether the rewrite produces byte-identical meshes was not checked.

Member (1.22.7) 1.23.0-pre.1 What to do
JsonTesselator.AddJsonModelDataToMesh(..., IJsonTesselatorHooks, int) body two-pass rewrite Rewrite transpilers; prefer prefixes and postfixes
JsonTesselator.CalcAutoUVsForDecor(...), ApplyDecorUVs(...), FindDecorMaxPos(...), SkipDecorFace(...) (public) removed; private TryPrepareDecorFace, WriteDecorUVs, AdvanceDecorOffset Patch the private replacements
missing atlas pool: throw new RetryTesselationException(...) warning, block skipped Make sure your textures are in the atlas before the chunk is tesselated
BleedingJsonTesselator.TryGetCustomTexture(..., out CustomTextureResult result) out CustomTextureResult cTexResult Rename the injected parameter

ShapeTesselator and ShapeTesselatorManager: animated held items

Section titled “ShapeTesselator and ShapeTesselatorManager: animated held items”

Held items can now be animated in third person (the bow is the base game’s example). InventoryItemRenderer.GetItemStackRenderInfo fills the new ItemRenderInfo.AnimationModelRef, AnimationShape and AnimationModelVariant (see the API chapter) for EnumItemRenderTarget.HandTp and HandTpOff when no collectible replaced the model in OnBeforeRender. The model comes from three new public methods on ShapeTesselatorManager:

Method What it does
GetAnimationModelInfo(ItemStack, int variant, out MultiTextureMeshRef, out Shape) returns the cached animation mesh (may be null) and the shape, without tesselating
GetAnimationModel(ItemStack, int variant, out MultiTextureMeshRef, out Shape) tesselates and uploads the animation mesh on first use, with joint ids, through the new internal ShapeTesselator.TesselateBlockForAnimation / TesselateItemForAnimation
GetAnimationCodes(ItemStack, int variant) lists the shape’s animation codes, loading and unloading the shape if needed

Only shapes in the Vintage Story format with animations, and not voxelised, get an animation model. The meshes live in new private arrays (blockAnimationModelRefsInventory, itemAnimationModelRefsInventory, altItemAnimationModelRefsInventory) that are disposed with the others. The inventory tint loop moved into a new private ApplyInventoryTint(Block, MeshData).

ShapeTesselator.TesselateShape(string, AssetLocation, CompositeShape, out MeshData, ...), TesselateBlock and TesselateItem now forward to private overloads with a withAnimations flag. Two behaviour changes apply to every caller: overlay shapes of a CompositeShape (Overlays) are loaded on demand and unloaded again after use (1.22.7 assumed they were loaded), and an element mesh without custom floats now has CustomFloats = null set explicitly. ShapeTesselatorManager.CreateMesh(string, CompositeShape, TextureSourceBuilder, ITexPositionSource) now honours the composite shape’s QuantityElements and SelectiveElements. UnloadableShape.Load makes sure AnimationsByCrc32 and JointsById exist and validates UV bounds when RuntimeEnv.DebugOversizedUVs is set.

Member (1.22.7) 1.23.0-pre.1 What to do
ShapeTesselator.TesselateShape(string, AssetLocation, CompositeShape, out MeshData, ITexPositionSource, int, byte, byte, int?, string[]) forwards to a private overload with bool withAnimations Patch the private overload to see every call; name-only patches are ambiguous
ShapeTesselator.TesselateBlock(Block, CompositeShape, out MeshData, TextureSource, int?, string[]), TesselateItem(Item, CompositeShape, out MeshData) forward to private overloads; new internal TesselateBlockForAnimation, TesselateItemForAnimation As above
- ShapeTesselatorManager.GetAnimationModel, GetAnimationModelInfo, GetAnimationCodes (public) Use to render held-item animations in your own renderer
ShapeTesselatorManager.CreateMesh(...) passes QuantityElements, SelectiveElements Shapes that set them now render partially, as configured

TextureAtlasManager (the base of the block, item and entity atlas managers) can now free a texture while the game runs and reuse its space. A texture inserted with one of the new InsertTextureOrAddReference overloads gets a reference count in a new textureReferenceCounts dictionary; ReleaseTextureReference(AssetLocation) decrements it and calls FreeTextureSpace at zero. Fetching the same texture through a plain GetOrInsertTexture makes it permanent (the count is removed). The base game mods use it for per-entity blended textures in the entity atlas (VSEssentials’ BehaviorGenetics) and for mechanical power material variants in the block atlas (see the base game mods chapter).

Consequences for mods that read atlases:

  • A sub-id is never reused (the counter only grows), but a freed sub-id keeps its stale entry in TextureAtlasPositionsByTextureSubId, its name leaves the names dictionary, and its rectangle can come back under a new sub-id. Code that walks TextureAtlasPositionsByTextureSubId must skip positions whose sub-id has no name, or it will see two entries over the same pixels (inferred from the code path).
  • The patch funnel moved. In 1.22.7 GetOrInsertTexture(AssetLocation, ...) called GetOrInsertTexture(AssetLocationAndSource, ...), so one patch saw every insert. In 1.23 both public overloads and both InsertTextureOrAddReference overloads call a new private GetOrInsertTextureInternal(AssetLocationAndSource, out int, out TextureAtlasPosition, CreateTextureDelegate, float, bool addReference). Patch that to see every insert.
  • The first parameter of GetOrInsertTexture(AssetLocationAndSource, ...) was renamed from loc to path.
  • GetOrInsertTexture(CompositeTexture, ...) now passes the AssetLocationAndSource (with its source) rather than the bare baked name.
  • The array growth in AllocateTextureSpace locks a new private TextureAtlasPositionsByTextureSubId_ResizeLock instead of the array, writes the new position before publishing the new array, and grows to subId + 128 with a warning for a sub-id far past the end. RegenMipMaps(int) logs a warning instead of throwing for a missing atlas number. ReloadTextures() and Dispose() release the cached overlay bitmaps (FinishedOverlays()).
Member (1.22.7) 1.23.0-pre.1 What to do
TextureAtlasManager.GetOrInsertTexture(AssetLocationAndSource loc, ...) (public; the funnel) GetOrInsertTexture(AssetLocationAndSource path, ...), a forwarder Patch private GetOrInsertTextureInternal(...) instead
- InsertTextureOrAddReference(AssetLocation, ...), (AssetLocationAndSource, ...), (CompositeTexture, ...); ReleaseTextureReference(AssetLocation) (public) Use for textures you add and remove at run time (see the API chapter)
FreeTextureSpace(AssetLocationAndSource) also drops the reference count -
lock (TextureAtlasPositionsByTextureSubId) lock (TextureAtlasPositionsByTextureSubId_ResizeLock) Code that locked the array to read it safely must take the new lock (reflection)
TextureAtlasManager.getAlpha(AssetLocationAndSource) also getAlpha(string); reads the last å marker -

Composite textures: overlays with offsets and per-layer alpha

Section titled “Composite textures: overlays with offsets and per-layer alpha”

TextureAtlasManager.LoadCompositeBitmap(ClientMain, AssetLocationAndSource, Dictionary<AssetLocation, BitmapRef>) parses the new composite-name format. The number before ~ in each ++ part is now unpacked with the API’s BlendedOverlayTexture.UnpackBlendingToTuple, giving a blend mode, an X and Y offset and the index of the layer it applies to; each overlay can carry its own alpha after å, multiplied with the base alpha. Overlays no longer have to match the base size: they are blended at their offset into the layer they apply to, in reverse order, by a new private static ApplyOverlays(...). An overlay that applies to a later layer stops the chain with a warning. The name format itself is defined by CompositeTexture in the API (see the API chapter). Code that builds or parses baked texture names by hand must follow it.

Texture bleeding: corner overlays and variants

Section titled “Texture bleeding: corner overlays and variants”

Texture bleeding (blocks whose top texture bleeds into neighbours) gained corner overlays and per-position variants. ClientMain.BleedOverlayTextureSubIdsByBlockId changed from int[] (one sub-id per block) to int[][] (one array of variant sub-ids per block), and the new BleedCornerOverlayTextureSubIdsByBlockId holds the corner overlays. BlockTextureAtlasManager fills both through a new private ResolveBleedOverlaySubIds(CompositeTexture, ...), taking every baked variant of the block’s BleedOverlayTexture and new BleedCornerOverlayTexture (see the API chapter).

TextureBleedHelper.GetBleedDirections(...) gained int[][] cornerOverlayTextureSubIdsByBlockId, posX, posY and posZ parameters (its overlay array is now int[][]), picks a variant per position with GameMath.MurmurHash3, drops a diagonal bleed that repeats a cardinal one (SuppressRedundantDiagonals), and sets a corner overlay when both adjacent edges bleed with the same corner texture. BleedDirections gained CornerOverlayTextureSubIds. BlendedTextureManager composes the corners on the GPU along with the edges; its cache key includes them.

Member (1.22.7) 1.23.0-pre.1 What to do
ClientMain.BleedOverlayTextureSubIdsByBlockId (int[]) int[][] Index [blockId] gives an array of variants or null
- ClientMain.BleedCornerOverlayTextureSubIdsByBlockId (int[][]) -
TextureBleedHelper.GetBleedDirections(Block[], int, int, Block, int[][], int[] = null) (public static) GetBleedDirections(Block[], int, int, Block, int[][], int[][] = null, int[][] = null, int posX = 0, int posY = 0, int posZ = 0) Re-target; pass the position for stable variants
BlendedTextureManager.BuildCacheKey(...), GetOrCreateBlendedTexture(...) (public) gained int[] cornerOverlaySubIds before the atlas manager / rotation Re-target
BlendedTextureManager.HasAnyOverlayBlend, CollectActiveOverlayBlends, ComposeOnGPU (private) gained corner and suppression parameters; new CollectActiveCorners, ComputeSuppressedDirections Re-target

Block decals (breaking cracks and the like) used one mesh pool drawn with the first block atlas page. They now keep one pool per block atlas texture, so decals on blocks whose textures sit on a second atlas page are drawn with the right texture. UpdateDecal copies the block mesh’s texture ids into the decal mesh, splits it with MeshData.SplitByTextureId(), and adds each part to the pool for that texture; the renderer loops over the pools and sets BlockTexture2D per pool. A decal whose mesh has a different UV count from the block mesh is now skipped, and the block’s own UVs are always written into the custom floats (the length check is gone).

Member (1.22.7) 1.23.0-pre.1 What to do
BlockDecal.PoolLocation (ModelDataPoolLocation, internal type) PoolLocations (Dictionary<int, ModelDataPoolLocation>, keyed by atlas texture id) Update reflection
SystemRenderDecals.decalPool (protected MeshDataPool) decalPoolByBlockAtlasId (protected Dictionary<int, MeshDataPool>) Subclasses and reflection must handle several pools
- SystemRenderDecals.GenPool(), removePoolLocations(...) (private) -
SystemRenderDecals.OnRenderFrame3D draw block early return; one draw per pool Re-anchor transpilers
SystemRenderDecals.UpdateAllDecals() removes every decal’s pool locations first, then rebuilds -

Shaders: ShaderRegistry and ShaderProgramBase

Section titled “Shaders: ShaderRegistry and ShaderProgramBase”
  • Registration moved out of the static constructor. In 1.22.7 the first touch of ShaderRegistry ran a static constructor that created the default ShaderProgram objects (registerDefaultShaderProgramsPre) and assigned the ShaderPrograms.* statics. In 1.23 the static fields use initialisers and ShaderRegistry.Load() does the registration, so ShaderPrograms.Standard and the rest stay null until ScreenManager calls Load() during start-up stage 2. A static constructor or early patch that read them now gets null.
  • MINBRIGHT is written into shader prefixes with CultureInfo.InvariantCulture, so systems with a decimal comma no longer get a broken #define.
  • ShaderProgramBase.BindTexture2DArray(string samplerName, int textureId, int textureNumber) is new (it also implements the new IShaderProgram member; see the API chapter), and ShaderProgram’s uniform scan now recognises sampler2DArray uniforms. ShaderProgramBase.Dispose() now disposes the program’s UBOs and clears the dictionary.
  • ShaderProgramStandard.ApplyTexture is a new write-only property for the applyTexture uniform (see the shaders chapter).
  • loadRegisteredShaderPrograms reads the asset manager into a local; ReloadShaders() is unchanged.
Member (1.22.7) 1.23.0-pre.1 What to do
static ShaderRegistry() (registers default programs, sets nextPassId) removed; ShaderRegistry.Load() does it Do not read ShaderPrograms.* before start-up stage 2
- ShaderProgramBase.BindTexture2DArray(string, int, int) Use for array samplers
ShaderProgramBase.Dispose() also disposes UBOs Do not keep a program’s UBORef after disposing the program
- ShaderProgramStandard.ApplyTexture (set only) -
  • Attribute packets for entities not loaded yet are queued. ClientSystemEntities used to drop Packet_EntityAttributes and Packet_EntityAttributeUpdate for an entity id it did not know. They now go through a new private ApplyOrQueueAttributes(long, Action<Entity>): unknown entities get a queue in pendingAttributes, applied in order by ApplyPendingAttributes when the entity spawns or loads, retried every tick by RetryPendingAttributes() (called from OnGameTick before the entity loop) and dropped after 60 seconds or on despawn. Watched-attribute listeners can therefore fire on spawn for updates that arrived before it.
  • Despawn packets run on the main thread. HandleEntityDespawnPacket wraps its loop in game.EnqueueMainThreadTask(..., "despawnentities"), so the despawn, renderer removal and OnEntityDespawn happen later in the frame than the packet. The despawn goes through GameMain.OnEntityDespawn(entity, reason) (which calls Entity.OnEntityDespawn and unregisters the entity’s colliders), here, in OnEntityDespawn and in SystemUnloadChunks.
  • Entity packets call both overloads. HandleEntityPacket calls Entity.OnReceivedServerPacket(int, SerializedData) and then OnReceivedServerPacket(int, byte[]); block-entity packets do the same (see Networking). Override one of them only (see the API chapter).
  • Span readers. Entity full updates, debug attributes and block entity data are read with BinarySpanReader (Entity.FromBytes(ref BinarySpanReader, bool), see the API chapter). UpdateBlockEntityData(BlockEntity, SerializedData, ClientMain, bool) takes SerializedData instead of byte[].
  • Animation packets wait for their entity: see “Packet handling on the client”.
  • Particles. ParticlePoolQuads.SpawnParticles(...) no longer skips particles whose GetRgbaColor returns 0 (1.22.7 skipped them and reduced the quantity by 0.5); they are now spawned. The loop became a for with early breaks, so transpilers on it break.
Member (1.22.7) 1.23.0-pre.1 What to do
ClientSystemEntities.UpdateBlockEntityData(BlockEntity, byte[], ClientMain, bool) (internal static) (BlockEntity, SerializedData, ClientMain, bool) Re-target patches
ClientSystemEntities.HandleEntityAttributesPacket, HandleEntityAttributeUpdatePacket (private) queue for unknown entities Patch ApplyOrQueueAttributes to see every update
- pendingAttributes, ApplyOrQueueAttributes, ApplyPendingAttributes, RetryPendingAttributes, Dispose(ClientMain) New
ClientSystemEntities.HandleEntityDespawnPacket (private) deferred to a main-thread task Postfixes run before the despawn happens
Entity.OnEntityDespawn called directly in ClientSystemEntities, SystemUnloadChunks GameMain.OnEntityDespawn(Entity, EntityDespawnData) Patch Entity.OnEntityDespawn or GameMain.OnEntityDespawn
ParticlePoolQuads.SpawnParticles(...) colour 0 no longer skipped Return a non-zero colour if you relied on skipping

HudHotbar follows the new hotbar slot numbering in PlayerInventoryManager (see Player inventories): the skill slot is active slot number -1, the off-hand -2, and backpack slots are 10 to 13 whether or not a skill item is present (in 1.22.7 the skill slot was 10 and backpack slots shifted by one when it was filled). OnActiveSlotChanged highlights GetHotbarSlotIndex(newSlot), moveToHotbarSlot wraps through -1 when a skill item is present, and OnRenderGUI draws the skill item and its highlight at a new skillSlotBounds beside the off-hand slot. The off-hand grid is now one slot wide and the hotbar grid is placed to its right. OnMouseWheel reads the new MouseWheelEventArgs.DeltaX/DeltaXInt/DeltaYInt (horizontal scrolling also moves the slot; see the API chapter) and no longer tracks prevValue. OnGameTick now refreshes the held-item interaction help whenever EntityPlayer.Controls.HandUse changes, and only clears it when no hand action is running. Held sounds come from CollectibleObject.GetHeldSounds(stack, null) instead of the HeldSounds field (see the API chapter). OnKeySlot only stops a hand action that is HeldItemAttack or HeldItemInteract, no longer a BlockInteract.

// HudHotbar.OnActiveSlotChanged(int, bool), 1.22.7
int skoffset = ((!hotbarInv[10].Empty) ? 1 : 0);
if (newSlot < 10 + skoffset)
{
hotbarSlotGrid.HighlightSlot(newSlot);
backpackGrid.HighlightSlot(-1);
}
// HudHotbar.OnActiveSlotChanged(int, bool), 1.23.0-pre.1
if (newSlot < 10)
{
hotbarSlotGrid.HighlightSlot(plr.InventoryManager.GetHotbarSlotIndex(newSlot));
backpackSlotGrid.RemoveSlotHighlight();
}
Member (1.22.7) 1.23.0-pre.1 What to do
HudHotbar.backpackGrid (private) backpackSlotGrid; new offHandSlotGrid Update reflection names
HudHotbar.prevValue (private) removed Drop
- previousHandUse (private EnumHandInteract), skillSlotBounds (private ElementBounds), updateHeldInteractionHelp(ItemSlot) (private) Hook updateHeldInteractionHelp for held-item help
HudHotbar.moveToHotbarSlot(int) (public) new wrap maths; skill slot is -1 Check any code that assumes slot 10 is the skill slot
HudHotbar.OnMouseWheel(MouseWheelEventArgs) uses DeltaX/DeltaYInt; no delta/value test Re-anchor transpilers
HudHotbar.RecomposeActiveSlotHoverText(int), OnRenderGUI(float), ComposeGuis(), KeyFlipHandSlots, OnKeySlot, updateHotbarSounds rewritten as above; ComposeGuis() registers a guiScale watcher each time it composes Re-anchor transpilers
Member (1.22.7) 1.23.0-pre.1 What to do
GuiManager.OnMouseDown(MouseEvent) stops and focuses only if the handling dialog is still in game.LoadedGuis A dialog that closes itself in OnMouseDown no longer stops the loop: later dialogs still get the event, with Handled already true (inferred)
GuiDialogInventory.OnGuiOpened() calls TryStopHandAction only for HeldItemAttack/HeldItemInteract Block interactions now survive opening the inventory
GuiDialogInventory.ComposeCreativeInvDialog() tab PaddingTop passed through GuiElement.scaled None
GuiDialogToolMode.OnKeyCombinationToggle(KeyCombination) (internal override) when CollectibleObject.IsToolModeToggle(...) is true, the key cycles to the next mode instead of opening the dialog, and key repeat is ignored via IInputAPI.PreviousKeyboardKeyState See the API chapter for IsToolModeToggle; re-anchor patches
HudMouseTools.CalculateSlotBounds(), RenderGUI(float) RuntimeEnv.GUIScale; tooltip shifted right by 20 * ClientSettings.GUIScale when it overlaps the bottom by more than 5 px None
HudDebugScreen.UpdateText(float) new DebugScreenInfo["memcomitted"] line (GC committed bytes) None
HudDebugScreen.DrawGraph(), updateFrameSlicesMesh(), GenFrameSlicesMesh() scaled by RuntimeEnv.DPIHScale; the vertical anchor changed from Height - historyheight - 40 to Height - (historyheight - 40) * scale (80 px lower at scale 1) Re-anchor transpilers
HudDialogChat: every use of ClientMain.currentGroupid ClientMain.CurrentGroupId (still a public field) Rename reflection and transpiler field references
HudDialogChat.onLinkClicked, onDataFolderLinkClicked (private) regex / EndsWith instead of Split("://"); Path.Join Re-anchor
DrawWorldInteractionUtil.DrawHotkey(HotKey, ...) (private) draws fixed labels CTRL/SHIFT (macOS Control/Shift) and now also ALT (macOS Option) None
GuiDialogTickProfiler.ticksToString (private) hides entries under 0.1 ms (was 0.2 ms) None
ClientCoreAPI.HideGuis (get) get and set; set writes !value to game.ShouldRender2DOverlays See the API chapter
ClientCoreAPI.Forms [Obsolete("Use PlatformUtils")]; new PlatformUtils, DeltaTimeLimiter (forwards to ClientMain.DeltaTimeLimiter) Use PlatformUtils in game (not in the main menu)
ClientCoreAPI.SendChatMessage(string, string) uses CurrentGroupId None

The API gained 3D models in GUI dialogs (Hud3DElement, Hud3DPanelScene, Hud3DRaycastElement, Hud3DFilterOverlaySet; see the API chapter). The engine’s side is small: the new IRenderAPI.GlClearDepthBuffer() (implemented by RenderAPIBase and the platform) lets a dialog clear depth before it draws its model, and a public sample, Vintagestory.Client.NoObf.Hud3DTest (a Hud3DRaycastElement), shows the base game’s sailed boat with its animations. .dev hud3dtest toggles it; clicking the model cycles the animations. Read it as a worked example of the API.

SystemMouseInWorldInteractions.HandleHandInteraction(float) (private) was restructured into early returns. For a held item it now stores the result of CollectibleObject.OnHeldUseStep in a local, then checks the new EntityPlayer.RequestedHandUseCancelReason (see the API chapter): if set, it clears it, calls TryStopHandAction(false, reason) and, if that succeeds, sends a cancel packet, sets a new ignoreMouseInteractionsUntilRelease flag and returns. UpdatePicking(float) then ignores the mouse until both buttons are released. A transpiler that matched OnHeldUseStep followed directly by set_HandUse no longer finds it.

// SystemMouseInWorldInteractions.HandleHandInteraction(float), 1.22.7
entityPlr.Controls.HandUse = slot.Itemstack.Collectible.OnHeldUseStep(secondsPassed, slot, game.EntityPlayer, game.BlockSelection, game.EntitySelection);
entityPlr.Controls.UsingCount++;
// SystemMouseInWorldInteractions.HandleHandInteraction(float), 1.23.0-pre.1
EnumHandInteract nextUseType = slot.Itemstack.Collectible.OnHeldUseStep(secondsPassed, slot, game.EntityPlayer, game.BlockSelection, game.EntitySelection);
entityPlr.Controls.UsingCount++;
EnumItemUseCancelReason? requestedHandUseCancelReason = entityPlr.RequestedHandUseCancelReason;
// ... TryStopHandAction, ignoreMouseInteractionsUntilRelease = true, return ...
entityPlr.Controls.HandUse = nextUseType;

Block selection changed too. UpdateCurrentSelection()’s block filter is now block == null || (notMeleeAttackFiltered(pos, block) && (renderMeta || notAHiddenMetaBlock(pos, block))): while EntityPlayer.IsPerformingMeleeAttack is true, blocks with no collision boxes, or with the block attribute meleeAttackPermeable: true, cannot be selected, so a swing passes through grass and similar blocks. The picking ray comes from PickingRayUtil.GetPickingRayByMouseCoordinates(game, MouseCurrentX, MouseCurrentY) (the platform-side signature change is under “Platform and window”). OnBlockPick (middle click) in creative now also checks selectedHotbarSlot.CanHold(new DummySlot(blockStack)).

Member (1.22.7) 1.23.0-pre.1 What to do
SystemMouseInWorldInteractions.HandleHandInteraction(float) (private) restructured; cancel request handling Re-anchor transpilers
SystemMouseInWorldInteractions.UpdatePicking(float) (internal) early return while ignoreMouseInteractionsUntilRelease and a button is down Prefixes still run first
UpdateCurrentSelection() block filter lambda (private) calls new private notMeleeAttackFiltered(BlockPos, Block) and notAHiddenMetaBlock(BlockPos, Block) Patch these named methods instead of the lambda
SystemMouseInWorldInteractions.OnBlockPick(BlockPos, Block) (private) extra CanHold check in creative None
- InputAPI.PreviousKeyboardKeyState (returns ClientMain.PreviousKeyboardState), GetPickingRayFromMousePosition(), GetPickingRayFromMousePosition(int, int) New API members (see the API chapter)
ClientPlayerInventoryManager.game (private field) gone: the class now uses a primary constructor, so the captured parameter is the compiler field <game>P, assigned before the base constructor call Update reflection; constructor transpilers see a different order
ClientPlayerInventoryManager.DropItem(ItemSlot, bool) uses the manager’s own player and player.Entity instead of game.player/game.EntityPlayer; stops only HeldItemAttack/HeldItemInteract; returns false if there is no ground inventory; ActiveHotbarSlot from the base Re-anchor transpilers
ClientPlayer: explicit IPlayer.IsInInteractionRangeOf(BlockPos, float) (private, [Obsolete]) public IsInInteractionRangeOf(FastBlockPos, float) See the API chapter
ClientPlayer.WarnIfEntityChanged(long, string) (internal) despawns the stale entity through game.OnEntityDespawn(oldEntity, reason) (which still calls Entity.OnEntityDespawn and also unregisters its colliders) Transpilers matching callvirt Entity.OnEntityDespawn here break
ClientWorldPlayerData.UpdateFromPacket(ClientMain, Packet_PlayerMode) also updates when mode.ViewDistance != LastApprovedViewDistance, not only when it differs from ClientSettings.ViewDistance LastApprovedViewDistance now tracks every server approval
SystemHotkeys.KeyToggleFly, KeyCycleFlyModes (private) no ClientMain.AllowFreemove test (the field is removed from ClientMain) Gate fly mode elsewhere if you set AllowFreemove

ScreenManager.PlaySound(string) and PlaySound(AssetLocation) (public static) each gained a required bool randomizePitch; when true the sound gets a pitch between 0.8 and 1.2 from a new static rand. There is no overload without the flag, so calls and patches against the old signatures fail to bind.

In “Aggressive Optimize” RAM mode (ClientSettings.OptimizeRamMode == 2) sounds are now decoded on demand. ScreenManager.LoadSoundsSlow(ClientMain) became LoadSoundsSlowAsync(ClientMain): for the priority sounds (weather, environment, temporal storm, rift) it calls the new AudioMetaData.Preload(), which only reads the file, instead of Load(), which decodes to PCM; the full decode of everything else still only runs in the other modes. The per-asset verbose logging (ClientSettings.ExtendedDebugInfo) is gone and the pause between priority sounds is 10 ms (was 15). AudioMetaData now guards DoLoad(), Preload() and Unload() with a private loadLock.

// ScreenManager.LoadSoundsSlowAsync(ClientMain), 1.23.0-pre.1
bool deferPcmDecode = ClientSettings.OptimizeRamMode == 2;
// ... for each priority sound:
if (deferPcmDecode)
{
((AudioMetaData)soundEntry.Value).Preload();
}
else
{
soundEntry.Value.Load();
}

The in-game sound engine now notices device changes: SystemSoundEngine registers a 2-second tick, OnGameTick2000ms, which compares the OpenAL default device and the available device list with the last ones seen and raises a private OnSoundDevicesChanged event, wired to ClientPlatformWindows.UpdateSoundDevices() (see “Platform and window”). AudioOpenAl.CurrentDevice now reads AlcGetString.AllDevicesSpecifier instead of DeviceSpecifier, so it matches the names in Devices (inferred).

Member (1.22.7) 1.23.0-pre.1 What to do
ScreenManager.PlaySound(string) (public static) PlaySound(string name, bool randomizePitch) Pass false for the old behaviour; update patch targets
ScreenManager.PlaySound(AssetLocation) (public static) PlaySound(AssetLocation location, bool randomizePitch) As above
ScreenManager.LoadSoundsSlow(ClientMain) (public static) LoadSoundsSlowAsync(ClientMain); RAM mode 2 preloads instead of decoding Rename patch targets; do not assume priority sounds are decoded in mode 2
LoadSoundsThread.ProcessSlow() (internal type) ProcessSlowAsync() Rename
- AudioMetaData.Preload() (public) Call before playing if you want the file read early
AudioMetaData.DoLoad(), Unload() run under loadLock Re-anchor transpilers
AudioOpenAl.CurrentDevice AllDevicesSpecifier None
- SystemSoundEngine.OnGameTick2000ms(float), previousAudioDevices, previousDefaultAudioDevice, OnSoundDevicesChanged (all private) Hook to react to device switches
OggDecoder.OggToWav(Stream, IAsset) the float-to-16-bit loop rewritten with MemoryMarshal.Cast<byte, short> and Math.Clamp; the unused clipflag local is gone Same output; transpilers on this method break
SystemPlayerSounds wireframe renderer registered at EnumRenderStage.AfterOIT instead of Opaque Same move as the debug wireframes (see Rendering systems)
Member (1.22.7) 1.23.0-pre.1 What to do
.dev command (SystemClientCommands, internal) new subcommand hud3dtest (OnCmdHud3DTest, field hud3DTest) that toggles a Hud3DTest, a new public Hud3DRaycastElement sample Example of the new 3D HUD API (see the API chapter)
SystemClientCommands.OnCmdFreeMove, OnCmdMoveSpeed (private) no ClientMain.AllowFreemove test Gate them yourself if needed
SystemClientCommands.OnCmdSetting (private; .clientconfig) setting minbrightness requires Privilege.minbrightness See the API chapter for the privilege
SystemClientCommands.OnCmdCpChat and the chat copy case read ClientMain.CurrentGroupId Rename field references
.debug wireframe (ClientSystemDebugCommands, internal) new subcommand colliders (OnCmdColliders, toggles wfmodes.Colliders) None
ClientSystemDebugCommands.OnCmdFov (private) with no argument prints the current FOV; the 60-degree minimum now applies in survival mode instead of in multiplayer; messages go through Lang.Get Re-anchor
ClientSystemDebugCommands atlas export Path.Join instead of Path.Combine None

Cosmetic or near-cosmetic changes, no behaviour change: ClientProgram and ClientProgramArgs (version strings), GuiElementModCell (version string), GuiScreenServerDashboard (version string, explicit out types; its join call is in the server-browser table), GuiDialogTransformEditor (nullable annotation), ClientWorldPlayerData (DesiredViewDistance declaration moved), SessionManager (login version string; the newest-version URL is under start-up), GuiScreenConnectingToServer (framebuffer size and GUI scale only). One cosmetic change does shift IL: in ClientSystemDebugCommands, GuiScreenSingleplayer and GuiDialogSelboxEditor the string.Format argument buffers now use System.Runtime.CompilerServices.InlineArray4<object>/InlineArray6<object>/InlineArray8<object> instead of the compiler-generated <>y__InlineArrayN<object> types, so a transpiler that names those types breaks.

Client settings: ClientSettings and its migration

Section titled “Client settings: ClientSettings and its migration”

settingsVersion goes from "1.16" to "1.17". On the first start of 1.23 a one-off migration in ClientSettings (the SettingsVersion == "1.16" branch) sets liquidDepthFullResolution to true, maxParallelModDownloads to 3 and allowSSBOs back to DefaultSSBOsSetting(), and, when RuntimeEnv.DPIHScale is above 1, divides guiScale by the DPI scale (rounded to eighths, at least 0.5) so the effective GUI size stays the same now that the DPI scale is multiplied in.

Setting (key) 1.22.7 1.23.0-pre.1 Notes
retroMode (ClientSettings.RetroMode) - new, false Mirrored to RuntimeEnv.RetroMode; toggling reloads textures. Texture base level 2, no blending for opaque chunks and entities (see Rendering); the API side steps animations and wave counters (see the API chapter). No settings-dialog row in pre.1: set it in clientsettings.json or with .clientconfig
liquidDepthFullResolution (ClientSettings.LiquidDepthFullResolution) - new, true (also set by the migration) Liquid-depth framebuffer at full instead of quarter resolution; a watcher rebuilds the framebuffers
maxParallelModDownloads (ClientSettings.MaxParallelModDownloads) - new, 3 via the migration See Mod downloads
allowSSBOs DefaultSSBOsSetting() same default; reset by the migration; switched off at start-up when the driver lacks support See Platform
guiScale the GUI scale the GUI scale before the DPI factor; effective scale is RuntimeEnv.GUIScale Migrated as above
ambientBloomLevel default 0.2 default 20 for new settings files The engine divides by 100, so the old default was effectively 0.2 %; existing files keep their value
promptForCommandLinks set only by an older migration also a default, true -
weirdMacOSMouseYOffset (ClientSettings.WeirdMacOSMouseYOffset) 5 removed Mouse positions are DPI-scaled instead
minbrightness - reset to 0 on joining a world without Privilege.minbrightness See ClientMain

The settings dialog (GuiCompositeSettings) lost its hover-text arrays: each row now calls Lang.Get with the same key inline, so a transpiler that indexed hoverTexts breaks, and the order of Lang.Get calls changed. Tab widths divide by RuntimeEnv.GUIScale; the GUI-scale slider’s maximum (24 instead of 16) depends on the screen width divided by the DPI scale; the Interface tab has a new switch for focusWindowOnModInstallRequest (the setting existed); SetCustomPreset uses First() instead of FirstOrDefault(); a language entry without a code is skipped with a debug log; the sound device list is built without Append. No graphics rows were added or removed.

Mod discovery, side filtering and source-mod compilation all changed, and the engine dropped SharpZipLib.

  • Discovery. ModLoader.CollectMods() (private) now skips every entry in a mods folder whose name starts with ., and builds containers through the new factory ModContainer.CreateIfSourceTypeIsUnderstood, which returns null for anything it does not recognise. ModContainer.GetSourceType(FileSystemInfo) now returns null for a folder that has no modinfo.json among its direct children. The match is ordinal, so ModInfo.json does not count, even on Windows. In 1.22.7 such a folder was listed and then errored with “Missing modinfo.json”. Now it is skipped without a message, so it no longer appears in the mod list at all.
  • Side filtering moved into LoadMods. After dependency sorting, ModLoader.LoadMods(EnumAppSide side, ...) sets ModStatus.Disabled on every enabled mod whose Info.Side does not include side, and logs “Mod {0} is disabled because it is not compatible with the current side”. Such a mod is not unpacked, its assembly is not loaded and its assets are not added as an origin. In 1.22.7 a wrong-side code mod was loaded and then marked ModStatus.Unused in ModContainer.InstantiateModSystems. A content-only mod (no assembly) was never side-checked, so its assets loaded on both sides. Now a "side": "Server" content mod loads nothing on the client, and IsModEnabled returns false for it there.
  • Source (.cs) mods are no longer compiled to read their mod info. In 1.22.7, ModContainer.LoadModInfoFromCode (private) compiled the sources and read [ModInfo] and [ModDependency] from the compiled assembly. Now it parses each file with Roslyn’s syntax tree only, through the new SourceModInfoReader.TryRead(string), and compilation happens later, in ModContainer.LoadAssembly, after dependency sorting and only for enabled mods. Consequences:
    • Only string and bool literals are read from the attribute: Name, ModID (positional), Version, CoreMod, NetworkVersion, Description, Website, Authors, Contributors, Side, RequiredOnClient and RequiredOnServer. Constants, nameof and interpolated strings are ignored.
    • [assembly: ModDependency], WorldConfig and IconPath are not read for source mods. A source mod therefore declares no dependencies and no world config.
    • ModContainer.LoadModInfoFromAssembly(Assembly, out ModWorldConfiguration) (private) is no longer called. A patch on it does nothing.
    • Compile errors now surface from LoadAssembly (status Errored, ModError.Loading), not from LoadModInfo.
  • Compilation references. ModCompilationContext(EnumAppSide side) adds System.Linq.dll, System.Collections.dll and System.IO.Compression.dll on both sides, and on the client OpenTK.Graphics.dll and OpenTK.Core.dll. The references field changed from string[] to List<string> (reflection). ModLoader now creates the context in its constructor instead of a field initialiser.
  • Zip handling. The engine no longer references ICSharpCode.SharpZipLib. ModContainer.Unpack(string), LoadModInfo(...) (zip branch) and the private loadBackground(string) use System.IO.Compression.ZipArchive: GetEntry, ZipArchiveEntry.Open() and ExtractToFile(outputPath, overwrite: true). A directory entry is now one whose FullName ends in /. The path-escape check is ordinal. SourceModInfoReader, FolderOrigin and PathOrigin do not handle zips; zips are always unpacked to the cache folder first. A mod that used SharpZipLib through the game’s copy must bundle it (see the bundled libraries chapter).
  • Null-safety only: ModLoader and ModContainer.CheckProperVersions() now tolerate Info == null in log messages and in the block-list and dependency checks.
Member (1.22.7) 1.23.0-pre.1 What to do
ModContainer(FileSystemInfo fsInfo, ILogger parentLogger, bool logDebug), public private parameterless constructor; new public static ModContainer? CreateIfSourceTypeIsUnderstood(FileSystemInfo fsInfo, ILogger parentLogger, bool enableTraceLogging) Call the factory and handle null. Patch the factory, not .ctor
ModContainer.GetSourceType(FileSystemInfo) returns null for a folder without a direct modinfo.json child Ship modinfo.json (lower case) in folder mods
ModLoader.LoadMods(IEnumerable<string> disabledModsByIdAndVersion = null) LoadMods(EnumAppSide side, IEnumerable<string> disabledModsByIdAndVersion = null) Pass the side; re-target patches
ModLoader.LoadMods(List<ModContainer> mods, IEnumerable<string> disabledModsByIdAndVersion = null) LoadMods(EnumAppSide side, List<ModContainer> mods, IEnumerable<string> disabledModsByIdAndVersion = null) As above. Side filtering now happens here
ModCompilationContext() ModCompilationContext(EnumAppSide side) Pass the side
ModCompilationContext.references, internal, string[] List<string> Fix reflection casts
ModContainer.LoadModInfoFromCode(...), internal reads source mods through SourceModInfoReader.TryRead; no compilation Patch LoadAssembly or ModCompilationContext.CompileFromFiles for compile-time hooks
ModContainer.LoadModInfoFromAssembly(Assembly, out ModWorldConfiguration), internal no longer called Remove patches on it
- SourceModInfoReader (public static class): ModInfo TryRead(string sourcePath) Use if you need the same parse
// ModLoader.CollectMods(), 1.22.7
where ModContainer.GetSourceType(fsInfo).HasValue
select new ModContainer(fsInfo, logger, traceLog)).OrderBy<ModContainer, string>((ModContainer mod) => mod.FileName, StringComparer.OrdinalIgnoreCase).ToList();
// ModLoader.CollectMods(), 1.23.0-pre.1
where !fsInfo.Name.StartsWith('.')
select ModContainer.CreateIfSourceTypeIsUnderstood(fsInfo, logger, traceLog)).WithoutNulls().ToList();
list.Sort((ModContainer a, ModContainer b) => string.Compare(a.FileName, b.FileName, StringComparison.OrdinalIgnoreCase));
// ModLoader.LoadMods(EnumAppSide, List<ModContainer>, IEnumerable<string>), 1.23.0-pre.1 (1.22.7 only called Unpack)
if (!mod2.Info.Side.HasFlag(side))
{
mod2.Status = ModStatus.Disabled;
logger.Notification("Mod {0} is disabled because it is not compatible with the current side ({1})", mod2.Info.ModID, side);
}
else
{
mod2.Unpack(UnpackPath);
}

Mod downloads, the mod DB and game updates

Section titled “Mod downloads, the mod DB and game updates”

ModDbUtil moved to 64-bit ModDB tag ids and new query parameters. GameVersionEntry.TagId (public field) is now long. Search takes long[] gameVersionIds and a long majorVersionId (was string mv) and sends gameversions[]= and gameversion= (was gv[]= and mv=). The cached selfGameVersionId and sameMinorVersionIds fields and loadVersionIds are gone; the four search command handlers were renamed and now match version names without a v prefix (a leading v in the argument is stripped). The private search helper no longer prints usage for a null search text and limits results to 11. ModDbUtil.DownloadProgressDelegate is replaced by Vintagestory.Common.DownloadProgressDelegate(long downloadedBytes, long? totalBytes): an unknown total is now null, not 0. DownloadModAsync hands the transfer to VSWebClient.DownloadAsync and deletes the partial file when cancelled. onInstallCommand accepts a null game version and uses the running version.

Member (1.22.7) 1.23.0-pre.1 What to do
GameVersionEntry.TagId (int) long Recompile; reflection reading it as int fails
ModDbUtil.Search(string, Action<ModSearchResult>, int[], string? mv, string? sortBy, int limit) Search(string, Action<ModSearchResult>, long[] gameVersionIds, long majorVersionId = 0, string? sortBy, int limit) Pass long ids; 0 means no major-version filter
ModDbUtil.search(string, Action<string>, int[]) (private) search(string, Action<string>, long[], long majorGameVersionId = 0) Re-target
ModDbUtil.onSearchCommand(string, Action<string>) onSearchForCurrentGameVersionCommand(string, Action<string>) Rename (called by the server’s mod DB command)
ModDbUtil.onSearchCompatibleCommand(string, Action<string>) onSearchForCompatibleWithCurrentGameVersionCommand(string, Action<string>) Rename
ModDbUtil.onSearchForCommand(string version, string, Action<string>) onSearchForSpecificGameVersionCommand(string gameVersion, string, Action<string>) Rename
ModDbUtil.onSearchForAndCompatibleCommand(string version, string, Action<string>) onSearchForCompatibleGameVersionCommand(string gameVersion, string, Action<string>) Rename
ModDbUtil.selfGameVersionId, sameMinorVersionIds (public fields), loadVersionIds (private), commandPrefix (private) removed Drop
ModDbUtil.DownloadProgressDelegate (public nested delegate) Vintagestory.Common.DownloadProgressDelegate(long, long?) Change the callback type; test totalBytes.HasValue, not == 0
ModDbUtil.DownloadModAsync(string, string, ModDbUtil.DownloadProgressDelegate, CancellationToken) takes Vintagestory.Common.DownloadProgressDelegate; body is one VSWebClient.DownloadAsync call Re-target patches
ModDbUtil.onInstallCommand(string, string, Action<string>) forGameVersion may be null None

GuiScreenDownloadMods (public) now installs on the thread pool. beginInstallation() became beginInstallation(CancellationToken), which queues the new private installAsync(CancellationToken). Downloads run at most ClientSettings.MaxParallelModDownloads at a time (a SemaphoreSlim), progress text is throttled per entry through the new ModInstallState.LastStatusUpdateMs and a debounceStopwatch, the title counts completed mods (modinstall-downloading), and leaving the screen while installing cancels through cancelCts. failedMods moved from a field to a local. Joining after the download uses ConnectToMultiplayer(ServerConnectData.FromHostAsync(...)).

GuiScreenGetUpdate (internal) fetches the release list over HTTPS and downloads through VSWebClient.DownloadAsync with a DownloadProgressDelegate. downloadInstaller, onReleasesDownloadComplete and onProgress became one downloadInstallerAsync(GameReleaseVersion, CancellationToken); the two cancellation sources became one downloadCTS, and releases is a local. ServerCtrlBackendInterface also moved to https:// for its version lists. GuiScreenOnlineMods.Search() passes Array.Empty<long>() and 0L.

SystemModHandler passes EnumAppSide.Client to the new first parameter of ModLoader.LoadMods (see Mods) in both places it loads mods, and its mod-list queries skip mods whose Info is null.

Member (1.22.7) 1.23.0-pre.1 What to do
GuiScreenDownloadMods.beginInstallation() (private) beginInstallation(CancellationToken); work in installAsync(CancellationToken) Patch installAsync; the body is an async state machine
GuiScreenDownloadMods.failedMods (private field) removed (local) Drop reflection
- GuiScreenDownloadMods.cancelCts, debounceStopwatch; ModInstallState.LastStatusUpdateMs None
GuiScreenGetUpdate.downloadInstaller(GameReleaseVersion), onReleasesDownloadComplete(Exception), onProgress(object, Tuple<int, long>) (private) downloadInstallerAsync(GameReleaseVersion, CancellationToken) Re-target
GuiScreenGetUpdate._gameReleaseVersionCts, _gameReleaseDownloadCts, releases, versionnumber (private) downloadCTS, versionNumber (readonly) Update reflection names
SystemModHandler calls to ModLoader.LoadMods(List<ModContainer>, IEnumerable<string>) LoadMods(EnumAppSide.Client, ...) Re-anchor transpilers

AssetManager, hot reload and AssetCategoryWatcher

Section titled “AssetManager, hot reload and AssetCategoryWatcher”

AssetManager gained a debug flag, single-asset reload and file watching. The interface side (IAssetManager.Reload, WatchCategory, UnwatchCategory, IAssetOrigin.TryResolveAsset, IAsset.FullFilePath) is in the API chapter.

  • The constructor takes bool debug and writes it to the new public static bool AssetManager.Debug (default true until the first constructor runs). The client passes ClientSettings.DeveloperMode. The server passes ServerMain.InDeveloperMode, which comes from the start arguments; single player copies the client setting into them. The flag is static, so in single player the client and server share it.
  • AssetManager.Reload(IAsset) reads the asset again through asset.Origin.TryLoadAsset. It returns false for runtime assets, and removes the asset (RemoveAsset) if the read fails. It stores the passed instance in Assets, replacing the old object. It does not re-apply JSON patches. It adds the instance to the per-category list only if list.Contains(asset) is false, and with the new Asset.Equals an old instance at the same location counts as contained. So the category list keeps the old object (inferred: lookups by category can return the stale data).
  • WatchCategory(AssetCategory, AssetChangedDelegate, string filter = "*.json") creates an AssetCategoryWatcher. Nothing in the engine calls it. In the base game, the server-side state tree system calls it only when VSEssentials’ server config EnableAssetHotReloading is true (default false). It is not tied to developer mode.
  • AssetCategoryWatcher puts one FileSystemWatcher (subdirectories included, NotifyFilters.LastWrite, Changed events only) on <origin>/<domain>/<category> for each domain of a FolderOrigin, and on <origin>/<category> for other origins. It reacts only to a file that the origin can resolve, that is already in Assets, and whose current winner is that same origin. New files are not picked up: FolderOrigin.TryResolveAsset uses a path table built when the origin scanned its folder. Each asset is debounced for 100 ms. AssetManager.Reload and then the callback run on a thread-pool timer thread, not the main thread.
  • WatchCategory on a category that is already watched replaces the old watcher without disposing it. UnwatchCategory on a category that is not watched throws KeyNotFoundException. AssetManager never disposes its watchers at shutdown (inferred: they live until unwatched).
  • Asset.FilePath changed from a public field to an auto-property, public string FilePath { get; set; }. Mods compiled against 1.22.7 that read or write Asset.FilePath fail with MissingFieldException (IAsset has no FilePath), and GetField("FilePath") returns null. Recompiling fixes source access; reflection must use GetProperty.
  • New FullFilePath { get; set; }. Only PathOrigin fills it, and only while AssetManager.Debug is true. FolderOrigin, which serves the base game through GameOrigin and every mod, leaves it null.
  • Asset now implements IEquatable<Asset>. Equals(object) was Location.Equals(obj), which was true only when obj was an equal AssetLocation. Now it is Equals(obj as Asset): two Asset objects with equal locations are equal, and an Asset never equals an AssetLocation. This changes List<IAsset>.Contains, Remove and IndexOf and HashSet<Asset> behaviour.
  • Asset.ToObject<T>(JsonSerializerSettings) calls Shape.ValidateUvBounds(ServerMain.Logger, Location) on a Shape result when RuntimeEnv.DebugOversizedUVs is set (default false; the engine never sets it).
  • FolderOrigin.GetAssets(AssetCategory, bool), FolderOrigin.GetAssets(AssetLocation, bool) and the same two on PathOrigin now sort their result with AssetLocation.CompareTo, an ordinal compare of domain:path. In 1.22.7 the order was the file system’s enumeration order. Code that depends on the order of assets within one origin now gets the sorted order on every platform: registration order of types, and the order one mod’s patches are applied (inferred).
  • FolderOrigin gains protected readonly Dictionary<string, AssetLocation> _pathLookup (full path to location, case-insensitive), filled in the constructor’s scan, and TryResolveAsset(string fullPath, out IAsset asset). PathOrigin.TryResolveAsset(string filePath, out IAsset asset) resolves any path under OriginPath. Custom IAssetOrigin implementations must add TryResolveAsset (see the API chapter).

AssetSchemaExporter and the embedded dialogue schema

Section titled “AssetSchemaExporter and the embedded dialogue schema”

AssetSchemaExporter (public static) has one public entry point: bool ExportSchemas(string gamePath, List<string>? additionalModSearchPaths = null, bool force = false). Nothing in VintagestoryLib, Vintagestory, VintagestoryServer, ModMaker or the three base-game mod assemblies calls it in 1.23.0-pre.1, so it runs only if a tool or mod calls it. When <gamePath>/Schemas/.version is not 1.23.0-pre.1 (or force is set), it does the following:

  1. Deletes *.schema.json in that folder and calls AssetRegistry.Clear().
  2. Loads every .dll under <gamePath>/Mods and the extra paths, recursively, skipping hidden, system and dot-files, into the engine’s AssemblyLoadContext.
  3. Invokes every public static parameterless method marked [RegistersAssetTypes].
  4. Writes AssetRegistry.WriteJsonSchemasToDisk, then every embedded resource named AssetSchemas.*.
  5. Stamps .version.

The engine now embeds one such resource, AssetSchemas.DialogueAsset.schema.json: a JSON Schema (draft 2020-12) for dialogue assets, with components and orphans arrays of talk, condition and trigger nodes, and a startNode. Only the exporter reads it. Calling the exporter inside a running game clears the asset type registry (inferred: types registered earlier are lost).

Member (1.22.7) 1.23.0-pre.1 What to do
AssetManager(string assetsPath, EnumAppSide side) AssetManager(string assetsPath, EnumAppSide side, bool debug) Pass the flag; it also sets the static AssetManager.Debug
Asset.FilePath, public field public property Recompile; fix GetField reflection
Asset.Equals(object) compares two Asset locations; no longer equal to an AssetLocation Compare asset.Location explicitly
FolderOrigin / PathOrigin GetAssets(...) results sorted by domain:path Do not rely on file system order
- AssetManager.Reload(IAsset), RemoveAsset(AssetLocation), WatchCategory(...), UnwatchCategory(AssetCategory) New; the watcher callback runs off the main thread
- FolderOrigin.TryResolveAsset, PathOrigin.TryResolveAsset, Asset.FullFilePath New
- AssetSchemaExporter.ExportSchemas(string, List<string>?, bool) New; not called by the game

Recipe registries became custom registries

Section titled “Recipe registries became custom registries”

RecipeRegistryBase now derives from the API’s new CustomRegistryBase and is obsolete (see the API chapter). The engine renamed its storage and helpers to match. The GameMain and ClassRegistry members are public, but a mod reaches them only by casting api.World to GameMain or through APIBase.ClassRegistryNative. The grid recipe registry is now created with RegisterCustomRegistry<RecipeRegistryGeneric<GridRecipe>>("gridrecipes").

Member (1.22.7) 1.23.0-pre.1 What to do
GameMain.recipeRegistries (Dictionary<string, RecipeRegistryBase>) removed; customRegistries (Dictionary<string, CustomRegistryBase>) Use customRegistries or GetCustomRegistry
GameMain.GetRecipeRegistry(string) returning RecipeRegistryBase returns CustomRegistryBase, [Obsolete("Use GetCustomRegistry instead")] Binary break for callers expecting the old return type. Use GetCustomRegistry(string)
GameMain.RegisterRecipeRegistry<T>(string) obsolete; forwards to the class registry’s custom-registry methods Use RegisterCustomRegistry<T>(string) where T : CustomRegistryBase
APIBase.RegisterRecipeRegistry<T>(string) obsolete; calls gamemain.RegisterCustomRegistry<T> Use APIBase.RegisterCustomRegistry<T>(string)
ClassRegistry.RecipeRegistryToTypeMapping, TypeToRecipeRegistryMapping removed; CustomRegistryToTypeMapping, TypeToCustomRegistryMapping Rename
ClassRegistry.RegisterRecipeRegistry(string, Type), RegisterRecipeRegistry<T>(string) removed; RegisterCustomRegistry(string, Type), RegisterCustomRegistry<T>(string) Rename
ClassRegistry.CreateRecipeRegistry<T>(string) where T : RecipeRegistryBase removed; CreateCustomRegistry<T>(string) where T : CustomRegistryBase Rename
ClassRegistry.GetRecipeRegistryCode<T>() removed; GetCustomRegistryCode<T>() Rename

GameMain: selection, despawn and the collision scene

Section titled “GameMain: selection, despawn and the collision scene”
  • GameMain creates a CollisionScene in its constructor and exposes it as public ICollisionScene CollisionScene (the IWorldAccessor.CollisionScene of both sides; see the API chapter). ClientMain and ServerMain dispose it on exit.
  • RayTraceForSelection(IWorldIntersectionSupplier, Ray, ref BlockSelection, ref EntitySelection, BlockFilter, EntityFilter), which every other overload calls, now also asks the collision scene. The new private getSelectedCollider queries colliders on CollisionLayer.Selection along the ray. It keeps only colliders with a SelectionPosition that pass bfilter, and only if that block’s GetSelectionBoxes is not null. It builds a BlockSelection for that position. If it is nearer than the voxel hit, it replaces blockSelection before entities are tested. A postfix on this method can now see a BlockSelection that did not come from AABBIntersectionTest, and a transpiler finds two new locals (dimension, colliderSelection).
  • New public void OnEntityDespawn(Entity entity, EntityDespawnData reason) calls entity.OnEntityDespawn(reason) and then, in a finally, CollisionScene.UnregisterEntityColliders(entity.EntityId). The client’s despawn paths (ClientSystemEntities, ClientPlayer, SystemUnloadChunks) and ServerMain’s despawn now call it instead of Entity.OnEntityDespawn directly. A transpiler that looked for callvirt Entity.OnEntityDespawn in those methods must look here.
1.23.0-pre.1
// GameMain.RayTraceForSelection(IWorldIntersectionSupplier, Ray, ref BlockSelection, ref EntitySelection, BlockFilter, EntityFilter), 1.22.7
blockSelection = interesectionTester.GetSelectedBlock(range, bfilter);
Entity[] entities = supplier.GetEntitiesAround(ray.origin, range, range, (Entity entity2) => efilter == null || efilter(entity2));
int dimension = interesectionTester.pos.dimension;
blockSelection = interesectionTester.GetSelectedBlock(range, bfilter);
BlockSelection colliderSelection = getSelectedCollider(supplier, ray, dimension, bfilter);
if (colliderSelection != null && (blockSelection == null || selectionDistanceSq(ray, colliderSelection) < selectionDistanceSq(ray, blockSelection)))
{
blockSelection = colliderSelection;
}
Entity[] entities = supplier.GetEntitiesAround(ray.origin, range, range, (Entity entity2) => efilter == null || efilter(entity2));
  • New public bool InDeveloperMode => ClientSettings.DeveloperMode implements ICoreAPI.InDeveloperMode on both sides. The server’s own flag is IServerAPI.InDeveloperMode (ServerAPI, from the start arguments). On a dedicated server, sapi.InDeveloperMode reads the client settings class, not the --developerMode start argument, so the two can differ (inferred).
  • GetOrCreateDataPath(string), both LoadModConfig overloads and both StoreModConfig overloads now build the path with Path.Join instead of Path.Combine. They throw ArgumentException if the joined path contains .. anywhere. An absolute path argument used to replace the base folder; now it is appended under GamePaths.ModConfig or GamePaths.DataPath. A .. anywhere in the joined path throws, including in a file name such as my..config.json and in the base path itself (inferred: a data path given with .. makes every call throw).
  • StoreModConfig(JsonObject, string) writes null when jobj.Token is null instead of throwing.
  • Parameter names changed (foldername to folderName, filename to fileName), which matters only for named arguments and Harmony argument injection by name.
Member (1.22.7) 1.23.0-pre.1 What to do
APIBase.GetOrCreateDataPath(string foldername) (string folderName); Path.Join; throws on .. Pass relative names without ..
APIBase.LoadModConfig<T>(string filename), LoadModConfig(string filename) (string fileName); Path.Join; throws on .. As above
APIBase.StoreModConfig<T>(T, string filename), StoreModConfig(JsonObject, string filename) (…, string fileName); Path.Join; throws on .. As above
- APIBase.InDeveloperMode, APIBase.RegisterCustomRegistry<T>(string) New
- GameMain.CollisionScene, GameMain.OnEntityDespawn(Entity, EntityDespawnData), GameMain.GetCustomRegistry(string) New
1.23.0-pre.1
// APIBase.GetOrCreateDataPath(string), 1.22.7
string path = Path.Combine(GamePaths.DataPath, foldername);
string path = Path.Join(GamePaths.DataPath, folderName);
if (path.Contains(".."))
{
throw new ArgumentException(null, "folderName");
}

Block accessors, the world map and chunk data

Section titled “Block accessors, the world map and chunk data”

FastBlockPos (a struct in the API) gained overloads beside the BlockPos ones throughout. A [HarmonyPatch(typeof(X), "Name")] without argument types is now ambiguous for these names. A patch on the BlockPos overload does not see calls made through the FastBlockPos one. The base game already calls some of them, for example in mechanical power.

Type New overloads (1.23.0-pre.1) Notes
BlockAccessorBase virtual int GetBlockId(FastBlockPos), virtual int GetBlockId(FastBlockPos, int layer), Block GetBlock(FastBlockPos), Block GetBlock(FastBlockPos, int layer = 0), virtual Block GetMostSolidBlock(FastBlockPos), virtual IWorldChunk GetChunkAtBlockPos(FastBlockPos), virtual BlockEntity GetBlockEntity(FastBlockPos), T GetBlockEntity<T>(FastBlockPos) Use pos.InternalY (dimension-aware)
BlockAccessorReadLockfree the same set (GetBlockId(FastBlockPos, int) not virtual) Use pos.Y, like its BlockPos layered overloads
WorldMap abstract WorldChunk GetChunk(FastBlockPos), abstract BlockEntity GetBlockEntity(FastBlockPos) Subclasses must override
ClientWorldMap overrides of both; internal ClientChunk GetClientChunkAtBlockPos(FastBlockPos) See “Chunks, tesselation and meshing”
ServerWorldMap overrides of both See “Chunks on the server”
WorldChunk BlockEntity GetLocalBlockEntityAtBlockPos(FastBlockPos) Mirrors the BlockPos overload
  • BlockAccessorReadLockfree.GetBlockId(BlockPos) now passes pos.InternalY where it passed pos.Y, so it reads the right dimension for positions in a mini-dimension. GetBlockId(BlockPos, int) still uses pos.Y. The [Obsolete] attributes on GetBlockId(int, int, int) and GetBlockId(BlockPos) were removed.
  • BlockAccessorReadLockfree.GetInterface<T>(BlockPos) (public, threw NotImplementedException) was removed.
  • BlockAccessorBase.SetSolidBlockInternal(int, BlockPos, IWorldChunk, bool, bool, ItemStack) (protected) no longer always clears the fluid layer when the new block displaces liquids. It keeps a fluid whose block has the attribute cannotBeDisplaced: true, unless the new block’s material is EnumBlockMaterial.Mantle. A transpiler on the SetFluid(index3d, 0) call finds it nested two levels deeper, after a GetFluid and an attribute check.
  • BlockAccessorRevertable (the revert path for block entity data) now calls the span overload of TreeAttribute.CreateFromBytes (upd.NewBlockEntityData.AsSpan()). A transpiler matching the byte[] overload no longer matches.
// BlockAccessorBase.SetSolidBlockInternal(...), 1.22.7
if (worldAccessor.GetBlock(blockId).DisplacesLiquids(this, pos))
{
chunk.Data.SetFluid(index3d, 0);
}
// 1.23.0-pre.1
if (worldAccessor.GetBlock(blockId).DisplacesLiquids(this, pos))
{
int oldFluidId = chunk.Data.GetFluid(index3d);
if (oldFluidId != 0)
{
JsonObject? attributes = worldmap.Blocks[oldFluidId].Attributes;
if (attributes == null || attributes["cannotBeDisplaced"]?.AsBool() != true || newBlock.BlockMaterial == EnumBlockMaterial.Mantle)
{
chunk.Data.SetFluid(index3d, 0);
}
}
}

The block entity map is keyed by the in-chunk index (BlockPos.ToIndex3d(): ((y & 31) * 32 + (z & 31)) * 32 + (x & 31)), not by BlockPos. The public field became a lower-case field that may be null, behind a public property that creates the dictionary on first read. AddBlockEntity, RemoveBlockEntity(BlockPos) and GetLocalBlockEntityAtBlockPos index by ToIndex3d(). They allocate only when adding, and return null or false while the field is null. The interface property IWorldChunk.BlockEntities changed the same way (see the API chapter).

  • chunk.BlockEntities[pos] and TryGetValue(pos, ...) with a BlockPos no longer compile. Use pos.ToIndex3d() or GetLocalBlockEntityAtBlockPos(pos). Code iterating pairs must take the position from kv.Value.Pos, since kv.Key is now an int.
  • Reading the property on a chunk with no block entities now allocates and stores an empty dictionary. Read the blockEntities field when you only want to check.
  • Mods compiled against 1.22.7 that touch WorldChunk.BlockEntities fail with MissingFieldException, and through IWorldChunk.BlockEntities with MissingMethodException (the property type changed).
Member (1.22.7) 1.23.0-pre.1 What to do
WorldChunk.BlockEntities, public field Dictionary<BlockPos, BlockEntity> public property Dictionary<int, BlockEntity> BlockEntities { get; set; }, lazily created Key by pos.ToIndex3d(); recompile
IWorldChunk.BlockEntities (explicit implementation on WorldChunk) removed; the public property implements it -
- public Dictionary<int, BlockEntity>? blockEntities field Null-check before use
1.23.0-pre.1
// WorldChunk.AddBlockEntity(BlockEntity), 1.22.7
BlockEntities[blockEntity.Pos] = blockEntity;
if (blockEntities == null)
{
blockEntities = new Dictionary<int, BlockEntity>();
}
blockEntities[blockEntity.Pos.ToIndex3d()] = blockEntity;

BlockTypeNet, ItemTypeNet, CollectibleNet and EntityTypeNet (all public) carry the new API properties. They read nested binary data with the API’s new BinarySpanReader (a ref struct) instead of MemoryStream plus BinaryReader, so the FromBytes(BinaryReader, …) calls became FromBytes(ref BinarySpanReader, …). Transpilers on these methods lose the MemoryStream/BinaryReader locals and their using blocks. JSON attributes are now parsed with JToken.Parse(text, JsonUtil.DefaultLoadSettings). On the client that ignores line info when RAM optimisation is at its highest setting and developer mode is off.

Member (1.22.7) 1.23.0-pre.1 What to do
CollectibleNet.ToPacket(NatFloat) ToPacket(INatFloat); writes a new Typeid (0 one, 1 var25 random, 2 any) One and Var25Random return the shared static Packet_NatFloatOne / Packet_Var25Random: do not mutate the result
CollectibleNet.FromPacket(Packet_NatFloat) returning NatFloat returns INatFloat; INatFloat.One / INatFloat.Var25Random singletons for type ids 0 and 1 Do not cast the result to NatFloat
CollectibleNet nutrition: SaturationLossDelay SatietyLossDelay (API and packet rename) See the API chapter
CollectibleNet blended overlays: BlendMode = (EnumColorBlendMode)Mode / Mode = (int)BlendMode UnpackBlending(Mode) / PackBlending(), plus Alpha See the API chapter
CollectibleNet ground, crushed, eaten, transitioned and smelted stacks JsonItemStack.FromBytes(ref BinarySpanReader, …), with Code = null set first -
BlockTypeNet.ReadBlockTypePacket(...) and GetBlockTypePacket(...) also carry SourceFilePath, BleedCornerOverlayTexture, DamageType, KnockbackStrength Mirror new Block properties
BlockTypeNet particle properties, creative stacks, UnpackSetDecors, UnpackSetBlocks, UnpackBlockPositions, block drops BinarySpanReader; UnpackSetBlocks tests reader.RemainingBytes.Length > 0 for the liquids layer; drops use new ItemStack(ref reader) Re-target transpilers
ItemTypeNet.ReadItemTypePacket(...) and GetItemTypePacket(...) also carry SourceFilePath, DamageType, KnockbackStrength, HeldTpHitCombo, HeldTpHitComboHigh, HeldTpHitComboMid, HeldTpHitComboLow, HeldTpHitSprintAnimation Mirror new Item properties
EntityTypeNet.EntityPropertiesToPacket(EntityProperties, FastMemoryStream) the object initialiser is split; new local for properties.Drops, now EntityDropItemStack[] IL only; transpilers see one more local
EntityTypeNet animation metadata AnimationMetaData.FromBytes(ref reader, "1.23.0-pre.1") -
StackConverter.FromPacket(...) attributes TreeAttribute.FromBytes(ref BinarySpanReader) Re-target transpilers

SourceFilePath is filled by VSEssentials’ type loader from IAsset.FullFilePath when api.InDeveloperMode is set, so it is empty for assets served by a FolderOrigin. EntityTypeNet added no new packet fields of its own; entity drop damage types travel inside the drops bytes (see the API chapter).

The skill slot (hotbar index 10) and the off-hand slot (index 11) now have negative aliases, and the active slot number no longer shifts when the skill slot is full.

  • InventoryPlayerHotbar’s indexer accepts -1 (mapped to 10, the skill slot) and -2 (mapped to 11, the off-hand), through a private getHotbarSlotIndex. The valid range is [-2, Count). PlayerInventoryManager.GetHotbarSlotIndex(int) is the public copy of that mapping.
  • PlayerInventoryManager.ActiveHotbarSlot: in 1.22.7, a non-empty skill slot made ActiveHotbarSlotNumber == 10 the skill slot, and pushed backpack slots to 11 and up. Now numbers 10 and up are always backpack slots (backpack[n - 10]), and the skill slot is selected with ActiveHotbarSlotNumber == -1. Mods that set or read 10 for the skill slot now get backpack slot 0.
  • On the client, InventoryPlayerHotbar.OnItemSlotModified resets ActiveHotbarSlotNumber from -1 to 0 when the skill slot empties.
  • PlayerInventoryManager.IsVisibleHandSlot(string, int) now treats slot 11 (the off-hand) as always visible. In 1.22.7 it was slot 10.
  • GetHotbarItemstack(int) bounds-checks (returns null outside [-2, Count)) and accepts the negative aliases. ActiveTool, OffhandTool, ActiveHotbarSlot, OffhandHotbarSlot and MouseItemSlot are now null-safe and go through GetOwnInventory/GetHotbarInventory.
  • TryTransferAway pushes onitemgrabbed only when player.Entity is not null. Its debug text now uses StringBuilder.AppendInterpolatedStringHandler (IL change only).
// PlayerInventoryManager.ActiveHotbarSlot getter, 1.22.7
int skoffset = ((hotbarInv != null && !hotbarInv[10].Empty) ? 1 : 0);
if (ActiveHotbarSlotNumber >= 10 + skoffset)
{
...
return backpackInv[ActiveHotbarSlotNumber - 10 - skoffset];
}
return hotbarInv?[ActiveHotbarSlotNumber];
// 1.23.0-pre.1
if (ActiveHotbarSlotNumber >= 10)
{
return GetOwnInventory("backpack")?[ActiveHotbarSlotNumber - 10];
}
return GetHotbarInventory()?[ActiveHotbarSlotNumber];

In 1.22.7 the off-hand hunger penalty was set inside updateSlotStatMods(List<string>, ItemSlot, string), as stat hungerrate, key offhanditem, only when the off-hand item had no statModifier attribute. Now the new public virtual void UpdateOffhandHungerPenalty(IPlayer) sets hungerrate under the key offhandpenalty whenever the off-hand slot is not empty, statModifier or not, and removes it otherwise. It runs after both the off-hand and the active main-hand slot change. Mods that read or remove hungerrate/offhanditem to cancel the penalty must use offhandpenalty, or override UpdateOffhandHungerPenalty.

InventoryCraftingGrid overrides the API’s new BeginMultiUpdate() and EndMultiUpdate(). While a multi-update is open, FindMatchingRecipe() (internal) only records that a check is pending, and the check runs once when the outermost EndMultiUpdate closes. EndMultiUpdate without a matching begin throws InvalidOperationException. The client’s drag-distribute (GuiElementItemSlotGridBase.RedistributeStacks) uses it, so a postfix on FindMatchingRecipe fires once per drag, not once per slot.

Member (1.22.7) 1.23.0-pre.1 What to do
InventoryPlayerHotbar.skillSlotIndex, offHandSlotIndex (protected const 10, 11) removed; internal SkillSlotIndex (10), OffHandSlotIndex (11), MainHandSlotsCount (10), SpecialSlotsCount (2) Subclasses that used the old names stop compiling; use literals or the aliases -1/-2
InventoryPlayerHotbar[int] valid for [0, Count) valid for [-2, Count) -1 skill slot, -2 off-hand
PlayerInventoryManager.ActiveHotbarSlot skill slot is number -1; backpack starts at 10 always Re-check any slot-number arithmetic
PlayerInventoryManager.IsVisibleHandSlot(string, int) slot 11 visible, not 10 -
PlayerInventoryManager(OrderedDictionary<string, InventoryBase> AllInventories, IPlayer player), public protected; parameter allInventories Only subclasses call it
hunger stat key offhanditem (from the off-hand slot) offhandpenalty, via UpdateOffhandHungerPenalty(IPlayer) Patch or override the new method
- PlayerInventoryManager.GetHotbarSlotIndex(int); InventoryCraftingGrid.BeginMultiUpdate() / EndMultiUpdate(); internal InventoryPlayerBackpacks.BackpackSlotsCount (4) New

CollisionScene (public, sealed, ICollisionScene, IDisposable) is the engine’s implementation of the new collider scene. The interface, Collider, CollisionLayer, CollisionQueryFilter and the physics that use it are in the API chapter. Engine-side facts a mod should know:

  • There is one scene per GameMain, so the client and server each have their own (two in single player). The scene only lives in memory; nothing in it saves or syncs colliders.
  • Colliders sit in a uniform grid of 32-block cells keyed by dimension. A collider spanning more than 4096 cells is stored with no cells and found only by the full-scan path. A query covering more cells than max(64, occupied cells) scans every collider instead. Bounds and sweep motion must be finite and ordered, or the call throws ArgumentException.
  • Access is guarded by a ReaderWriterLockSlim, and query scratch space is [ThreadStatic], so queries from worker threads are allowed. RegisterTransformedCollider throws if an owner entity already has a collider with the same ownerColliderCode. Registering after Dispose() throws ObjectDisposedException.
  • Collider coordinates are dimension-local: GameMain.getSelectedCollider subtracts dimension * 32768 from the ray’s Y before querying.
  • The engine calls UnregisterEntityColliders(entityId) from GameMain.OnEntityDespawn (see above). Colliders with no owner entity are never removed by the engine; their registrant must call UnregisterCollider.
  • Besides selection and despawn, the engine itself only reads the scene for the client’s debug wireframes; the registrations come from the API’s and VSEssentials’ physics behaviours.

Networking: transport (TCP and UDP, client and server)

Section titled “Networking: transport (TCP and UDP, client and server)”

The wire framing is unchanged: every TCP message is a 4-byte big-endian length whose top bit flags a compressed body, followed by a protobuf Packet_Client or Packet_Server. The plumbing around it was rewritten. The byte-by-byte queues (QueueByte, Queue<byte>) gave way to the new public Vintagestory.Common.GrowableCyclicByteArray; NetIncomingMessage is now a struct; the ReadMessage() methods that returned null became bool TryReadMessage(out NetIncomingMessage); INetworkConnection takes spans instead of an array and a length; and ServerNetManager was folded into TcpNetServer. The UDP transport classes (UdpNetServer, UdpNetClient and the dummy ones) are unchanged.

Behaviour changes a mod can feel:

  • Sends now wait. The client’s TCPNetworkConnection.Send and the server’s TcpNetConnection.Send(byte[], bool) and SendPreparedBytes used to start Socket.SendAsync and return. They now call .AsTask().Wait() when the send does not complete at once, so the calling thread stalls while the socket’s send buffer is full (inferred).
  • A connection becomes a client later. TcpNetServer and DummyTcpNetServer still queue a NetworkMessageType.Connect message, but ServerMain.ProcessNetMessage now ignores it. The ConnectedClient is made on the first Data message, and only if its packet id is 33 (LoginTokenQuery). Id 15 (ServerQuery) is answered from a cached, pre-framed Packet_ServerQueryAnswer and the socket is shut down without ever making a ConnectedClient; any other first packet is dropped (its bytes are still counted). Only id 33 wakes a server in standby (Launch), so server-browser probes no longer start a sleeping server. ServerMain.lastClientId is gone. ProcessNetMessage runs on the client-packet parsing thread, or on the main thread when ReducedServerThreads is set.
  • Stricter first packet. TcpNetConnection.ReceiveData used to accept a first packet whose first protobuf key byte was 8 or 18. It now decodes the id with the new internal Vintagestory.Server.Network.ClientPacket.PeekIdFast and accepts only ids 1, 2, 15 and 33; anything else is disconnected as an invalid packet (and the address is added to TcpNetConnection.blockedIps when TemporaryIpBlockList is on). The game’s own client, single player included, opens with an empty Packet_Client { Id = 33 }; a custom client or bot must do the same.
  • A defect in the raw-bytes send. TcpNetConnection.Send(byte[] data, bool isCompressed) rents its framing buffer from ArrayPool<byte>.Shared but returns the caller’s data array to the pool in its finally, not the rented one. The shared pool throws ArgumentException for an array whose length is not one of its bucket sizes (16, 32, 64 … bytes); the method’s outer catch turns that into InvokeDisconnected() and EnumSendResult.Disconnected, after the bytes were sent. When the length happens to match a bucket, the caller’s array goes into the pool while still in use (inferred from the code and the .NET shared pool; not run). Only the raw byte[] paths to a remote client reach this method: IServerNetworkAPI.SendArbitraryPacket(byte[], ...), BroadcastArbitraryPacket(byte[], ...) and BroadcastPacketInRange(FastBlockPos, byte[]). Network channels, every Packet_Server send and single-player connections take other paths. A mod that sends raw byte arrays should move to a network channel or the Packet_Server overloads.
  • Buffers. The client’s receive queue is a GrowableCyclicByteArray allocated at 5 MiB up front (TcpNetClient.initialIncomingBufferSize), and TcpNetClient.CurrentlyReceivingBytes now counts only the bytes waiting in it. NetClient.Send became SendUncompressed; the client never compressed, so only the name changed.
  • TcpNetConnection.MaxPacketClientId is now static readonly, set from ClientPacket.MaxId (35). Setting it by reflection after the type is initialised throws on current .NET (inferred).
// ServerMain.ProcessNetMessage(NetIncomingMessage), 1.22.7
case NetworkMessageType.Connect:
...
lastClientId = GenerateClientId();
ConnectedClient newClient = (clientConnection.client = new ConnectedClient(lastClientId) { Socket = clientConnection });
// ServerMain.ProcessNetMessage(NetIncomingMessage), 1.23.0-pre.1
case NetworkMessageType.Data:
if (msg.SenderConnection.client == null)
{
switch (ClientPacket.PeekIdFast(msg.message))
{
case 15:
msg.SenderConnection.SendPreparedPacket(currentServerQueryAnswerSerialized, compressed: false, Logger);
msg.SenderConnection.Shutdown();
...
case 33:
break;
default:
TotalReceivedBytes += msg.messageLength;
return;
}
...
ConnectedClient newClient = new ConnectedClient(GenerateClientId()) { Socket = msg.SenderConnection };
// TcpNetConnection.Send(byte[], bool), 1.23.0-pre.1
byte[] rawPacket = ArrayPool<byte>.Shared.Rent(data.Length + 4);
NetIncomingMessage.WriteMessageUnsafe(rawPacket, data, isCompressed);
try { /* SendAsync(rawPacket.AsMemory(0, data.Length + 4)), then Wait() if not completed */ }
finally
{
ArrayPool<byte>.Shared.Return(data);
}
Member (1.22.7) 1.23.0-pre.1 What to do
NetIncomingMessage (public class) public struct; same fields Test the TryReadMessage result, not null. A Harmony prefix that edits the message must take it by ref
NetIncomingMessage.ReadInt(byte[]), WriteInt(byte[], int) removed; ReadHeaderUnsafe(ReadOnlySpan<byte>, out int length, out bool isCompressed), WriteHeaderUnsafe(Span<byte>, int, bool), WriteMessageUnsafe(Span<byte>, ReadOnlySpan<byte>, bool) The new helpers handle the compressed bit as well as the length
NetClient.ReadMessage(), NetServer.ReadMessage() (abstract) and the overrides in TcpNetClient, DummyTcpNetClient, TcpNetServer, DummyTcpNetServer bool TryReadMessage(out NetIncomingMessage) Re-target patches; loop with while (x.TryReadMessage(out var msg))
NetClient.Send(byte[]) (abstract; TcpNetClient, DummyTcpNetClient) SendUncompressed(byte[]) Rename only. ClientMain.SendPacket(byte[]) calls it
NetServer.LocalEndpoint ListenIp (string?) Same value (the configured IP or null); ServerAPI.ServerIp reads it
INetworkConnection.Send(byte[], int), TCPNetworkConnection.Send(byte[], int) Send(ReadOnlyMemory<byte>); waits for the socket 1.22.7 ignored the length and sent the whole array
INetworkConnection.Receive(byte[], int, out int), TCPNetworkConnection.Receive(...) int Receive(Span<byte>) Returns the count
TCPNetworkConnection.OnBytesReceived(object) (protected, async void) ReceiveLoop() (protected, returns Task), started with TaskCreationOptions.LongRunning Re-target patches
socket set-up inside the TCPNetworkConnection constructor static VintageStorySocket PrepareSocket(string host) (public) Patch this to change socket options
TCPNetworkConnection.received, tosendBeforeConnected (Queue<byte>), dataRcvBuf (Memory<byte>) received, toSendBeforeConnected (GrowableCyclicByteArray), dataRcvBuf (byte[]), all private readonly -
TcpNetClient.tcpConnection (INetworkConnection) TCPNetworkConnection? -
TcpNetClient.incoming (QueueByte), data, received, dataLength incoming (GrowableCyclicByteArray), receiveBuffer, receiveBufferLen, initialIncomingBufferSize Private
TcpNetClient.TryGetMessageFromIncoming() returning NetIncomingMessage or null bool TryGetMessageFromIncoming(out NetIncomingMessage) Private
Vintagestory.Client.QueueByte, Vintagestory.Common.QueueIncomingNetMessage, QueueOutgoingNetMessage removed The last two were unused in 1.22.7; GrowableCyclicByteArray replaces QueueByte
Vintagestory.Server.Network.ServerNetManager (StartServer, OnConnectRequest, events Connected, ReceivedMessage, Disconnected) removed; the listen socket and accept loop live in TcpNetServer.Start() and the private EnterConnectLoop() Patch TcpNetServer; the Connect message is now queued from ServerReceivedMessage on a connection’s first data
TcpNetServer.server (protected), cts (public), Ip, Port, ServerConnected(TcpNetConnection) removed; private socket, socketCts, ipAddress, port -
DummyTcpNetServer (public class) public sealed class Cannot be subclassed
TcpNetConnection.Address (string), IpEndpoint (public fields) RemoteEndpoint (IPEndPoint) Use RemoteEndpoint.Address.ToString(); ToString() still returns the address
TcpNetConnection.clientIdentificationPacketId (8), pingPacketId (18), DetermineMaxPacketId() removed; internal ClientPacket.MaxId, ClientPacket.PeekIdFast(ReadOnlySpan<byte>) -
TcpNetConnection.MaxPacketClientId (static) static readonly Do not write it
TcpNetConnection.dataRcvBuf (field) local in ReceiveData() -
TcpNetConnection.Send(byte[] data, bool compressedFlag), SendPreparedBytes(byte[] dataWithLength, int, bool compressedFlag) parameters renamed isCompressed, rawMessage; both wait for the send; see the defect above -
ServerMain.ProcessNetMessage, Connect case does nothing; see above Move connect-time patches to the Data branch, to HandleClientPacket_mainthread (ReceivedClientPacketType.NewConnection) or to HandleQueryClientPacket
ServerMain.lastClientId (private) removed Read ConnectedClient.Id
ServerMain.PacketParsingLoop() foreach over MainSockets calling TryReadMessage Re-target transpilers
Member (1.22.7) 1.23.0-pre.1 What to do
Compression.CompressOffset4(byte[], int) (public) forwards to a new internal CompressOffset4(byte[], int, bool reuseBuffer) with true; that one calls CompressionZSTD.Compress(byte[], int, int, bool) directly when the compressor is ZSTD A patch on CompressionZSTD.Compress(byte[], int, int) no longer sees calls made through CompressOffset4. The server-assets build uses reuseBuffer: false (a fresh array, not the shared buffer)
CompressionZSTD.Compress(byte[], int, int) (public) forwards to the new internal Compress(byte[], int, int, bool reuseBuffer) with true Same result
Compression.DecompressCombined(...) (internal) decompresses with DecompressAndSize into the compressor’s reusable buffer instead of a fresh copy; the palette array is allocated uninitialised and its tail cleared Same results; transpilers will not match
Compression.CompressAndCombine(int[], int[], int) BitOperations.Log2 replaces a shift loop Same result; IL differs

All changes to the generated protobuf classes add new field numbers, except three renames that keep their numbers and wire types. Packet_Client.LoginTokenQuery, Packet_ClientIdEnum.LoginTokenQuery (33) and Packet_ServerIdEnum.TokenAnswer (77) only moved inside their classes, and Packet_ClientSerializer.Serialize now writes LoginTokenQuery after the other fields instead of first. Protobuf readers do not care about order, so this is wire-compatible. The id constants are const, so a compiled mod keeps the values it was built with.

Member (1.22.7) 1.23.0-pre.1 What to do
Packet_NutritionProperties.SaturationLossDelay, SaturationLossDelayFieldID, SetSaturationLossDelay(int) SatietyLossDelay, SatietyLossDelayFieldID (still 7), SetSatietyLossDelay(int) Rename. The API property was renamed too; see the API chapter
- Packet_NutritionProperties.HealthDurationSec (8), HealthTicks (9) Serialised, but nothing in the engine sets or reads them yet
Packet_ServerQueryAnswer.MOTD, MOTDFieldID, SetMOTD(string) ServerDescription, ServerDescriptionFieldID (still 2), SetServerDescription(string) Filled from ServerConfig.ServerDescription
Packet_ServerQueryAnswer.GameMode, GameModeFieldID, SetGameMode(string) PlayStyle, PlayStyleFieldID (still 5), SetPlayStyle(string) Filled with the save game’s play style code
- Packet_ServerQueryAnswer.PublicKey (8, bytes), NetworkVersion (9, string) See the master server section
- Packet_NatFloat.Typeid (4) 0 means INatFloat.One, 1 Var25Random, 2 a NatFloat from Avg, Var and Dist. A packet built without Typeid decodes as the constant 1 and its other fields are ignored. CollectibleNet.ToPacket and FromPacket now use INatFloat
- Packet_BlendedOverlayTexture.Alpha (3) -
- Packet_BlockType.BleedCornerOverlayTexture (113), DamageType (114), KnockbackStrength (115), SourceFilePath (116) Carried by BlockTypeNet
- Packet_ItemType.DamageType (50), HeldTpHitCombo, HeldTpHitComboHigh, HeldTpHitComboMid, HeldTpHitComboLow (51 to 54, repeated string, each with Count, Length, Get…, Set…, …Add), HeldTpHitSprintAnimation (55), KnockbackStrength (56), SourceFilePath (57) Carried by ItemTypeNet
Packet_Client.LoginTokenQuery declared and serialised first declared and serialised in field-number order None

Query answer field reuse. Fields 2 and 5 keep their numbers and their wire type (a length-delimited string), so a reader built against the 1.22.7 schema decodes the description as MOTD, the play style code as GameMode, and skips 8 and 9. In practice no 1.22.7 game is affected: the 1.22.7 client never sent a ServerQuery, and a 1.22.7 server never answered one (its HandleQueryClientPacket disconnected the connection with “Query complete”). The renames break only code compiled against the old member names. In the other direction, a 1.23 client probing a 1.22.7 server gets a disconnect instead of a QueryAnswer, and its probe fails (inferred; the client side is under “Connecting to a server and the server browser”).

IL. Every changed Deserialize gained case labels, and Packet_ItemTypeSerializer.Serialize gained four loops, which shifts its local indices. Packet_ClientSerializer.Serialize renumbered its locals when LoginTokenQuery moved. Re-check any transpiler on a generated serializer.

  • Block-entity messages call both overloads. GeneralPacketHandler.HandleBlockEntityMessage now finds the block entity through GetBlockEntity(FastBlockPos) and calls the new OnReceivedServerPacket(int, SerializedData) and then the old OnReceivedServerPacket(int, byte[]). A block entity that overrides both handles each packet twice. ClientSystemEntities does the same for entity packets. See the API chapter for which overload to override.
  • Own-player spawn moved. In GeneralPacketHandler.HandlePlayerData, the block that sets game.player, calls OnOwnPlayerDataReceived(), sets Spawned and sends packet 26 now runs after the privileges and RoleCode are copied from the packet, not before. Code reached from OnOwnPlayerDataReceived now sees the player’s privileges and role on first join.
  • Span readers. HandleSpawnParticles and HandleAmbient read through the API’s BinarySpanReader (IParticlePropertiesProvider.FromBytes(ref BinarySpanReader, IWorldAccessor), AmbientModifier.FromBytes(ref BinarySpanReader)) instead of a BinaryReader over a MemoryStream; see the API chapter.
  • Animations wait for their entity. SystemNetworkProcess.HandleAnimationPacket now applies a packet through the new private TryApplyAnimationPacket. If the entity or its loaded shape is missing, the packet is stored in pendingAnimations (one per entity, the newest wins) and retried by a new 20 ms tick listener, RetryPendingAnimations, for up to 60 seconds; despawning the entity drops it. Entity.OnReceivedServerAnimations can therefore run on a later tick, from the retry listener, rather than inside the packet handler. HandleBulkAnimationPacket now calls HandleAnimationPacket per entry, so a patch on the latter sees bulk entries too.
  • Standing pose rides on the position packet. The client NetworkAPI.SendPlayerPositionPacket() asks PhysicsBehaviorBase.GetStandingColliderPose() and, if there is one, protobuf-serialises it into Packet_UdpPacket.ChannelPacket (through a new reused standingStream), over UDP or the TCP fallback alike. The server applies it in ServerUdpNetwork.HandlePlayerPosition (below; the physics side is in the API chapter).
// GeneralPacketHandler.HandleBlockEntityMessage(Packet_Server), 1.22.7
game.WorldMap.GetBlockEntity(new BlockPos(p.X, p.Y, p.Z))?.OnReceivedServerPacket(p.PacketId, p.Data);
// GeneralPacketHandler.HandleBlockEntityMessage(Packet_Server), 1.23.0-pre.1
BlockEntity be = game.WorldMap.GetBlockEntity(new FastBlockPos(p.X, p.Y, p.Z));
if (be != null)
{
be.OnReceivedServerPacket(p.PacketId, new SerializedData(p.Data));
be.OnReceivedServerPacket(p.PacketId, p.Data);
}
Member (1.22.7) 1.23.0-pre.1 What to do
GeneralPacketHandler.HandleBlockEntityMessage(Packet_Server) (private) calls both OnReceivedServerPacket overloads; looks up with FastBlockPos Override one overload only; a patch on GetBlockEntity(BlockPos) no longer sees this lookup
GeneralPacketHandler.HandlePlayerData(Packet_Server) (private) own-player spawn block after privileges and role Transpilers anchored on the old order break
GeneralPacketHandler.HandleSpawnParticles, HandleAmbient (private) BinarySpanReader The MemoryStream/BinaryReader locals are gone
SystemNetworkProcess.HandleAnimationPacket(AnimationPacket), HandleBulkAnimationPacket(BulkAnimationPacket) (public) deferred apply as above; new private pendingAnimations, TryApplyAnimationPacket(AnimationPacket), RetryPendingAnimations(float) Patch TryApplyAnimationPacket to see every applied packet
SystemNetworkProcess.OnSeperateThreadGameTick(float) while (game.MainNetClient.TryReadMessage(out msg)) -
NetworkAPI.SendPlayerPositionPacket() (client) attaches the standing collider pose -
AnimationPacket(Entity) constructor skips animations whose AnimationMetaData.ClientSide is set Client-side-only animations are not sent by the server; see the API chapter
EntityTagPacket.EntityId = 1L, TagsBitmask1 = 2L … TagsBitmask4 = 5L (field initialisers) no initialisers 1.22.7 deserialised a zero bitmask word, which protobuf-net omits, as 2, 3, 4 or 5, so the client saw tags the entity did not have (inferred); 1.23 reads 0
  • ServerMain.HandleEntityPacket builds an Entity.CachedAccessPerms, calls the new OnReceivedClientPacket(IServerPlayer, int, SerializedData, ref CachedAccessPerms) and then the old byte[] overload; ServerSystemBlockSimulation does the same for block entities. Override one of them only (API chapter).
  • The client-packet handler tables, HandleClientPacket_mainthread and ParseClientPacket_offthread are unchanged.
  • ServerUdpNetwork.HandlePlayerPosition takes a third parameter, Packet_CustomPacket standingPacket = null, which the UDP dispatch fills from Packet_UdpPacket.ChannelPacket. After a position is accepted, a pose of 1 to 256 bytes is deserialised as StandingColliderPose and passed to PhysicsBehaviorBase.TryApplyStandingColliderPose(pose, 128.0); a malformed pose logs “Invalid standing collider pose” and is ignored.
  • The same method now calls entity.Pos.SetFromPacket(packet, entity, !player.HasPrivilege(Privilege.freemove)), so a player with freemove skips the 128-block jump check (EntityPosExtensions.MaxMovePerPacket, now public).
  • ServerUdpNetwork.HandleMountPosition accepts a mount position when entity.IsControlledByClient(player.Entity), instead of IMountable.IsMountedBy (API chapter).
Member (1.22.7) 1.23.0-pre.1 What to do
ServerUdpNetwork.HandlePlayerPosition(Packet_EntityPosition, ServerPlayer) (public) HandlePlayerPosition(Packet_EntityPosition, ServerPlayer, Packet_CustomPacket standingPacket = null) Re-target patches; a compiled call needs the third argument
ServerMain.HandleEntityPacket(Packet_Client, ConnectedClient) (private) calls both OnReceivedClientPacket overloads Override one only

The server NetworkAPI gained a range broadcast and moved its block-entity broadcast to FastBlockPos and SerializedData. The old BlockPos/byte[] forms were removed from the class; IServerNetworkAPI keeps them as default interface methods marked [Obsolete(..., true)] that forward to the new ones. A compiled mod that calls through the interface still runs; a mod that patches or calls the class member directly fails (see the API chapter). The channel and API broadcast methods keep their params IServerPlayer[] signatures but hand the array to ServerMain’s new span overloads, so a null element in exceptPlayers now throws NullReferenceException (1.22.7 skipped it with plr?.ClientId). A null array is still fine.

Member (1.22.7) 1.23.0-pre.1 What to do
Vintagestory.Server.NetworkAPI.BroadcastBlockEntityPacket(BlockPos, int, byte[] = null) BroadcastBlockEntityPacket(FastBlockPos, int, SerializedData = default) Re-target patches; wrap data in SerializedData
Vintagestory.Server.NetworkAPI.BroadcastBlockEntityPacket(BlockPos, int, byte[] = null, params IServerPlayer[]) BroadcastBlockEntityPacket(FastBlockPos, int, SerializedData = default, params ReadOnlySpan<IServerPlayer>) As above
NetworkAPI.BroadcastBlockEntityPacket<T>(BlockPos, int, T) unchanged signature; wraps the serialised data in SerializedData -
- NetworkAPI.BroadcastPacketInRange(FastBlockPos, byte[]) (public virtual), NetworkChannel.BroadcastPacketInRange<T>(FastBlockPos, T) (public virtual) Sends to every admitted client within (MaxChunkRadius + 1) × 32 blocks horizontally. The byte[] form goes through the TcpNetConnection.Send defect above
NetworkChannel.BroadcastPacket<T>(T, params IServerPlayer[]), NetworkAPI.BroadcastArbitraryPacket(byte[] / object, params IServerPlayer[]) same signatures; a null element throws Filter nulls out of exceptPlayers

Every ServerMain broadcast now takes params ReadOnlySpan<IServerPlayer> instead of params IServerPlayer[], and picks recipients with client.State.IsAdmitted() && client.Player != null instead of State != Offline && State != Queued: clients still in EnumClientState.Connecting no longer receive broadcasts. The skip test is the new private static ContainsPlayer(ReadOnlySpan<IServerPlayer>, int), which reads ClientId from each element without a null check. The send paths now carry the ConnectedClient instead of the client id: SendPacket(IServerPlayer, ...) and SendArbitraryPacket cast the player to ServerPlayer and use its internal client field, so an IServerPlayer that is not a ServerPlayer now throws InvalidCastException (1.22.7 looked it up by ClientId). Harmony patches that name a span parameter must declare it as ReadOnlySpan<IServerPlayer>, and it cannot be read through __args (inferred).

Member (1.22.7) 1.23.0-pre.1 What to do
BroadcastPacket(Packet_Server, params IServerPlayer[]) (public) BroadcastPacket(Packet_Server, params ReadOnlySpan<IServerPlayer>) Recompile; or call IServerNetworkAPI.BroadcastArbitraryPacket(object, params IServerPlayer[])
BroadcastArbitraryPacket(Packet_Server, params IServerPlayer[]), BroadcastArbitraryPacket(byte[], params IServerPlayer[]) (internal) params ReadOnlySpan<IServerPlayer> Re-target patches
BroadcastArbitraryUdpPacket(Packet_UdpPacket, params IServerPlayer[]) (internal) params ReadOnlySpan<IServerPlayer> Re-target patches
BroadcastBlockEntityPacket(int, int, int, int, byte[] = null, params IServerPlayer[]) (public) BroadcastBlockEntityPacket(int, int, int, int, SerializedData = default, params ReadOnlySpan<IServerPlayer>); copies RawData into a new array and leaves Data unset when empty Wrap data in SerializedData
- BroadcastArbitraryPacketInRange(FastBlockPos, Packet_Server), BroadcastArbitraryPacketInRange(FastBlockPos, byte[]) (internal) Back the new range broadcasts
- SendPacket(ConnectedClient, Packet_Server), SendPacketFast(ConnectedClient, Packet_Server) (public) Most engine sends now go here, chunk sending through SendPacketFast(ConnectedClient, ...). Patch these to see every send
SendPacket(int clientId, Packet_Server), SendPacketFast(int, Packet_Server) (public) kept; SendPacket(int, ...) now does nothing for an unknown id Few call sites remain (PhysicsManager); a patch here misses most traffic, pings included
SendPacket(IServerPlayer, Packet_Server) (public), SendPacket(IServerPlayer, byte[]) (private) forward to the ConnectedClient overloads through a ServerPlayer cast See above
SendPacket(int, byte[]) (private) SendPacket(ConnectedClient, byte[]); compresses above 5120 bytes, then client.Socket.Send Re-target patches
SendPacket(int, BoxedPacket) (private) SendPacket(ConnectedClient, BoxedPacket) Re-target patches
SendArbitraryPacket(byte[] / Packet_Server, params IServerPlayer[]) (public) same signatures; cast to ServerPlayer -
serverAssetsPacket (BoxedPacket_ServerAssets, private) byte[] guarded by a new serverAssetsPacketLock See below

Server assets packet. BoxedPacket_ServerAssets (a BoxedPacket holding the Packet_Server) is gone. The assets packet (id 19) is now serialised once, compressed once with CompressOffset4(..., reuseBuffer: false) and kept only as those bytes. SendServerAssets(IServerPlayer) waits for it, then sends a clone of the compressed bytes with SendPreparedPacket when CompressPackets is on and the socket is not a DummyNetConnection, and otherwise decompresses it and sends a BoxedPacket. The single-player direct hand-off (DummyNetConnection.SendServerAssetsPacketDirectly) still gets the Packet_Server object, but only inside BuildServerAssetsPacket. A mod that edited the assets Packet_Server after it was built, or per player before sending, must now do it inside BuildServerAssetsPacket before serialisation.

Master server: heartbeat, registration and server query

Section titled “Master server: heartbeat, registration and server query”

ServerSystemHeartbeat was rewritten as one async loop, enterHeartbeatLoop(), started by tryStartBeating() from StandbyLaunch, OnBeginRunGame, UPnP completion and config changes. It runs while currentStatePermitsBeating() is true: not shutting down, AdvertiseServer on, a dedicated server, VerifyPlayerAuth on, UPnP either off or successful, and a play style known. The 1.22.7 UPnP path registered without checking IsDedicatedServer; 1.23 always requires it (inferred: a non-dedicated server no longer advertises).

  • Signing. Each loop start makes a new P-256 key (ECDsaCng on Windows, ECDsaOpenSsl elsewhere), publishes its SubjectPublicKeyInfo in ServerMain.CurrentServerQueryAnswer.PublicKey, and signs every register request body (SHA-256, IEEE P1363) into an X-Signature hex header. Heartbeat and unregister requests are not signed.
  • Token. The master server’s token is kept in ServerConfig.ServerToken, saved, and sent back in the next RegisterRequestPacket.token. A new /serverconfig servertoken subcommand (registered in OnBeginConfiguration) shows it and, outside hosted mode, writes it to a temporary file.
  • Timing. Heartbeats start at every 2 minutes (DEFAULT_INTERVAL). Failures stretch the interval by 1.5 up to 10 minutes (MAX_INTERVAL), successes shrink it by two thirds, through the new internal IncrementalBackoff. “invalid” re-registers at once, “blacklisted” stops the loop, and “failed” (any non-success HTTP status) drops back to registering.
  • Unregister is sent when the loop exits after a successful registration. OnBeginShutdown calls CancelRemainingBeat(recreateSignal: false) to cut the wait short. In 1.22.7 SendUnregister cleared the token before sending it.
  • URLs. SendRequestAsync<T> builds the address with new Uri(new Uri(MasterserverUrl), apiPath) instead of string concatenation. The default URL ends in /servers/, so nothing changes; a custom URL without the trailing slash loses its last segment (inferred from Uri rules). Requests are HTTP/1.1 and a bad parse or failure returns a ResponsePacket with status “failed”, “error” or “timeout” instead of throwing or staying silent.

Server query answer. ServerMain keeps the answer in CurrentServerQueryAnswer (internal readonly Packet_ServerQueryAnswer) and its framed bytes in currentServerQueryAnswerSerialized, rebuilt by the internal UpdateServerQueryAnswer(). The constructor sets ServerVersion and NetworkVersion; config load sets Name, MaxPlayers, Password and ServerDescription; save-game load sets PlayStyle; HandleClientLoaded and DisconnectPlayer change PlayerCount; the heartbeat sets PublicKey. A mod that changes the server’s name or description by writing ServerConfig directly must also update CurrentServerQueryAnswer and call UpdateServerQueryAnswer() (both need reflection), or the browser keeps showing the old values (inferred).

Member (1.22.7) 1.23.0-pre.1 What to do
ServerSystemHeartbeat.TryRegister() (public) removed; private tryStartBeating() No public trigger. Changing ServerConfig.AdvertiseServer raises onAdvertiseChanged, which starts or cancels the loop
ServerSystemHeartbeat.SendHeartbeat() (public), private Tick() removed; private enterHeartbeatLoop() -
ServerSystemHeartbeat.SendUnregister() (public) removed; sent when the loop exits CancelRemainingBeat(bool recreateSignal = true) (public) ends the current wait
private SendRegister(), Config_onAdvertiseChanged(), Config_onUpnpChanged() removed; private onRelevantConfigChanged(), currentStatePermitsBeating(); the UPnP config handler is a lambda -
static async void SendRequestAsync<T>(string url, T, Action<ResponsePacket>) (private) async Task<ResponsePacket> SendRequestAsync<T>(string apiPath, T, ECDsa?, CancellationToken) (private instance) Generic and async: patch the state machine or avoid
fields token, mods, heartbeatTaskRunning, upnpComplete modPackets, task, beatCts, upnpSuccessful; static DEFAULT_INTERVAL, MAX_INTERVAL, DEFAULT_PLAYSTYLE; the token lives in ServerConfig.ServerToken Malformed LastLaunchPlaystyle/LastLaunchMods JSON now falls back to defaults with a warning instead of throwing
HeartbeatPacket, Vintagestory.Server.ModPacket, PlaystylePacket, RegisterRequestPacket, UnregisterPacket (public classes) internal structs with required members Not reachable without reflection; a patch parameter typed as the old class will not bind
RegisterRequestPacket fields adds fqdn (from ServerConfig.FQDN), token, _nonce (random per request); icon, serverUrl, gameDescription, vhIdentifier nullable; icon no longer defaults to "" -
Vintagestory.Server.ResponsePacket (public class) internal class, nullable status and data -
Vintagestory.Client.NoObf.ModPacket, Vintagestory.Client.NoObf.ResponsePacket (public classes) required members and [JsonObject(ItemRequired = Required.Always)] A master-server reply missing a field now throws on deserialisation. The constructors carry the compiler’s “required members” obsolete-error marker, so build with C# 11 or later and set every member
- ServerMain.CurrentServerQueryAnswer, UpdateServerQueryAnswer() (internal) See above
Member (1.22.7) 1.23.0-pre.1 What to do
VSWebClient.DownloadAsync(string, Stream, IProgress<Tuple<int, long>>? = null, CancellationToken = default) DownloadAsync(Uri, Stream, DownloadProgressDelegate, CancellationToken); all parameters required Pass a callback (a null one throws); it is called with (0, total) first, then after every chunk, even when the server sends no length
StreamExtensions.CopyToAsync(Stream, Stream, int, IProgress<int>? = null, CancellationToken = default) CopyToAsync(Stream, Stream, int, long? sizeTotal, DownloadProgressDelegate, CancellationToken); pooled buffer; argument checks removed; new DefaultCopyBufferSize (81920) Progress reports are long
Vintagestory.ModDb.ModDbUtil.DownloadProgressDelegate (nested) Vintagestory.Common.DownloadProgressDelegate(long downloadedBytes, long? totalBytes) Re-target
NetConstants.ApiServerURL, StableVersionURL, UnstableVersionURL, ReleaseMetaDataURL (internal const) https:// instead of http:// Constants are inlined into callers

InventoryNetworkUtil (public) moved its raw-data entry points to SerializedData and the server player type; see the API chapter for IInventoryNetworkUtil. The engine’s own ServerSystemInventory calls the HandleClientPacket(IPlayer, int, Packet_Client) overload, which is unchanged.

Member (1.22.7) 1.23.0-pre.1 What to do
HandleClientPacket(IPlayer, int, byte[]) (public virtual) HandleClientPacket(IServerPlayer, int, SerializedData); deserialises through a pooled copy (ArrayPoolReturner<byte>) Override or patch the new signature
SendInventoryRollback(IServerPlayer, int packetId, ReadOnlySpan<byte> packetData) (public virtual) SendInventoryRollback(IServerPlayer, int forClientPacketId, SerializedData forClientPacketData) As above
RevertPlayerItemstackMove(IPlayer, string[], int[]) (protected virtual) renamed Send2Slots(IPlayer, string[], int[]); same body Re-target overrides and patches
handleFlipItemstacksPacket(IPlayer, Packet_Client) (private) checks dirty inventories straight from the packet fields; the invIds, slotIds and lastChanged arrays are built only after the tab switch; calls Send2Slots on failure Transpilers anchored on the array set-up break

The network version is not in NetConstants; it is GameVersion.NetworkVersion, a const the compiler inlines. It went from "1.22.6" to "1.23.2" (in the API it is now OverallMajorMinor + ".2"), while the game version is "1.23.0-pre.1". It is baked into ClientPackets (the identification packet), ServerMain.HandlePlayerIdentification (exact string comparison), ClientSystemStartup (the client’s check of the server), the server’s Packet_ServerIdentification and the query answer. AuthServerComm sends serverversion = "1.23.0-pre.1" to the auth server.

The framing and the login token exchange are unchanged, so a 1.22.x client and a 1.23 server (or the reverse) get as far as the identification packet and then disconnect with the disconnect-wrongversion message: mixed-version play is not possible. Mods are unaffected by this check; their own NetworkVersion travels in the identification packet’s mod list as before. A mod that compares against GameVersion.NetworkVersion carries the value it was compiled with and must be rebuilt.

Cosmetic or near-cosmetic. ClientPackets and AuthServerComm changed only version strings. ServerSystemNotifyPing, the server NetworkAPI’s channel-list send and ServerPackets changed only call targets (SendPacket(client, ...) instead of the id) or typed their out variables; the first two no longer reach SendPacket(int, Packet_Server). DummyTcpNetClient and DummyTcpNetServer replaced Monitor.Enter/Exit with lock (different IL, same behaviour). ConnectedClient gained recentChunkRequestsCount (used by chunk sending), and its ToString() now references the runtime’s System.Runtime.CompilerServices.InlineArray4<T> instead of a compiler-generated inline-array type, which changes the IL a transpiler sees. Packet_ClientIdEnum and Packet_ServerIdEnum only reordered one constant each. GrowableCyclicByteArray and DownloadProgressDelegate are new; Vintagestory.Server.Network.ClientPacket is new and internal.

The main loop (ServerMain.Process) and the start-up phase order are unchanged. What moved is around them: how a connection becomes a ConnectedClient, how join and mode-change requests are checked, how entities are spawned and despawned, and how the server shuts down.

  • Developer mode. StartServerArgs has a new internal JSON field DeveloperMode; ServerMain.InDeveloperMode and ServerAPI.InDeveloperMode (the new IServerAPI.InDeveloperMode, see the API chapter) read it, and ServerMain.Launch passes it to the AssetManager constructor as a third argument.
  • Connections and the server query. ServerMain.ProcessNetMessage no longer creates a ConnectedClient on NetworkMessageType.Connect (that case now does nothing). A client is created on the first Data message, and only if its packet id is LoginTokenQuery (33). A ServerQuery (15) is answered on the network thread from a cached, pre-serialised Packet_ServerQueryAnswer and the socket is shut down; any other first packet is dropped. The cache is ServerMain.CurrentServerQueryAnswer (internal), rebuilt by the internal UpdateServerQueryAnswer() on join, leave, config load, save-game load (play style) and the /serverconfig setters for name, description, max clients and password. A mod that changes ServerConfig.ServerName and the like directly will not see the answer change (inferred). The field lastClientId is gone. Socket reading uses NetServer.TryReadMessage(out msg) (see Networking).
  • Join checks (HandlePlayerIdentification, private). Network version is "1.23.2". Whitelist and ban lookups are by player UID only (WhitelistedPlayersByUID, BannedPlayersByUID); an entry that matched by name alone no longer matches. The “Invalid join data” branch (null name or UID) now returns; in 1.22.7 it fell through to the ban check. FinalizePlayerIdentification clamps the client’s view distance to Config.MaxChunkRadius * 32.
  • Mode change requests (HandleRequestModeChange, private). A request that targets another player is refused outright without Privilege.commandplayer (1.22.7 still applied the view distance in that case and only gated fly, game mode and picking range). The view distance is now clamped to MaxChunkRadius * 32 and logged to the audit log; DesiredViewDistance is no longer written here (see Players below). The broadcast Packet_PlayerMode now carries RenderMetaBlocks.
  • Chat. HandleChatMessage(IServerPlayer, int groupId, string) (parameter renamed from groupid) refuses a message to a group the sender is not a member of (“You are not part of the group …”). Group ids below GlobalConstants.ServerInfoChatGroup are mapped to GlobalConstants.GeneralChatGroup in HandleChatLine.
  • Entity packets. HandleEntityPacket builds an Entity.CachedAccessPerms, calls the new Entity.OnReceivedClientPacket(IServerPlayer, int, SerializedData, ref CachedAccessPerms) first and then the old byte[] overload (API chapter).
  • Join. After sending server assets, HandleRequestJoin calls PlayerAnimationManager.OnActiveSlotChanged(ActiveHotbarSlot) on the joining player’s entity.
  • Spawning and loading entities. SpawnEntity(Entity, EntityProperties) now spawns with the type you pass; in 1.22.7 it ignored it and looked the type up from entity.Code. LoadEntity and SpawnEntity_internal read the onFirstSpawn argument of AfterInitialized from a new entity attribute "onFirstSpawn" (default false when loading, true when spawning) and then remove the attribute, so a mod can set it before spawning or loading.
  • Despawning. DespawnEntity calls GameMain.OnEntityDespawn(entity, data), which calls entity.OnEntityDespawn(data) and then unregisters the entity’s colliders from the new collision scene. A patch on Entity.OnEntityDespawn still runs; a transpiler on DespawnEntity sees a different call.
  • Shutdown. Stop(...) now closes the save database (chunkThread.gameDatabase.CloseConnection()) right after the last tick, before sockets close. Anything that touches GameDatabase after that, for example in a mod’s Dispose, gets an InvalidOperationException (inferred from GameDatabase.openedConnection). Dispose() also disposes CollisionScene.
  • Console and signals. Console commands run with Caller.FromConsole() (same role, privileges and group as before). ServerConsole handles /stop on the console thread: during start-up it sets exitState.Mode = SoftExit, in standby it calls Environment.Exit(0). ServerProgram.OnExit (SIGTERM, SIGINT, SIGQUIT) no longer enqueues server.Stop("External close event ...") on the main thread; it sets server.exitState.Mode and the standalone loop then calls Stop("Stop through standalone server exit request", mode). A standalone server still in standby now exits instead of ignoring the signal. A patch that matched the old stop reason string will not fire.
  • Logging. ServerLogger’s constructor sets ILogger.instance.Value and, if unset, ILogger.fallback (API chapter).
  • New public members a mod may want: ServerMain.SeedWorldgen, GetTotalUnpausedTimeMs(), GetTotalUptimeMs(), TriggerDidPlaceBlock(IPlayer, int, BlockSelection, ItemStack) and TriggerDidBreakBlock(IPlayer, int, BlockSelection); the last two run the full core and mod event chain, which includes the anti-abuse counter (see below). They implement new IServerWorldAccessor members (API chapter).
1.23.0-pre.1
// ServerMain.SpawnEntity(Entity, EntityProperties), 1.22.7
SpawnEntity_internal(GetEntityType(entity.Code), entity);
SpawnEntity_internal(type, entity);
// ServerMain.SpawnEntity_internal(EntityProperties, Entity), 1.22.7
entity.AfterInitialized(onFirstSpawn: true);
// 1.23.0-pre.1
entity.AfterInitialized(entity.Attributes.GetBool("onFirstSpawn", defaultValue: true));
entity.Attributes.RemoveAttribute("onFirstSpawn");
Member (1.22.7) 1.23.0-pre.1 What to do
ServerMain.lastClientId (private) removed Client ids come from GenerateClientId() inside ProcessNetMessage
ServerMain.ProcessNetMessage, Connect case creates nothing; client made on first LoginTokenQuery data packet Move connect-time patches to the Data branch or to HandlePlayerIdentification
ServerMain.HandleChatMessage(IServerPlayer, int groupid, string) parameter renamed groupId; membership check added Rename in patches that bind parameters by name
ServerMain.SpawnEntity(Entity, EntityProperties) uses the EntityProperties argument Pass the right type; 1.22.7 callers that passed anything got entity.Code’s type
ServerMain.DespawnEntity calls GameMain.OnEntityDespawn Patch Entity.OnEntityDespawn or GameMain.OnEntityDespawn
ServerMain.Stop(...) closes the database after the last tick Do database work before Stop returns
- ServerMain.InDeveloperMode, ServerAPI.InDeveloperMode (public) Read instead of client settings
- ServerMain.CurrentServerQueryAnswer (internal), UpdateServerQueryAnswer() (internal) Update both if you change advertised server data
- ServerMain.SeedWorldgen, GetTotalUnpausedTimeMs(), GetTotalUptimeMs(), TriggerDidPlaceBlock(...), TriggerDidBreakBlock(...) (public) See the API chapter

Every server.SendPacket(client.Id, ...) in the server systems became server.SendPacket(client, ...) or SendPacket(IServerPlayer, ...), and every BroadcastPacket(packet) became BroadcastPacket(packet, default(ReadOnlySpan<IServerPlayer>)). The new signatures are listed under “Server broadcast and send methods”; the call-site change alters the IL of ServerSystemCalendar, ServerSystemWorldAmbient, ServerSystemUnloadChunks, ServerSystemSendChunks, ServerSystemInventory, ServerSystemEntitySimulation, ServerSystemBlockSimulation, PhysicsManager and ServerWorldMap.

ServerConfig gained fields and a new anti-abuse level, and its config version moved from "1.10" to "1.12" with two migration steps. ServerConfig is still read and written with Newtonsoft (MemberSerialization.OptIn).

  • Anti-abuse. AntiAbuse now defaults to EnumProtectionLevel.Auto (was Off) and a config older than "1.11" that has Off is migrated to Auto. The level the server acts on is the new, unsaved ServerConfig.RuntimeAntiAbuse, set by ServerSystemLoadConfig.SetRuntimeAntiAbuseLevel(ServerMain) at config load and whenever Password, WhitelistMode or AntiAbuse is set (their setters now raise the new events onPasswordChanged, onWhitelistmodeChanged, onAntiAbuseChanged) and when /allowlan toggles. With Auto:

    Server RuntimeAntiAbuse
    Singleplayer, LAN closed Off
    Singleplayer, LAN open LogOnly
    Dedicated, whitelist On or Default, or password set LogOnly
    Dedicated, whitelist Off and no password Basic (moderates: reverts, rejects and bans)

    Any other AntiAbuse value is copied through. LogOnly (3) and Auto (4) are numerically above Basic (1), so a mod that tests Config.AntiAbuse >= EnumProtectionLevel.Basic, as the engine did in 1.22.7, now reads Auto as “on”. Use RuntimeAntiAbuse.ShouldLog() / ShouldModerate() (API chapter).

  • Config migration in ServerConfig load: below "1.11", AntiAbuse Off becomes Auto and Privilege.minbrightness is granted to the sumod and crmod roles; below "1.12", an http:// master server URL becomes https://. New default roles include minbrightness.

  • Renamed and added settings. AntiAbuseTriggerOnBlockBreakCount is removed with no migration, so a saved value is dropped and AntiAbuseTriggerOnBlockBreakPlaceCount starts at its default of 40. New: AntiAbuseTriggerOnBlockBreakPlaceCountSlow (2500) and AntiAbuseTriggerOnDurationSlowMin (5). Also new: FQDN and ServerToken (used by the heartbeat, see “Master server”). Several string properties are now nullable-annotated (ServerUrl, ServerDescription, Ip, LastLaunchMods, LastLaunchPlaystyle).

  • Read-only servers. ServerProgramArgs.Readonly (--readonly) opens the save with requireWriteAccess: false, skips repair mode and the database upgrade, and makes GameDatabase drop every write (see “Save games, the database and the worldgen seed”). It cannot create a new save.

  • Map sizes. WorldConfig.ClampToValidMapSize(int, int) and IsValidMapSize(int, int) (public static) are new: sizes are clamped to 32..max and rounded up to a multiple of 32. The world config’s worldHeight is clamped on load.

Member (1.22.7) 1.23.0-pre.1 What to do
ServerConfig.AntiAbuseTriggerOnBlockBreakCount (public) removed Use AntiAbuseTriggerOnBlockBreakPlaceCount; it also counts placements
ServerConfig.AntiAbuse auto-property property with backing field antiAbuse, setter raises onAntiAbuseChanged Read RuntimeAntiAbuse for the level in force
ServerConfig.Password, WhitelistMode auto-properties backing fields password, whitelistMode; setters raise events A patch on the old compiler-generated backing field breaks
- ServerConfig.RuntimeAntiAbuse (public, not saved) Check this, not AntiAbuse
- ServerConfig.AntiAbuseTriggerOnBlockBreakPlaceCountSlow, AntiAbuseTriggerOnDurationSlowMin, FQDN, ServerToken New settings
- ServerSystemLoadConfig.SetRuntimeAntiAbuseLevel(ServerMain) (public static) Call after changing config fields the level depends on
- StartServerArgs.DeveloperMode (internal), ServerProgramArgs.Readonly (public) New start-up switches
- WorldConfig.ClampToValidMapSize, IsValidMapSize (public static) Use for map-size validation

Save games, the database and the worldgen seed

Section titled “Save games, the database and the worldgen seed”

The save now holds two seeds. SaveGame.SeedWorldgen (protobuf member 41, public field) drives terrain; Seed is a random value unrelated to terrain. SaveGame.CreateNew takes SeedWorldgen from the configured seed or a random one and always randomises Seed. A world from 1.22 or earlier is migrated once in ServerSystemLoadAndSaveGame.LoadSaveGame (internal type, private method): when SeedWorldgen == 0 and the world config has no swappedSeed attribute, SeedWorldgen takes the old Seed, Seed is re-randomised, swappedSeed is set to true and the save game is stored at once. ServerMain.SeedWorldgen, WorldAPI.SeedWorldgen (throws before the world is loaded, like Seed) and WorldgenWorldAccessor.SeedWorldgen implement the new IServerWorldAccessor.SeedWorldgen and IWorldManagerAPI.SeedWorldgen (API chapter). ISaveGame has no SeedWorldgen, so ISaveGame.Seed is the random seed. The client still receives only Seed (CreatePacketIdentification), so client code cannot derive terrain from the seed any more.

Engine code that now reads SeedWorldgen: ServerSystemSupplyChunks.InitWorldgenAndSpawnChunks (the Random used to search for the default spawn), ServerSystemEntitySpawner (the LCGRandom passed to every RuntimeSpawnConditions.Initialise), and the worldgen error log in ServerSystemSupplyChunks, which prints both seeds. Still on Seed: ServerSystemCalendar builds GameCalendar with SaveGameData.Seed, whose sunset and super-moon noise is seeded from it, so a migrated world gets different sunset and super-moon variation (inferred). BlockAccessorWorldGen does not read either seed; its WorldgenWorldAccessor is now built from server instead of the cast worldAccessor field (same object, inferred). The base game’s worldgen is the other side of this change: see the base game mods chapter. Worldgen code that reads World.Seed or WorldManager.Seed must read SeedWorldgen.

Edge case (inferred, not run): a new world whose configured seed is "0" gets SeedWorldgen == 0 and no swappedSeed flag, so the next load treats it as a 1.22 world and replaces its terrain seed with the random Seed.

SaveGame.GetSeedWorldgenForGUI() returns Seed for an unmigrated world and SeedWorldgen otherwise; WorldConfig.loadFromSavegame and the single-player world editor use it. /info seed now prints SeedWorldgen; the new /info seedsh prints Seed.

1.23.0-pre.1
// SaveGame.CreateNew(ServerConfig), 1.22.7
saveGame.Seed = ((!config.Seed.HasValue) ? new Random(Guid.NewGuid().GetHashCode()).Next() : config.Seed.Value);
saveGame.SeedWorldgen = config.Seed ?? new Random(Guid.NewGuid().GetHashCode()).Next();
saveGame.Seed = new Random(Guid.NewGuid().GetHashCode()).Next();
// ServerSystemLoadAndSaveGame.LoadSaveGame(), 1.23.0-pre.1 (existing-save branch)
if (server.SaveGameData.SeedWorldgen == 0 && !server.SaveGameData.WorldConfiguration.HasAttribute("swappedSeed"))
{
server.SaveGameData.SeedWorldgen = server.SaveGameData.Seed;
server.SaveGameData.Seed = new Random(Guid.NewGuid().GetHashCode()).Next();
server.SaveGameData.WorldConfiguration.SetBool("swappedSeed", value: true);
needsSaving = true;
}
  • SaveGame.EnsureValidMapSize() (public, returns true if it changed anything) replaces the Math.Min clamps in CreateNew and SetNewWorldConfig. It also runs on every load of an existing save: a world whose size is not a multiple of 32, or out of range, is resized, a warning is logged and the save game is stored.
  • LoadSaveGame now stores the save game immediately when it moved player data out of the save, applied SetDefaultSpawnOnce, fixed the map size or migrated the seed. After either branch it calls gameDatabase.ClearStageData() and publishes the play style to the server query answer.
  • SaveGame.LoadWorldConfig reads with BinarySpanReader and TreeAttribute.FromBytes(ref BinarySpanReader).
  • OnBeginConfiguration logs a warning in read-only mode, passes !progArgs.Readonly as requireWrite to ProbeOpenConnection, and skips repair mode and DatabaseUpgrader when read-only. The call to gameDatabase.UpgradeToWriteAccess() is gone.
  • Version strings: CreatedGameVersion, LastSavedGameVersion (WillSave), ServerChunk.GameVersionCreated and ServerMapRegion.createdGameVersion are "1.23.0-pre.1".
  • Staging tables. Format v2 saves gain stagechunk, stagemapchunk and stagemapregion. Dirty chunks, map chunks and map regions written on unload (ServerSystemUnloadChunks.SaveDirtyUnloadedChunks and SaveDirtyMapRegions) now go to the staging tables via SetStage*. Loads (ServerSystemSupplyChunks.TryLoadChunkColumn, TryLoadMapChunk, TryLoadMapRegion) read the staging table first and fall back to the main table. Each save pass (SaveAllDirtyMapRegions, SaveAllDirtyMapChunks, SaveAllDirtyLoadedChunks) first moves staged entries into the main tables (MoveStage*, one transaction each). LoadSaveGame clears the staging tables at start-up, so data unloaded after the last full save is discarded if the server stops without saving (inferred intent: the main tables always hold a consistent save). A tool or mod that reads chunk, mapchunk or mapregion directly may miss entries that are still staged; /db prune (ForAllChunks) only walks the main table.
  • Read-only. GameDatabase.ReadOnly (public, set from requireWriteAccess) makes Vacuum, SetChunks, SetMapChunks, SetMapRegions, SetStage*, MoveStage*, ClearStageData, Delete*, SetPlayerData and StoreSaveGame(SaveGame, FastMemoryStream) silently do nothing. StoreSaveGame(SaveGame) and the backups are not guarded. In read-only mode the base SQLiteDBConnection.OpenOrCreate skips CreateTablesIfNotExists, so a save that 1.23 has never opened for writing has no staging tables, OnOpened leaves the getStage*Cmd commands null, and GetStageChunk is not guarded (inferred: a NullReferenceException on the first chunk load).
  • GameDatabase is sealed; its private field conn is now connection and every call goes through the private openedConnection property, which throws InvalidOperationException before open or after dispose. CloseConnection() is public. OpenConnection throws ArgumentOutOfRangeException for an unknown database version. GetSaveGame() returns null if no connection is open.
  • Player data table. CreateTablesIfNotExists now creates playerdata (playeruid TEXT PRIMARY KEY, data BLOB) and calls TryMigrate(), which rebuilds an old table (with the playerid column) keeping the row with the lowest playerid per UID; duplicate entries are dropped. SetPlayerData is a single prepared INSERT OR REPLACE.
  • Prepared commands. SQLiteDbConnectionv2 prepares its player-data, game-data and map-region commands once in OnOpened. StoreGameData no longer opens its own transaction (it still takes transactionLock). ChunkExists(ulong, DbCommand) and GetChunk(ulong, DbCommand) no longer dispose the command passed in (1.22.7’s using DbCommand cmd = preparedCmd; disposed the prepared command). BackupPartial reads inside one transaction with its own commands and writes in batches.
Member (1.22.7) 1.23.0-pre.1 What to do
GameDatabase (public class) sealed Wrap it instead of subclassing
GameDatabase.conn (private) connection, accessed through openedConnection Update reflection
GameDatabase.CloseConnection() (internal) public Call directly
GameDatabase.UpgradeToWriteAccess() (public) removed Open with requireWriteAccess: true
IGameDbConnection.UpgradeToWriteAccess() removed (also from SQLiteDbConnectionv1, SQLiteDbConnectionv2) Remove from implementations
- IGameDbConnection.GetStageChunk, GetStageMapChunk, GetStageMapRegion, SetStageChunks, SetStageMapChunks, SetStageMapRegions, MoveStageChunks, MoveStageMapChunks, MoveStageMapRegions, ClearStageData A custom IGameDbConnection must implement all ten (SQLiteDbConnectionv1 throws NotImplementedException)
- the same ten on GameDatabase (with (x, y, z, dimension) and (x, z) coordinates), GameDatabase.ReadOnly Read staged data when you read the database
SQLiteDbConnectionv2.CreateTablesIfNotExists(SqliteConnection) (protected override) CreateTablesIfNotExists() The base method lost its parameter too (API chapter)
- SQLiteDbConnectionv2.TableExists(string), TryMigrate(), MigratePlayerData() (public) New
SaveGame.Seed random, not the terrain seed Use SeedWorldgen for anything terrain-related
- SaveGame.SeedWorldgen, EnsureValidMapSize(), GetSeedWorldgenForGUI() (public) New
ServerSystemUnloadChunks.SaveDirtyUnloadedChunks, SaveDirtyMapRegions (private) write to staging tables Patches that expect the main tables updated on unload must wait for the next save

Chunks on the server: generation, loading, sending, unloading

Section titled “Chunks on the server: generation, loading, sending, unloading”
  • Block entities. WorldChunk.BlockEntities is a Dictionary<int, BlockEntity> keyed by BlockPos.ToIndex3d() and is created on first read (see “Block accessors, the world map and chunk data”). ServerChunk works on the blockEntities field directly and treats null as empty: RemoveEntitiesAndBlockEntities, GetBlockEntitiesPackets, FastSerializeBlockEntities* and the packet builder skip or count zero, the unpack path creates the dictionary before filling it, and ClearAll now sets it to null inside packUnpackLock. FastSerializeBlockEntitiesCount now always writes the count field, also when it is zero. Iterations in ServerSystemSupplyChunks (chunk-loaded block entity init) and WorldAPI (chunk column unload) changed to KeyValuePair<int, BlockEntity>. A transpiler or postfix that indexed by BlockPos breaks.
  • Unpacking. ServerChunk unpacks entities, block entities and decors with BinarySpanReader and calls Entity.FromBytes(ref BinarySpanReader, bool, ...) and TreeAttribute.FromBytes(ref BinarySpanReader) (API chapter). A corrupted block entity header now continues (same effect as the old goto).
  • ServerChunkTrimmed (new public [ProtoContract] class) holds only protobuf members 12 (GameVersionCreated), 17 (BlocksPlaced) and 18 (BlocksRemoved) of a ServerChunk. The /db prune command deserialises it instead of a full ServerChunk.
  • Prune (ServerSystemSupplyChunkCommands.prune, private). All work, including collecting land-claim columns, moved into the background delegate. Claims are pre-expanded into a set of kept columns instead of a rectangle test per chunk. A chunk that fails to deserialise is logged and skipped (1.22.7 rethrew). Progress is logged.
  • Sending (ServerSystemSendChunks, internal). Chunk generation requests are now throttled per client with the new public field ConnectedClient.recentChunkRequestsCount: sendAndEnqueueChunks decrements it by one each call and zeroes it for creative and spectator players; loadSendableChunksAtCurrentRadius scales the per-tick request budget down once the count exceeds eight budgets, collects missing columns in the new workingSendList and queues them under one requestedChunkColumnsLock. A missing column now counts as “sent or requested” only when AutoGenerateChunks is on, and counts even beyond the request budget. When the budget is throttled to zero the method returns 0, which the caller reads as “radius done” and advances CurrentChunkSentRadius (inferred side effect).
  • Generation and loading (ServerSystemSupplyChunks). The “created before this version” test for map region upgrades compares with "1.23.0" (was "1.22.7"). The start-up progress log counts completed columns returned by CleanupRequestsQueue() instead of loadedChunks.Count.
  • ServerWorldMap adds GetChunk(FastBlockPos) and GetBlockEntity(FastBlockPos) overrides (see “Block accessors, the world map and chunk data”).
  • Worldgen accessor. WorldgenWorldAccessor (internal) adds SeedWorldgen, CollisionScene, TriggerDidPlaceBlock, TriggerDidBreakBlock (forwarded) and GetTotalUnpausedTimeMs() / GetTotalUptimeMs(), which throw NotImplementedException. GetRecipeRegistry(string) became GetCustomRegistry(string) and still throws.
Member (1.22.7) 1.23.0-pre.1 What to do
ServerChunk use of BlockEntities (Dictionary<BlockPos, BlockEntity>) blockEntities (Dictionary<int, BlockEntity>, may be null) Key by pos.ToIndex3d(); null-check the field
- ServerChunkTrimmed (public) Use to read chunk statistics cheaply
- ConnectedClient.recentChunkRequestsCount (public field) Reset it to lift the throttle for a client
- ServerSystemSendChunks.workingSendList (private) New
ServerSystemSupplyChunks.TryLoadChunkColumn, TryLoadMapChunk, TryLoadMapRegion read staging table first Patches that substitute data must handle both reads
WorldgenWorldAccessor.GetRecipeRegistry(string) GetCustomRegistry(string) Not usable from worldgen either way
- WorldgenWorldAccessor.GetTotalUnpausedTimeMs(), GetTotalUptimeMs() Throw; use the main ServerMain
  • Ban and whitelist storage. PlayerDataManager keeps bans and whitelist entries in Dictionary<string, PlayerEntry> keyed by player UID. Name-based matching and the UID back-fill that GetPlayerBan / GetPlayerWhitelist did are gone, so entries without a UID no longer match anyone. Loading uses Dictionary.Add(entry.PlayerUID, entry), so a file entry with a null or duplicate UID throws while PlayerDataManager.Load() runs (inferred: not traced how start-up handles it).
  • Serializer. playerdata.json, playergroups.json, playersbanned.json and playerswhitelisted.json are now read and written with JsonUtil.SerializeFastToFile / DeserializeFastFromFile (System.Text.Json with IncludeFields), not Newtonsoft. Newtonsoft attributes on these types no longer decide what is saved: ServerPlayerData.PermaPrivileges and DeniedPrivileges (internal) gained [JsonInclude], and the PlayerGroupMemberships alias gained [System.Text.Json.Serialization.JsonIgnore]. A mod that relies on Newtonsoft attributes, settings or converters for these files must check the new output. An empty file now loads as an empty list instead of stopping the server.
  • Dates. FirstJoinDate and LastJoinDate are written as ISO 8601 ("O"). On load, TryLoadISODateTimes rewrites any old value containing a space (including LastCharacterSelectionDate), parsing with the current culture, then en-US for AM/PM strings, then en-GB, else now.
  • ServerWorldPlayerData. On the server, DesiredViewDistance is never written any more (it stays 0); use LastApprovedViewDistance or Viewdistance, which is now clamped to the server maximum. The LastApprovedViewDistance setter throws InvalidOperationException (in 1.22.7 it recursed into itself). PreviousPickingRange has [DefaultValue(100)]. Inventories and the player entity are read with BinarySpanReader.
  • ServerPlayer. Disconnect(string) renamed its parameter to logMessage, and a new virtual Disconnect(string logMessage, string playerMessage) and SendPlayerRedirect(string host, string name) were added (IServerPlayer, API chapter); ServerConsolePlayer overrides both Disconnects as no-ops. The explicit IPlayer.IsInInteractionRangeOf(BlockPos, float) is replaced by public IsInInteractionRangeOf(FastBlockPos, float slack = 0.25f), and the internal static isInInteractionRangeOf(IPlayer, IBlockAccessor, FastBlockPos, float) takes a FastBlockPos.
  • ServerPlayerInventoryManager. The private field server is gone; the constructor is now a primary constructor and the ServerMain lives in the compiler-generated field <server>P. DropItem(ItemSlot, bool fullStack) has no default for fullStack and returns false if the player has no "ground" inventory. OnPlayerDisconnect closes and removes non-player inventories in one pass.
  • ServerSystemInventory (internal). HandleSelectedHotbarSlot also calls InventoryPlayerHotbar.UpdateOffhandHungerPenalty(player). HandleCreateItemstack only fills a creative slot if slot.CanHold(...) accepts the stack. HandleHandInteraction caps held-item use catch-up at 100 steps (was 5000) and its range checks follow the anti-abuse rules below.
Member (1.22.7) 1.23.0-pre.1 What to do
PlayerDataManager.BannedPlayers (List<PlayerEntry>, public) BannedPlayersByUID (Dictionary<string, PlayerEntry>) Look up by UID
PlayerDataManager.WhitelistedPlayers (List<PlayerEntry>, public) WhitelistedPlayersByUID (Dictionary<string, PlayerEntry>) Look up by UID
PlayerDataManager.GetPlayerBan(string, string), GetPlayerWhitelist(string, string) (public) removed BannedPlayersByUID.TryGetValue(uid, ...); check UntilDate yourself
PlayerDataManager.GetPlayerEntry(...) (private) removed -
PlayerDataManager.UnWhitelistPlayer(string playername, string playeruid) UnWhitelistPlayer(string playeruid) Drop the name
ServerPlayer.Disconnect(string message) Disconnect(string logMessage) plus Disconnect(string logMessage, string playerMessage) Rename bound parameter; override both if you override one
ServerPlayer explicit IPlayer.IsInInteractionRangeOf(BlockPos, float) public IsInInteractionRangeOf(FastBlockPos, float) Pass a FastBlockPos
ServerPlayerInventoryManager.server (private field) removed; <server>P Update reflection
ServerPlayerInventoryManager.DropItem(ItemSlot, bool fullStack = false) DropItem(ItemSlot?, bool fullStack) Pass fullStack explicitly
ServerWorldPlayerData.DesiredViewDistance (server) never set Use LastApprovedViewDistance

Anti-abuse, interaction checks and the block logger

Section titled “Anti-abuse, interaction checks and the block logger”

The anti-abuse monitor now counts placements as well as breaks, adds a slow window, and every interaction check reads ServerConfig.RuntimeAntiAbuse: at LogOnly it writes to the audit log and lets the action through, at Basic or Pedantic it also reverts or rejects. Because the default became Auto, a public dedicated server (whitelist off, no password) now runs at Basic; 1.22.7 servers mostly ran with it Off.

  • PlayerAntiAbuseMonitor. It subscribes to EventManager.DidPlaceBlock as well as DidBreakBlock, each calling PlayerBlockBreaks.RecordPlaceBreak(ElapsedMs, ElapsedMinutes). OnServerTick (every second) does nothing when RuntimeAntiAbuse is Off; it skips players with gamemode or controlserver; once a minute it checks the slow window (AntiAbuseTriggerOnBlockBreakPlaceCountSlow events within AntiAbuseTriggerOnDurationSlowMin minutes, moderatePlayerSlow), otherwise the burst window (moderatePlayer(uid, limit)). Both log to the audit log and ban and kick only when ShouldModerate(); in 1.22.7 any level above Off banned. RemoveInactivePlayers replaces the inline cleanup. The handlers index BlockEventsByPlayer[uid] directly, so a mod that calls the new TriggerDidPlaceBlock / TriggerDidBreakBlock for a player who has not joined gets a KeyNotFoundException (inferred), and mod-triggered placements count towards the ban threshold.
  • Block place and break (ServerSystemBlockSimulation.TryModifyBlockInWorld, private). The range check uses IsInInteractionRangeOf(pos) with the default slack of 0.25 (was 0.7) and no longer exempts players with the pickingrange privilege (their picking range still counts through PickingRange). A new check rejects a placement whose supporting block, on the clicked face, is air. Only mode 0 (break) and 1 (place) are handled; any other mode returns false. The block-place branch was restructured (inverted if), which changes the IL a transpiler sees.
  • Block interaction (HandleBlockInteract): range slack is the default 0.25 (was 0); catch-up loops for step, stop and cancel are capped at 100 steps with a warning (new internal const ServerSystemBlockSimulation.InteractStepsCatchupLimit, though the loops use the literal). HandleBlockEntityPacket calls the new BlockEntity.OnReceivedClientPacket(IServerPlayer, int, SerializedData, ref CachedAccessPerms) and then the old byte[] overload (API chapter).
  • Held-item use (ServerSystemInventory.HandleHandInteraction): block and entity range are checked separately; a held item whose collectible attributes have handUseAntigriefCheck: true used on an air position is logged and, when moderating, rejected with the slots resent.
  • Entity interaction (ServerSystemEntitySimulation.HandleEntityInteraction): out-of-range is logged, and only returns when moderating.
  • Block logger. ServerSystemBlockLogger.DidPlaceBLock is renamed DidPlaceBlock. Break lines now end with " using <code> TT:<tier>" and the item’s buffs attribute values when the held item is a tool (new private static GetToolAndBuffInfo(ItemStack)), which matters to anything that parses the build log.
// ServerSystemBlockSimulation.TryModifyBlockInWorld, 1.22.7
bool pickRangeAllowed = server.PlayerHasPrivilege(player.ClientId, Privilege.pickingrange);
if (server.Config.AntiAbuse >= EnumProtectionLevel.Basic && !pickRangeAllowed && !((IPlayer)player).IsInInteractionRangeOf(pos, 0.7f))
{ ... return false; }
// 1.23.0-pre.1
if (server.Config.RuntimeAntiAbuse.ShouldLog())
{
if (!player.IsInInteractionRangeOf(pos)) { /* audit */ if (server.Config.RuntimeAntiAbuse.ShouldModerate()) { ... return false; } }
if (cmd.Mode == 1)
{
FastBlockPos attachingPos = pos.AddCopy(BlockFacing.ALLFACES[cmd.OnBlockFace].Opposite);
if (server.blockAccessor.GetBlockId(attachingPos) == 0) { /* audit "place a block in air" */ ... }
}
}
Member (1.22.7) 1.23.0-pre.1 What to do
PlayerAntiAbuseMonitor.BlockBreakEventsByPlayer (public) BlockEventsByPlayer Rename
PlayerAntiAbuseMonitor.TriggerOnBlockBreakCount (public static) TriggerOnBlockBreakPlaceCount; plus TriggerOnBlockBreakPlaceSlowCount, TriggerOnDurationSlowMin Rename
PlayerAntiAbuseMonitor.moderatePlayer(string) (private) moderatePlayer(string, int blockBurstLimitCount); new moderatePlayerSlow(string, int) Patch both to catch every ban
PlayerAntiAbuseMonitor.ElapsedMs (private) public; new public ElapsedMinutes, slowCounter -
- PlayerAntiAbuseMonitor.EventManager_DidPlaceBlock, RemoveInactivePlayers (private) New
PlayerBlockBreaks.EventsRingBuffer, LastIndex, TotalEvents (public) BurstBuffer, BurstLastIndex, BurstTotalEvents; new SlowBuffer, SlowBufferMinute, SlowTotalEventsCache Rename; record through RecordPlaceBreak
- PlayerBlockBreaks.RecordPlaceBreak, RecordSlow, GetSlowTotals, ClearBurst, SlotForSlow (public) New
ServerSystemBlockLogger.DidPlaceBLock (private) DidPlaceBlock Fix the name in patches

The spawner’s hook points moved. OnTrySpawnGroupNearOffthread is gone. OnTrySpawnEntity no longer runs on the main thread in EntitySpawnerResult.Spawn: it runs in ServerSystemEntitySpawner.TrySpawnSomethingAt_offthrad, which is on the dedicated spawner thread unless the server runs with reduced threads, once per candidate position and before CanSpawnAt_offthread. The position it receives is the candidate block’s centre (spawnPosition.ToVec3d().Add(0.5, 0.005, 0.5)), not the final spawn position, and handlers get the shared server.blockAccessor from that thread. A handler that swaps the ref EntityProperties now changes the type that CanSpawnAt_offthread tests. A new OnEntityGroupSpawning(Entity[] spawningEntities, long herdId) fires on the main thread after a group’s entities are created and queued in DelayedSpawnQueue (so they are not yet in the world); it also fires with an empty array when none passed CheckCanSpawnAt.

  • Herd ids are drawn once per TrySpawnSomethingAt_offthrad call (was once per Spawn), consumed even when nothing spawns, and shared by every group that call finds (inferred from the code: the loop does not return after queueing a group).
  • SpawnOppurtunity (class) is now the struct SpawnOpportunity with HerdId, OriginalType and a constructor. EntitySpawnerResult.DoSpawn(...) returns the created Entity and uses each opportunity’s own HerdId and OriginalType.
  • Group size rounding uses GameMath.RoundRandom(rand, val); the LCGRandom for spawn conditions is seeded with SeedWorldgen.
  • PhysicsManager. PrepareEntitySpawns now loops over clientCount * 3 position entries; 1.22.7 stopped at clientCount, so with several players only the first third were tested when deciding who receives a new entity. DoWork asks entity.IsControlledByServer(mountableSupplier) (new virtual on Entity, API chapter) instead of testing for a live player controller inline; override it to take over control of a mount.
  • EntityPosExtensions.maxMovePerPacket (private const) is now public MaxMovePerPacket (still 128).
// EntitySpawnerResult.Spawn(ServerMain, ServerSystemEntitySpawner), 1.22.7 (main thread)
if (server.EventManager.TriggerTrySpawnEntity(server.blockAccessor, ref props, so.Pos, herdid))
{
DoSpawn(server, props, so.Pos, herdid, originalType);
totalSpawned++;
}
// 1.23.0-pre.1 (main thread; the TrySpawnEntity test has moved to the spawner thread)
spawningEntities.Add(DoSpawn(server, so.ForType, so.Pos, so.HerdId, so.OriginalType));
...
server.EventManager.TriggerEntityGroupSpawning(spawningEntities.ToArray(), spawnPositions[0].HerdId);
Member (1.22.7) 1.23.0-pre.1 What to do
SpawnOppurtunity (public class) SpawnOpportunity (public struct; HerdId, OriginalType, constructor) Rename; it is a value type now
EntitySpawnerResult.spawnPositions (List<SpawnOppurtunity>), .ctor(List<SpawnOppurtunity>, SpawnState) List<SpawnOpportunity> Update reflection
EntitySpawnerResult.DoSpawn(...) (private static, void) returns Entity Postfixes can read __result
ServerSystemEntitySpawner call to TriggerTrySpawnGroupNearOffthread removed Use OnTrySpawnEntity (now off-thread) or OnEntityGroupSpawning
PhysicsManager.PrepareEntitySpawns loop bound clientCount * 3 -
EntityPosExtensions.maxMovePerPacket (private const) MaxMovePerPacket (public const) Constants are inlined; nothing to patch
Member (1.22.7) 1.23.0-pre.1 What to do
ServerEventManager.OnTrySpawnGroupNearOffthread (event and field) removed; OnEntityGroupSpawning (EntityGroupDelegate) Subscribe to the new event (API chapter)
ServerEventManager.TriggerTrySpawnGroupNearOffthread(IBlockAccessor, EntityProperties, BlockPos) (public virtual bool) removed; TriggerEntityGroupSpawning(Entity[], long) (public virtual void) Uses the shared Trigger(...) helper, so exceptions are logged per handler
CoreServerEventManager.TriggerTrySpawnGroupNearOffthread (override) TriggerEntityGroupSpawning override: core handlers, then mod handlers -
ServerEventAPI.OnTrySpawnGroupNearOffthread (internal type) OnEntityGroupSpawning, forwarding to ModEventManager -
- ServerEventAPI.OnSchematicExport, OnSchematicImport, TriggerSchematicExport(...), TriggerSchematicImport(...), TriggerEntityGroupSpawning(...) New events on IServerEventAPI (API chapter); the engine itself does not raise the schematic events

The game-world-save trigger in ServerEventManager no longer throws when a static method is registered while the frame profiler is on (val.Target?.ToString() ?? val.Method.ToString()). DidPlaceBlock and DidBreakBlock are raised as before from ServerSystemBlockSimulation.HandleBlockPlaceOrBreak, and now also by any caller of ServerMain.TriggerDidPlaceBlock / TriggerDidBreakBlock.

  • /player <name> grant|revoke|deny|removedeny <privilege> (CmdPlayer). The new private static canModifyProtectedPrivileges(Caller, string, string, string, out TextCommandResult) refuses root always and controlserver unless the caller has root, with an audit line. grantPrivilege removes a denial first (DeniedPrivileges.Remove); if the player’s role then already grants the privilege it stops there and notifies the target, where 1.22.7 also added it as a permanent privilege. All four skip the chat notice when you target yourself and log with format arguments instead of interpolation.
  • /role <role> spawnpoint set (OnSpawnpointSetCmd) rejects positions outside the world.
  • /whitelist add|remove, /player <name> whitelist and /list banned (CmdGlobalList, internal) use the UID dictionaries.
  • /debug (CmdDebug). helddurability, heldtemperature, heldcoattr and heldstattr and their private handlers (getSetCollectibleAttr, getSetItemstackAttr, getSetItemStackAttr) moved to VSEssentials (ModSystemHeldCommands, base game mods chapter), which also adds /heldname and /helddesc. /debug octagonpoints uses LastApprovedViewDistance.
  • /entity wipeall and its private WipeAllHandler and entityTypeMatches are removed; nothing in the engine or the base game sources replaces them.
  • /info seed returns SeedWorldgen; new /info seedsh returns Seed.
  • /serverconfig (CmdServerConfig, internal). Setting ServerName, ServerDescription, MaxClients or removing the password refreshes the server query answer. /serverconfig password <word> casts its string argument to bool after storing it, which throws (inferred: the password is still set, the query answer is not updated and the command reports an error). /serverconfig modwhitelist add seeds an empty ModIdWhiteList with game, survival and creative before adding, and refuses duplicates.
  • /allowlan (CmdToggleAllowLan) recomputes RuntimeAntiAbuse after opening or closing the LAN socket.
  • /execute as (CmdExecuteAs) builds its caller with Caller.FromEntity(entity, privileges), which now also sets Caller.Pos. Player chat commands go through Caller.FromPlayer(player, groupId) in ChatCommandApi.Execute (the client overload now also gets a Pos). See the API chapter for Caller.
  • /moddb (CmdModDBUtil, internal) calls the renamed ModDbUtil handlers (onSearchForCurrentGameVersionCommand, onSearchForCompatibleWithCurrentGameVersionCommand, onSearchForSpecificGameVersionCommand, onSearchForCompatibleGameVersionCommand).
  • /stats prints Version: 1.23.0-pre.1; /time calls the generic IndexOf<string> extension.
  • New privilege Privilege.minbrightness is in the default sumod and crmod roles and granted to them by the config migration (API chapter).
Member (1.22.7) 1.23.0-pre.1 What to do
CmdDebug.getSetCollectibleAttr, getSetItemstackAttr, getSetItemStackAttr (private) removed (now VSEssentials) Patch ModSystemHeldCommands
CmdEntity.WipeAllHandler, entityTypeMatches (private) removed Register your own command
- CmdPlayer.canModifyProtectedPrivileges(...) (private static) Patch to change who may grant controlserver
CmdPlayer.grantPrivilege, revokePrivilege, denyPrivilege, removeDenyPrivilege (private) early return from the new check; locals renamed (plrdata to targetPlayerData); grantPrivilege uses a local function Re-check transpilers
CmdInfo seed subcommand returns SeedWorldgen; seedsh added -

Server files with cosmetic or call-site-only changes

Section titled “Server files with cosmetic or call-site-only changes”

PlayerRole, CmdGlobalList, CmdStats, CmdTime, CmdDebug and ServerSystemSupplyChunkCommands now format with the runtime’s System.Runtime.CompilerServices.InlineArrayN<object> instead of the compiler-generated <>y__InlineArrayN<object>, which changes the generic type tokens a transpiler would match. ServerSystemRemapperAssistant.OnCmdApplyall renamed locals and deconstructs the pair (new locals). ServerSystemModHandler calls ModLoader.LoadMods(EnumAppSide.Server, ...) (see Mods). ServerAPI.ServerIp reads NetServer.ListenIp (see Networking). ServerCoreAPI.PlatformUtils is new (API chapter). ServerSystemCalendar, ServerSystemWorldAmbient (also reads with BinarySpanReader), ServerSystemUnloadChunks, ServerSystemEntitySimulation, PhysicsManager, ServerWorldMap and ServerMapRegion otherwise only changed send call sites or version strings. ServerProgram and CmdStats version strings read 1.23.0-pre.1 (ServerProgramArgs help heading: 1.23.0). GameCalendar gained GetSeason, GetSeasonRel and GetHemisphere overloads taking (double x, double z); the BlockPos forms forward to them and no longer throw for a null position (API chapter).

  • ConcurrentTagRegistryFast gains public TagSetFast CreateTagSet(params ReadOnlySpan<string> tags). Unlike TryCreateTagSet, it throws for a tag that is not registered. It takes the read lock unless the registry has been locked.
  • IncrementalBackoff (internal struct, new) is a retry interval with IncreaseInterval(float factor = 1.5f), DecreaseInterval(float factor = 2/3), ResetInterval() and an implicit conversion to TimeSpan. The server heartbeat and the client’s multiplayer screen use it.
  • AssemblyVersion and AssemblyFileVersion are 1.23.0.0 and 1.23.0.
  • References: ICSharpCode.SharpZipLib is gone (the only user was ModContainer), and the game no longer ships the DLL (see the bundled libraries chapter). No new assembly references; zip work uses System.IO.Compression from the runtime.
  • New embedded resource AssetSchemas.DialogueAsset.schema.json (see “Assets and origins”).
  • Compiler-generated types, which matter only to reflection on their names:
    • The <>y__InlineArray4, 5, 6 and 8 structs are gone. Code that builds Path.Combine and string.Format argument spans now uses the runtime’s System.Runtime.CompilerServices.InlineArrayN<T>. This changes the generic type arguments in the IL of CleanInstallCheck, ModContainer.LoadModInfo and similar methods.
    • New <>z__ReadOnlyArray<T> and <>z__ReadOnlySingleElementList<T> back collection expressions, for example in ModCompilationContext and AssetSchemaExporter.
    • The source-generated regex type (GetHtmlTagRegex) is unchanged in logic. Its generated class name changed hash, and it is now made by System.Text.RegularExpressions.Generator 10.0.14 (was 10.0.13).
  • The game version is inlined as a constant in several places, so it changed in their IL:
    • CleanInstallCheck looks for assets/version-1.23.0-pre.1.txt;
    • EntityTypeNet passes "1.23.0-pre.1" to AnimationMetaData.FromBytes;
    • AssetSchemaExporter stamps and compares "1.23.0-pre.1".

Cosmetic or near-cosmetic, no action unless a transpiler counts IL:

File Change IL effect
InventoryPlayerBackpacks one internal constant added none
CleanInstallCheck version string and inline-array type generic arguments change
ModLoader.DisableMods Count() became Count one call fewer
ModLoader (the FormatException catch) throw ex became throw stack trace is now preserved
ModContainer (the ReflectionTypeLoadException handling) pattern variable exr adds a local
PlayerInventoryManager nullable annotations, expression-bodied members, Find rewritten with LINQ locals, calls and closures change throughout; re-derive any transpiler

A complete, mechanical list of every type and member of VintagestoryLib that was added, removed or changed between 1.22.7 and 1.23.0-pre.1, private members included, taken from the compiled metadata of both assemblies. Compiler-generated types and members (closures, state machines, inline arrays, backing fields) are left out. Search it for the type or member you patch.

How to read the tables:

  • Change. added and removed are whole members. changed pairs an old signature with its new one (a changed type, parameter, return type, accessibility, modifier or [Obsolete] message). overload added is a new overload of a method that kept its old overloads. type added, type removed and type changed describe the type itself (kind, sealing, base types).
  • Signatures are written in C# style with namespaces left off. = … marks a parameter with a default value. Constructors are written with the type’s name. Explicit interface implementations keep their interface prefix.
  • Reach. public means a mod can use the member without reflection: a public or protected member of a public type. internal means anything else (private, internal, or any member of a non-public type); you need reflection, Harmony or a publicised reference to reach it. public → internal marks a member or type that lost its public reach.
  • A member listed under its declaring type only. Inherited members are not repeated on derived types.
Change 1.22.7 1.23.0-pre.1 Reach
added - public int Alpha public
added - public const int AlphaFieldID = 3 public
added - public void SetAlpha(int value) public
Change 1.22.7 1.23.0-pre.1 Reach
added - public string BleedCornerOverlayTexture public
added - public const int BleedCornerOverlayTextureFieldID = 113 public
added - public int DamageType public
added - public const int DamageTypeFieldID = 114 public
added - public int KnockbackStrength public
added - public const int KnockbackStrengthFieldID = 115 public
added - public void SetBleedCornerOverlayTexture(string value) public
added - public void SetDamageType(int value) public
added - public void SetKnockbackStrength(int value) public
added - public void SetSourceFilePath(string value) public
added - public string SourceFilePath public
added - public const int SourceFilePathFieldID = 116 public
Change 1.22.7 1.23.0-pre.1 Reach
added - public int DamageType public
added - public const int DamageTypeFieldID = 50 public
added - public string[] GetHeldTpHitCombo() public
added - public int GetHeldTpHitComboCount() public
added - public string[] GetHeldTpHitComboHigh() public
added - public int GetHeldTpHitComboHighCount() public
added - public string[] GetHeldTpHitComboLow() public
added - public int GetHeldTpHitComboLowCount() public
added - public string[] GetHeldTpHitComboMid() public
added - public int GetHeldTpHitComboMidCount() public
added - public string[] HeldTpHitCombo public
added - public void HeldTpHitComboAdd(string value) public
added - public int HeldTpHitComboCount public
added - public const int HeldTpHitComboFieldID = 51 public
added - public string[] HeldTpHitComboHigh public
added - public void HeldTpHitComboHighAdd(string value) public
added - public int HeldTpHitComboHighCount public
added - public const int HeldTpHitComboHighFieldID = 52 public
added - public int HeldTpHitComboHighLength public
added - public int HeldTpHitComboLength public
added - public string[] HeldTpHitComboLow public
added - public void HeldTpHitComboLowAdd(string value) public
added - public int HeldTpHitComboLowCount public
added - public const int HeldTpHitComboLowFieldID = 54 public
added - public int HeldTpHitComboLowLength public
added - public string[] HeldTpHitComboMid public
added - public void HeldTpHitComboMidAdd(string value) public
added - public int HeldTpHitComboMidCount public
added - public const int HeldTpHitComboMidFieldID = 53 public
added - public int HeldTpHitComboMidLength public
added - public string HeldTpHitSprintAnimation public
added - public const int HeldTpHitSprintAnimationFieldID = 55 public
added - public int KnockbackStrength public
added - public const int KnockbackStrengthFieldID = 56 public
added - public void SetDamageType(int value) public
added - public void SetHeldTpHitCombo(string[] value) public
added - public void SetHeldTpHitCombo(string[] value, int count, int length) public
added - public void SetHeldTpHitComboHigh(string[] value) public
added - public void SetHeldTpHitComboHigh(string[] value, int count, int length) public
added - public void SetHeldTpHitComboLow(string[] value) public
added - public void SetHeldTpHitComboLow(string[] value, int count, int length) public
added - public void SetHeldTpHitComboMid(string[] value) public
added - public void SetHeldTpHitComboMid(string[] value, int count, int length) public
added - public void SetHeldTpHitSprintAnimation(string value) public
added - public void SetKnockbackStrength(int value) public
added - public void SetSourceFilePath(string value) public
added - public string SourceFilePath public
added - public const int SourceFilePathFieldID = 57 public
Change 1.22.7 1.23.0-pre.1 Reach
added - public void SetTypeid(int value) public
added - public int Typeid public
added - public const int TypeidFieldID = 4 public
Change 1.22.7 1.23.0-pre.1 Reach
added - public int HealthDurationSec public
added - public const int HealthDurationSecFieldID = 8 public
added - public int HealthTicks public
added - public const int HealthTicksFieldID = 9 public
added - public int SatietyLossDelay public
added - public const int SatietyLossDelayFieldID = 7 public
removed public int SaturationLossDelay - public
removed public const int SaturationLossDelayFieldID = 7 - public
added - public void SetHealthDurationSec(int value) public
added - public void SetHealthTicks(int value) public
added - public void SetSatietyLossDelay(int value) public
removed public void SetSaturationLossDelay(int value) - public
Change 1.22.7 1.23.0-pre.1 Reach
removed public string GameMode - public
removed public const int GameModeFieldID = 5 - public
removed public string MOTD - public
removed public const int MOTDFieldID = 2 - public
added - public string NetworkVersion public
added - public const int NetworkVersionFieldID = 9 public
added - public string PlayStyle public
added - public const int PlayStyleFieldID = 5 public
added - public byte[] PublicKey public
added - public const int PublicKeyFieldID = 8 public
added - public string ServerDescription public
added - public const int ServerDescriptionFieldID = 2 public
removed public void SetGameMode(string value) - public
removed public void SetMOTD(string value) - public
added - public void SetNetworkVersion(string value) public
added - public void SetPlayStyle(string value) public
added - public void SetPublicKey(byte[] value) public
added - public void SetServerDescription(string value) public
Change 1.22.7 1.23.0-pre.1 Reach
added - public bool EnsureValidMapSize() public
added - public int GetSeedWorldgenForGUI() public
added - public int SeedWorldgen public
Change 1.22.7 1.23.0-pre.1 Reach
removed public override NetIncomingMessage ReadMessage() - public
removed public override void Send(byte[] data) - public
added - public override void SendUncompressed(byte[] data) public
added - public override bool TryReadMessage(out NetIncomingMessage message) public
Change 1.22.7 1.23.0-pre.1 Reach
added - public override void OnScreenLoaded() public
Change 1.22.7 1.23.0-pre.1 Reach
changed private void beginInstallation() private void beginInstallation(CancellationToken ct) internal
added - private CancellationTokenSource cancelCts internal
added - private readonly Stopwatch debounceStopwatch internal
removed private int failedMods - internal
added - private Task installAsync(CancellationToken ct) internal
Change 1.22.7 1.23.0-pre.1 Reach
added - public long LastStatusUpdateMs internal
Change 1.22.7 1.23.0-pre.1 Reach
changed public GuiScreenGetUpdate(string versionnumber, ScreenManager screenManager, GuiScreen parentScreen) public GuiScreenGetUpdate(string versionNumber, ScreenManager screenManager, GuiScreen parentScreen) internal
removed private CancellationTokenSource _gameReleaseDownloadCts - internal
removed private CancellationTokenSource _gameReleaseVersionCts - internal
added - private CancellationTokenSource downloadCTS internal
removed private void downloadInstaller(GameReleaseVersion release) - internal
added - private Task downloadInstallerAsync(GameReleaseVersion release, CancellationToken cancellationToken) internal
removed private void onProgress(object sender, Tuple<int, long> progress) - internal
removed private void onReleasesDownloadComplete(Exception errorExc) - internal
removed private Dictionary<string, GameReleaseVersion> releases - internal
removed private string versionnumber - internal
added - private readonly string versionNumber internal
Change 1.22.7 1.23.0-pre.1 Reach
removed private float accum - internal
Change 1.22.7 1.23.0-pre.1 Reach
removed private void OnClickCellLeft(int cellIndex) - internal
Change 1.22.7 1.23.0-pre.1 Reach
changed private IGuiElementCell createCellElem(SavegameCellEntry cell, ElementBounds bounds) private IGuiElementCell createCellElem(ServerCellEntry cell, ElementBounds bounds) internal
added - private readonly HashSet<ServerCellEntry> currentlyProbingCells internal
removed private List<SavegameCellEntry> LoadServerEntries() - internal
added - private void LoadServerEntriesAndStartConnectionTests() internal
added - private void OnNewScrollbarValue(float value) internal
removed private void OnNewScrollbarvalue(float value) - internal
added - public override void OnScreenUnload() public
added - private Task<bool> ProbeServerAsync(ServerCellEntry cell, string host, string nameForLog, CancellationToken ct) internal
added - private static readonly ReadOnlyMemory<byte> rawProbePacket internal
added - private readonly List<ServerCellEntry> serverCells internal
added - public void ServerCellSetError(ServerCellEntry cell) public
added - private void ServerCellStartUpdatingProbingIndicator(ServerCellEntry cell) internal
added - private void ServerCellStopUpdatingAndHideProbingIndicator(ServerCellEntry cell) internal
added - private void ServerCellUpdateWithQueryAnswer(ServerCellEntry cell, Packet_ServerQueryAnswer queryAnswer, int ping) internal
added - private readonly List<MultiplayerServerEntry> serverEntries internal
removed private List<MultiplayerServerEntry> serverentries - internal
added - private Task StartProbingServerAsync(ServerCellEntry cell, string host, string nameForLog, CancellationToken ct) internal
added - private CancellationTokenSource stillLookingAtThisScreenCTS internal
Change 1.22.7 1.23.0-pre.1 Reach
removed public void ProcessSlow() - internal
added - public void ProcessSlowAsync() internal
Change 1.22.7 1.23.0-pre.1 Reach
type removed public class - public
Change 1.22.7 1.23.0-pre.1 Reach
added - public bool AllowCameraControl { get; set; } public
added - public IAviWriter CreateAviWriter(float framerate, string codec) public
added - public AvailableCodec[] GetAvailableCodecs() public
added - public void GlClearDepthBuffer() public
added - public ICameraAPI MainCamera { get; } public
added - public virtual void RenderWireframeSphere(BlockPos origin, Vec3f center, float radius, int color, int segments = …) public
added - public int WindowHeight { get; } public
added - public int WindowWidth { get; } public
Change 1.22.7 1.23.0-pre.1 Reach
added - internal void AskForConnectToMultiplayer(string host, string password) internal
changed public void ConnectToMultiplayer(string host, string password) internal void ConnectToMultiplayer(Task<ServerConnectData> connectionProvider, string password) public → internal
removed public static void LoadSoundsSlow(ClientMain game) - public
added - public static void LoadSoundsSlowAsync(ClientMain game) public
changed public static void PlaySound(AssetLocation location) public static void PlaySound(AssetLocation location, bool randomizePitch) public
changed public static void PlaySound(string name) public static void PlaySound(string name, bool randomizePitch) public
added - private static Random rand internal
added - private void setupJsonLoadSettings() internal
Change 1.22.7 1.23.0-pre.1 Reach
removed public static ServerConnectData FromHost(string host) - public
added - public static Task<ServerConnectData> FromHostAsync(string host) public
added - internal static Task<ServerConnectData.DnsSvrLookupResult> PerformDnsSvrLookupAsync(string entrySuffix, CancellationToken ct = …) internal
removed private static string ResolveConnectionString(string host) - internal
added - internal static Task<ValueTuple<string, string>> TryResolveConnectionStringAsync(string vsHostingIdentifier, CancellationToken ct = …) internal
Change 1.22.7 1.23.0-pre.1 Reach
type added - internal enum internal
Change 1.22.7 1.23.0-pre.1 Reach
type added - internal struct internal
Change 1.22.7 1.23.0-pre.1 Reach
added - private Hud3DTest hud3DTest internal
added - private TextCommandResult OnCmdHud3DTest(TextCommandCallingArgs args) internal
Change 1.22.7 1.23.0-pre.1 Reach
removed private byte[] data - internal
removed private const int dataLength = 16384 - internal
changed private QueueByte incoming private readonly GrowableCyclicByteArray incoming internal
added - private const int initialIncomingBufferSize = 5242880 internal
removed public override NetIncomingMessage ReadMessage() - public
added - private readonly byte[] receiveBuffer internal
added - private const int receiveBufferLen = 16384 internal
removed private int received - internal
removed public override void Send(byte[] data) - public
added - public override void SendUncompressed(byte[] messageData) public
changed private INetworkConnection tcpConnection private TCPNetworkConnection tcpConnection internal
changed private NetIncomingMessage TryGetMessageFromIncoming() private bool TryGetMessageFromIncoming(out NetIncomingMessage msg) internal
added - public override bool TryReadMessage(out NetIncomingMessage message) public
Change 1.22.7 1.23.0-pre.1 Reach
changed private void HandleConnect(string uri) private static void HandleConnect(string uri) internal
Change 1.22.7 1.23.0-pre.1 Reach
added - public float DeltaTimeLimiter { get; set; } public
changed public bool HideGuis { get; } public bool HideGuis { get; set; } public
added - public bool InDeveloperMode { get; } public
added - public IXPlatformInterface PlatformUtils { get; } public
added - public T RegisterCustomRegistry<T>(string customRegistryCode) public
removed public T RegisterRecipeRegistry<T>(string recipeRegistryCode) - public
Change 1.22.7 1.23.0-pre.1 Reach
added - public Ray GetPickingRayFromMousePosition() public
added - public Ray GetPickingRayFromMousePosition(int mouseX, int mouseY) public
added - public bool[] PreviousKeyboardKeyState { get; } public
Change 1.22.7 1.23.0-pre.1 Reach
added - private readonly object loadLock internal
added - public void Preload() public
Change 1.22.7 1.23.0-pre.1 Reach
changed public bool TryGetCustomTexture(TCTCache vars, int localFace, int worldFace, float[] tfMatrix, MeshData sourceMesh, int faceIndex, int shapeRotationSteps, out CustomTextureResult result) public bool TryGetCustomTexture(TCTCache vars, int localFace, int worldFace, float[] tfMatrix, MeshData sourceMesh, int faceIndex, int shapeRotationSteps, out CustomTextureResult cTexResult) public
Change 1.22.7 1.23.0-pre.1 Reach
changed public static string BuildCacheKey(int baseSubId, int[] bleedSubIds, int[] priorities, int[] overlaySubIds, int rotationSteps = …) public static string BuildCacheKey(int baseSubId, int[] bleedSubIds, int[] priorities, int[] overlaySubIds, int[] cornerOverlaySubIds, int rotationSteps = …) public
added - private static List<int> CollectActiveCorners(int[] cornerOverlaySubIds) internal
changed private static List<ValueTuple<int, int>> CollectActiveOverlayBlends(int[] bleedSubIds, int[] priorities, int[] overlaySubIds) private static List<ValueTuple<int, int>> CollectActiveOverlayBlends(int[] bleedSubIds, int[] priorities, int[] overlaySubIds, bool[] suppressedDirs) internal
changed private void ComposeOnGPU(TextureAtlasManager atlasManager, TextureAtlasPosition basePos, TextureAtlasPosition targetPos, List<ValueTuple<int, int>> activeBlends, int[] overlaySubIds, int rotationSteps) private void ComposeOnGPU(TextureAtlasManager atlasManager, TextureAtlasPosition basePos, TextureAtlasPosition targetPos, List<ValueTuple<int, int>> activeBlends, List<int> activeCorners, int[] overlaySubIds, int[] cornerOverlaySubIds, int rotationSteps) internal
added - private static bool[] ComputeSuppressedDirections(int[] cornerOverlaySubIds) internal
added - private const int CornerCount = 4 internal
added - private static readonly int[] CornerDiagonal internal
added - private static readonly int[] CornerEdgeA internal
added - private static readonly int[] CornerEdgeB internal
added - private static readonly int[] CornerQuadrantRotation internal
changed public int GetOrCreateBlendedTexture(int baseSubId, int[] bleedSubIds, int[] priorities, int[] overlaySubIds, TextureAtlasManager atlasManager, int rotationSteps = …) public int GetOrCreateBlendedTexture(int baseSubId, int[] bleedSubIds, int[] priorities, int[] overlaySubIds, int[] cornerOverlaySubIds, TextureAtlasManager atlasManager, int rotationSteps = …) public
changed private static bool HasAnyOverlayBlend(int[] bleedSubIds, int[] priorities, int[] overlaySubIds) private static bool HasAnyOverlayBlend(int[] bleedSubIds, int[] priorities, int[] overlaySubIds, int[] cornerOverlaySubIds) internal
Change 1.22.7 1.23.0-pre.1 Reach
removed public ModelDataPoolLocation PoolLocation - internal
added - public Dictionary<int, ModelDataPoolLocation> PoolLocations internal
Change 1.22.7 1.23.0-pre.1 Reach
added - private int[] ResolveBleedOverlaySubIds(CompositeTexture overlay, OrderedDictionary<AssetLocation, int> textureNamesDict) internal
Change 1.22.7 1.23.0-pre.1 Reach
added - protected float fov public
removed public float Fov - public
added - public float Fov { get; set; } public
Change 1.22.7 1.23.0-pre.1 Reach
type removed public struct - public
Change 1.22.7 1.23.0-pre.1 Reach
type removed public class - public
Change 1.22.7 1.23.0-pre.1 Reach
removed internal int BlockEntitiesCount - internal
added - internal int uploadedCenterTesselationId internal
added - internal int uploadedEdgeTesselationId internal
Change 1.22.7 1.23.0-pre.1 Reach
added - public float DeltaTimeLimiter { get; set; } public
changed public IXPlatformInterface Forms { get; } public IXPlatformInterface Forms { get; } [Obsolete: Use PlatformUtils] public
changed public bool HideGuis { get; } public bool HideGuis { get; set; } public
added - public IXPlatformInterface PlatformUtils { get; } public
Change 1.22.7 1.23.0-pre.1 Reach
overload added - public void TriggerChunkRetesselated(Vec3i chunkPos, int completedTesselationId) public
Change 1.22.7 1.23.0-pre.1 Reach
removed public bool AllowFreemove - public
added - public int[][] BleedCornerOverlayTextureSubIdsByBlockId public
changed public int[] BleedOverlayTextureSubIdsByBlockId public int[][] BleedOverlayTextureSubIdsByBlockId public
added - public int CurrentGroupId public
removed public int currentGroupid - public
added - private bool entityDebugMode internal
added - public int WindowHeight { get; } public
added - public int WindowWidth { get; } public
Change 1.22.7 1.23.0-pre.1 Reach
added - public Size2i FramebufferSize { get; } public
added - public abstract void GlClearDepthBuffer() public
Change 1.22.7 1.23.0-pre.1 Reach
added - private float accumScrollDeltaX internal
added - private float accumScrollDeltaY internal
added - private HashSet<string> DetectOpenGlCapabilities() internal
added - private Size2i framebuffersize internal
added - public Size2i FramebufferSize { get; } public
added - private const int freshScrollMs = 17 internal
added - public override void GlClearDepthBuffer() public
added - private long lastScrollMs internal
added - private long maxShaderStorageBlockSize internal
added - private void onFramebufferResize(FramebufferResizeEventArgs args) internal
removed private float prevWheelValue - internal
added - private bool supportsBufferStorage internal
removed private bool supportsPersistentMapping - internal
added - private bool supportsSSBOs internal
added - public void UpdateDpiScale() public
added - public void UpdateSoundDevices() public
Change 1.22.7 1.23.0-pre.1 Reach
overload added - public bool IsInInteractionRangeOf(FastBlockPos blockPos, float slack = …) public
removed private bool Vintagestory.API.Common.IPlayer.IsInInteractionRangeOf(BlockPos blockPos, float slack = …) [Obsolete: This signature will change in 1.23. Avoid it for now.] - internal
Change 1.22.7 1.23.0-pre.1 Reach
changed public ClientPlayerInventoryManager(OrderedDictionary<string, InventoryBase> AllInventories, IPlayer player, ClientMain game) public ClientPlayerInventoryManager(OrderedDictionary<string, InventoryBase> allInventories, IPlayer player, ClientMain game) public
removed private ClientMain game - internal
Change 1.22.7 1.23.0-pre.1 Reach
added - public static bool LiquidDepthFullResolution { get; set; } public
added - public static int MaxParallelModDownloads { get; set; } public
added - public static bool RetroMode { get; set; } public
removed public static int WeirdMacOSMouseYOffset { get; set; } - public
Change 1.22.7 1.23.0-pre.1 Reach
added - private TextCommandResult OnCmdColliders(TextCommandCallingArgs args) internal
Change 1.22.7 1.23.0-pre.1 Reach
added - private void ApplyOrQueueAttributes(long entityId, Action<Entity> update) internal
added - private void ApplyPendingAttributes(Entity entity) internal
added - public override void Dispose(ClientMain game) public
added - private readonly Dictionary<long, ValueTuple<Queue<Action<Entity>>, long>> pendingAttributes internal
added - private void RetryPendingAttributes() internal
changed internal static void UpdateBlockEntityData(BlockEntity entity, byte[] data, ClientMain game, bool isNew) internal static void UpdateBlockEntityData(BlockEntity entity, SerializedData data, ClientMain game, bool isNew) internal
Change 1.22.7 1.23.0-pre.1 Reach
overload added - public override BlockEntity GetBlockEntity(FastBlockPos position) public
overload added - public override WorldChunk GetChunk(FastBlockPos pos) public
overload added - internal ClientChunk GetClientChunkAtBlockPos(FastBlockPos pos) internal
Change 1.22.7 1.23.0-pre.1 Reach
type removed public enum - public
Change 1.22.7 1.23.0-pre.1 Reach
type added - public class : Hud3DRaycastElement public
Change 1.22.7 1.23.0-pre.1 Reach
removed private GuiElementItemSlotGrid backpackGrid - internal
added - private GuiElementItemSlotGrid backpackSlotGrid internal
added - private GuiElementItemSlotGrid offHandSlotGrid internal
added - private EnumHandInteract previousHandUse internal
removed private int prevValue - internal
added - private ElementBounds skillSlotBounds internal
added - private void updateHeldInteractionHelp(ItemSlot slot) internal
Change 1.22.7 1.23.0-pre.1 Reach
changed public abstract void Receive(byte[] data, int dataLength, out int total) public abstract int Receive(Span<byte> destination) public
changed public abstract void Send(byte[] data, int length) public abstract void Send(ReadOnlyMemory<byte> data) public
Change 1.22.7 1.23.0-pre.1 Reach
added - public Ray GetPickingRayFromMousePosition() public
added - public Ray GetPickingRayFromMousePosition(int mouseX, int mouseY) public
added - public bool[] PreviousKeyboardKeyState { get; } public
Change 1.22.7 1.23.0-pre.1 Reach
added - private static void AdvanceDecorOffset(ref JsonTesselator.DecorFaceData decor, int k, ref float currentXOff, ref float currentYOff, ref float currentZOff) internal
removed public void ApplyDecorUVs(float[] targetMeshUV, int targetUVIndex, int k, ref float currentXOff, ref float currentYOff, ref float currentZOff) - public
removed public bool CalcAutoUVsForDecor(TCTCache vars, MeshData sourceMesh, int sourceVertexIndex, float[] tfMatrix, ref float currentXOff, ref float currentYOff, ref float currentZOff) - public
removed private int decorFace - internal
removed private float decorSeamAdjustX1 - internal
removed private float decorSeamAdjustX2 - internal
removed private float decorSeamAdjustY1 - internal
removed private float decorSeamAdjustY2 - internal
removed private float decorSeamAdjustZ1 - internal
removed private float decorSeamAdjustZ2 - internal
removed private float decoru1 - internal
removed private float decoru2 - internal
removed private float decorv1 - internal
removed private float decorv2 - internal
removed private int decorVertexOffset - internal
removed public float FindDecorMaxPos(TCTCache vars, MeshData sourceMesh, float[] sourceMeshXYZ, float[] rotatedXyz, int sourceMeshXyzFacesCount, float xOff, float zOff, bool prevRotatedSource) - public
added - private JsonTesselator.FaceGeometry GetFaceGeometry(MeshData source, ref JsonTesselator.PreparedGeometry geometry, int faceIndex, float[] matrix) internal
added - private static bool IsFaceCulled(int drawFaceFlags, ref JsonTesselator.FaceGeometry face) internal
added - private JsonTesselator.PreparedMeshFace[] preparedMeshFaces internal
added - private JsonTesselator.FaceLighting PrepareFaceLighting(int facing) internal
added - private void PrepareWindFlags(MeshData sourceMesh, TCTCache vars) internal
added - private JsonTesselator.PreparedGeometry ResolveMeshGeometry(MeshData sourceMesh, TCTCache vars, float[] tfMatrix) internal
removed public bool SkipDecorFace(TCTCache vars, int i, float[] sourceMeshXYZ) - public
removed private float[] tmpCoords - internal
added - private readonly int[] transformedFacings internal
added - private bool TryPrepareDecorFace(TCTCache vars, MeshData sourceMesh, int sourceVertexIndex, float[] tfMatrix, ref float currentXOff, ref float currentYOff, ref float currentZOff, out JsonTesselator.DecorFaceData decor) internal
added - private bool TryPrepareFaceSurface(TCTCache vars, MeshData sourceMesh, ref JsonTesselator.FaceGeometry faceGeometry, float[] tfMatrix, IJsonTesselatorHooks hooks, int shapeRotationSteps, out JsonTesselator.FaceSurface faceSurface) internal
added - private static void ValidateFaceTopology(MeshData sourceMesh, TCTCache vars) internal
added - private static void WriteDecorUVs(ref JsonTesselator.DecorFaceData decor, float[] targetMeshUV, int targetUVIndex, int k) internal
Change 1.22.7 1.23.0-pre.1 Reach
type added - private struct internal
Change 1.22.7 1.23.0-pre.1 Reach
type added - private enum internal
Change 1.22.7 1.23.0-pre.1 Reach
type added - private enum internal
Change 1.22.7 1.23.0-pre.1 Reach
type added - private struct internal
Change 1.22.7 1.23.0-pre.1 Reach
type added - private struct internal
Change 1.22.7 1.23.0-pre.1 Reach
type added - private struct internal
Change 1.22.7 1.23.0-pre.1 Reach
type added - private struct internal
Change 1.22.7 1.23.0-pre.1 Reach
type added - private struct internal
Change 1.22.7 1.23.0-pre.1 Reach
type added - private struct internal
Change 1.22.7 1.23.0-pre.1 Reach
type added - private struct internal
Change 1.22.7 1.23.0-pre.1 Reach
type added - private struct internal
Change 1.22.7 1.23.0-pre.1 Reach
changed public ModPacket() public ModPacket() public
Change 1.22.7 1.23.0-pre.1 Reach
added - private FastMemoryStream standingStream internal
Change 1.22.7 1.23.0-pre.1 Reach
changed public Ray GetPickingRayByMouseCoordinates(ClientMain game) public Ray GetPickingRayByMouseCoordinates(ClientMain game, int mouseX, int mouseY) public
Change 1.22.7 1.23.0-pre.1 Reach
type changed public class : Camera public class : Camera, ICameraAPI public
added - private ModelTransform Vintagestory.API.Client.ICameraAPI.CameraOffset { get; } internal
added - private float Vintagestory.API.Client.ICameraAPI.CameraShakeStrength { get; } internal
added - private double Vintagestory.API.Client.ICameraAPI.deltaSum { get; } internal
added - private bool Vintagestory.API.Client.ICameraAPI.UpdateCameraPos { get; set; } internal
Change 1.22.7 1.23.0-pre.1 Reach
added - public bool AllowCameraControl { get; set; } public
changed public ModelTransform CameraOffset { get; } public ModelTransform CameraOffset { get; } [Obsolete: Use MainCamera.CameraOffset instead] public
added - public ICameraAPI MainCamera { get; } public
added - private void RenderMesh(BlockPos origin, MeshData mesh) internal
added - public override void RenderWireframeSphere(BlockPos origin, Vec3f center, float radius, int color, int segments = …) public
Change 1.22.7 1.23.0-pre.1 Reach
changed public ResponsePacket() public ResponsePacket() public
Change 1.22.7 1.23.0-pre.1 Reach
changed public ServerListEntry() public ServerListEntry() public
added - public static ServerListEntry MakeFakeEntry() public
Change 1.22.7 1.23.0-pre.1 Reach
changed public ServerListPlaystyle() public ServerListPlaystyle() public
Change 1.22.7 1.23.0-pre.1 Reach
added - public void BindTexture2DArray(string samplerName, int textureId, int textureNumber) public
Change 1.22.7 1.23.0-pre.1 Reach
added - public int ApplyTexture { set; } public
Change 1.22.7 1.23.0-pre.1 Reach
overload added - private void TesselateBlock(Block block, CompositeShape compositeShape, out MeshData modeldata, TextureSource texSource, Nullable<int> quantityElements, string[] selectiveElements, bool withAnimations) internal
added - internal void TesselateBlockForAnimation(Block block, CompositeShape compositeShape, out MeshData modeldata, TextureSource texSource) internal
overload added - private void TesselateItem(Item item, CompositeShape forShape, out MeshData modeldata, bool withAnimations) internal
added - internal void TesselateItemForAnimation(Item item, CompositeShape forShape, out MeshData modeldata) internal
overload added - private void TesselateShape(string type, AssetLocation sourceName, CompositeShape compositeShape, out MeshData modeldata, ITexPositionSource texSource, int generalGlowLevel, byte climateColorMapIndex, byte seasonColorMapIndex, Nullable<int> quantityElements, string[] selectiveElements, bool withAnimations) internal
Change 1.22.7 1.23.0-pre.1 Reach
added - private MultiTextureMeshRef[][] altItemAnimationModelRefsInventory internal
added - private void ApplyInventoryTint(Block block, MeshData modeldata) internal
added - private MultiTextureMeshRef[] blockAnimationModelRefsInventory internal
added - public string[] GetAnimationCodes(ItemStack itemstack, int variant) public
added - private CompositeShape GetAnimationCompositeShape(ItemStack itemstack, int variant) internal
added - public void GetAnimationModel(ItemStack itemstack, int variant, out MultiTextureMeshRef modelRef, out Shape animationShape) public
added - public void GetAnimationModelInfo(ItemStack itemstack, int variant, out MultiTextureMeshRef modelRef, out Shape animationShape) public
added - private UnloadableShape GetAnimationShape(CompositeShape compositeShape) internal
added - private MultiTextureMeshRef[] itemAnimationModelRefsInventory internal
Change 1.22.7 1.23.0-pre.1 Reach
type removed public class : ClientSystem - public
Change 1.22.7 1.23.0-pre.1 Reach
added - private bool ignoreMouseInteractionsUntilRelease internal
added - private bool notAHiddenMetaBlock(BlockPos pos, Block block) internal
added - private bool notMeleeAttackFiltered(BlockPos pos, Block block) internal
Change 1.22.7 1.23.0-pre.1 Reach
added - private readonly Dictionary<long, ValueTuple<AnimationPacket, long>> pendingAnimations internal
added - private void RetryPendingAnimations(float dt) internal
added - private bool TryApplyAnimationPacket(AnimationPacket packet) internal
Change 1.22.7 1.23.0-pre.1 Reach
added - private const int attackAimArrowGap = 12 internal
added - private const int attackAimArrowSize = 10 internal
added - private int attackAimDownTextureId internal
added - private int attackAimLeftTextureId internal
added - private int attackAimRightTextureId internal
added - private const int attackAimSprintArrowGap = 1 internal
added - private int attackAimUpTextureId internal
added - private void DrawAttackAimIndicator(ItemStack heldStack, bool hostile) internal
added - private int GenerateAttackAimArrowTexture(double startX, double startY, double pointX, double pointY, double endX, double endY) internal
added - private readonly Vec4f hostileAimColor internal
Change 1.22.7 1.23.0-pre.1 Reach
added - private readonly Vec4f colliderBoundsColor internal
added - private readonly Matrixf colliderMatrix internal
added - private readonly Cuboidd colliderQueryBounds internal
added - private readonly float[] colliderRotation internal
added - private readonly List<Collider> colliders internal
added - private readonly Vec4f nonblockingColliderColor internal
added - private void renderColliders(int dimension) internal
added - private readonly Vec4f staticColliderColor internal
added - private readonly Vec4f transformedColliderColor internal
Change 1.22.7 1.23.0-pre.1 Reach
removed protected MeshDataPool decalPool - public
added - protected Dictionary<int, MeshDataPool> decalPoolByBlockAtlasId public
added - private MeshDataPool GenPool() internal
added - private void removePoolLocations(Dictionary<int, ModelDataPoolLocation> locations) internal
Change 1.22.7 1.23.0-pre.1 Reach
removed private static int accumTextureId - internal
removed private const int layers = 3 - internal
removed private static int revealTextureId - internal
Change 1.22.7 1.23.0-pre.1 Reach
changed public AfterOIT() public AfterOIT(ICoreClientAPI capi) public
added - private ICoreClientAPI capi internal
Change 1.22.7 1.23.0-pre.1 Reach
removed private void freeResources() - internal
removed private void rebuild() - internal
removed private FrameBufferRef transparentfb - internal
Change 1.22.7 1.23.0-pre.1 Reach
added - private readonly Matrixf selectionMatrix internal
Change 1.22.7 1.23.0-pre.1 Reach
added - private void OnGameTick2000ms(float dt) internal
added - private event Action OnSoundDevicesChanged internal
added - private Action OnSoundDevicesChanged internal
added - private HashSet<string> previousAudioDevices internal
added - private string previousDefaultAudioDevice internal
Change 1.22.7 1.23.0-pre.1 Reach
changed internal Dictionary<BlockPos, BlockEntity> blockEntitiesOfChunk internal Dictionary<int, BlockEntity> blockEntitiesOfChunk internal
Change 1.22.7 1.23.0-pre.1 Reach
added - internal int centerTesselationId internal
added - internal int edgeTesselationId internal
Change 1.22.7 1.23.0-pre.1 Reach
added - private static int[] ApplyOverlays(List<ValueTuple<int[], int, int, EnumColorBlendMode, int, int, int>> overlays) internal
overload added - public static int getAlpha(string tex) public
changed public bool GetOrInsertTexture(AssetLocationAndSource loc, out int textureSubId, out TextureAtlasPosition texPos, CreateTextureDelegate onCreate = …, float alphaTest = …) public bool GetOrInsertTexture(AssetLocationAndSource path, out int textureSubId, out TextureAtlasPosition texPos, CreateTextureDelegate onCreate = …, float alphaTest = …) public
added - private bool GetOrInsertTextureInternal(AssetLocationAndSource loc, out int textureSubId, out TextureAtlasPosition texPos, CreateTextureDelegate onCreate = …, float alphaTest = …, bool addReference = …) internal
added - public bool InsertTextureOrAddReference(CompositeTexture ct, out int textureSubId, out TextureAtlasPosition texPos, float alphaTest = …) public
added - public bool InsertTextureOrAddReference(AssetLocation path, out int textureSubId, out TextureAtlasPosition texPos, CreateTextureDelegate onCreate = …, float alphaTest = …) public
added - public bool InsertTextureOrAddReference(AssetLocationAndSource path, out int textureSubId, out TextureAtlasPosition texPos, CreateTextureDelegate onCreate = …, float alphaTest = …) public
added - public void ReleaseTextureReference(AssetLocation loc) public
added - private object TextureAtlasPositionsByTextureSubId_ResizeLock internal
added - protected Dictionary<AssetLocation, int> textureReferenceCounts public
Change 1.22.7 1.23.0-pre.1 Reach
added - private static readonly int[] CornerEdgeA internal
added - private static readonly int[] CornerEdgeB internal
added - private const int DirE = 2 internal
added - private const int DirN = 0 internal
added - private const int DirS = 1 internal
added - private const int DirW = 3 internal
changed public static TextureBleedHelper.BleedDirections GetBleedDirections(Block[] chunkBlocks, int extIndex3d, int tileSide, Block currentBlock, int[][] fastBlockTextureSubidsByBlockAndFace, int[] overlayTextureSubIdsByBlockId = …) public static TextureBleedHelper.BleedDirections GetBleedDirections(Block[] chunkBlocks, int extIndex3d, int tileSide, Block currentBlock, int[][] fastBlockTextureSubidsByBlockAndFace, int[][] overlayTextureSubIdsByBlockId = …, int[][] cornerOverlayTextureSubIdsByBlockId = …, int posX = …, int posY = …, int posZ = …) public
added - private static bool IsDiagonalRedundant(int[] priorities, int[] overlaySubIds, int[] sourceBlockIds, int diagonal, int cardinal) internal
added - private static int SelectVariant(int[][] subIdsByBlockId, int blockId, int variantSelector) internal
added - private static void SuppressRedundantDiagonals(int[] bleedSubIds, int[] priorities, int[] overlaySubIds, int[] sourceBlockIds) internal
Change 1.22.7 1.23.0-pre.1 Reach
added - public int[] CornerOverlayTextureSubIds public
Change 1.22.7 1.23.0-pre.1 Reach
added - public int IndexBufferId { get; } public
added - public bool OwnsIndexBuffer public
Change 1.22.7 1.23.0-pre.1 Reach
changed public string GetOrCreateDataPath(string foldername) public string GetOrCreateDataPath(string folderName) public
added - public bool InDeveloperMode { get; } public
changed public JsonObject LoadModConfig(string filename) public JsonObject LoadModConfig(string fileName) public
changed public T LoadModConfig<T>(string filename) public T LoadModConfig<T>(string fileName) public
added - public T RegisterCustomRegistry<T>(string customRegistryCode) public
changed public T RegisterRecipeRegistry<T>(string recipeRegistryCode) public T RegisterRecipeRegistry<T>(string recipeRegistryCode) [Obsolete: Use RegisterCustomRegistry instead] public
changed public void StoreModConfig(JsonObject jobj, string filename) public void StoreModConfig(JsonObject jobj, string fileName) public
changed public void StoreModConfig<T>(T jsonSerializeableData, string filename) public void StoreModConfig<T>(T jsonSerializeableData, string fileName) public
Change 1.22.7 1.23.0-pre.1 Reach
type changed public class : IAsset public class : IEquatable<Asset>, IAsset public
overload added - public bool Equals(Asset other) public
removed public string FilePath - public
added - public string FilePath { get; set; } public
added - public string FullFilePath { get; set; } public
Change 1.22.7 1.23.0-pre.1 Reach
type added - public class : IDisposable public
Change 1.22.7 1.23.0-pre.1 Reach
changed public AssetManager(string assetsPath, EnumAppSide side) public AssetManager(string assetsPath, EnumAppSide side, bool debug) public
added - private readonly Dictionary<AssetCategory, AssetCategoryWatcher> categoryWatchers internal
added - public static bool Debug public
overload added - public bool Reload(IAsset asset) public
added - public void RemoveAsset(AssetLocation location) public
added - public void UnwatchCategory(AssetCategory category) public
added - public void WatchCategory(AssetCategory category, AssetChangedDelegate onAssetChanged, string filter = …) public
Change 1.22.7 1.23.0-pre.1 Reach
type added - public static class public
Change 1.22.7 1.23.0-pre.1 Reach
overload added - public Block GetBlock(FastBlockPos pos) public
overload added - public Block GetBlock(FastBlockPos pos, int layer = …) public
overload added - public virtual BlockEntity GetBlockEntity(FastBlockPos position) public
overload added - public T GetBlockEntity<T>(FastBlockPos position) public
overload added - public virtual int GetBlockId(FastBlockPos pos, int layer) public
overload added - public virtual int GetBlockId(FastBlockPos pos) public
overload added - public virtual IWorldChunk GetChunkAtBlockPos(FastBlockPos pos) public
overload added - public virtual Block GetMostSolidBlock(FastBlockPos pos) public
Change 1.22.7 1.23.0-pre.1 Reach
overload added - public Block GetBlock(FastBlockPos pos) public
overload added - public Block GetBlock(FastBlockPos pos, int layer) public
overload added - public BlockEntity GetBlockEntity(FastBlockPos position) public
overload added - public T GetBlockEntity<T>(FastBlockPos position) public
changed public virtual int GetBlockId(BlockPos pos) [Obsolete: Calling code should specify the appropriate BlockLayersAccess. Default is fine in many cases, but BlockLayersAccess.Fluids should be used to check for water, lake ice or lava reliably] public virtual int GetBlockId(BlockPos pos) public
changed public virtual int GetBlockId(int posX, int posY, int posZ) [Obsolete: Calling code should specify the appropriate BlockLayersAccess. Default is fine in many cases, but BlockLayersAccess.Fluids should be used to check for water, lake ice or lava reliably] public virtual int GetBlockId(int posX, int posY, int posZ) public
overload added - public virtual int GetBlockId(FastBlockPos pos) public
overload added - public int GetBlockId(FastBlockPos pos, int layer) public
overload added - public IWorldChunk GetChunkAtBlockPos(FastBlockPos pos) public
removed public T GetInterface<T>(BlockPos pos) - public
overload added - public Block GetMostSolidBlock(FastBlockPos pos) public
Change 1.22.7 1.23.0-pre.1 Reach
added - public T CreateCustomRegistry<T>(string customRegistryCode) public
removed public T CreateRecipeRegistry<T>(string recipeRegistryCode) - public
added - public Dictionary<string, Type> CustomRegistryToTypeMapping public
added - public string GetCustomRegistryCode<T>() public
removed public string GetRecipeRegistryCode<T>() - public
removed public Dictionary<string, Type> RecipeRegistryToTypeMapping - public
added - public void RegisterCustomRegistry(string customRegistryCode, Type customRegistry) public
added - public void RegisterCustomRegistry<T>(string customRegistryCode) public
removed public void RegisterRecipeRegistry(string recipeRegistryCode, Type recipeRegistry) - public
removed public void RegisterRecipeRegistry<T>(string recipeRegistryCode) - public
added - public Dictionary<Type, string> TypeToCustomRegistryMapping public
removed public Dictionary<Type, string> TypeToRecipeRegistryMapping - public
Change 1.22.7 1.23.0-pre.1 Reach
changed public static NatFloat FromPacket(Packet_NatFloat val) public static INatFloat FromPacket(Packet_NatFloat val) public
added - public static Packet_NatFloat Packet_NatFloatOne public
added - public static Packet_NatFloat Packet_Var25Random public
changed public static Packet_NatFloat ToPacket(NatFloat val) public static Packet_NatFloat ToPacket(INatFloat val) public
Change 1.22.7 1.23.0-pre.1 Reach
type added - public sealed class : IDisposable, ICollisionScene public
Change 1.22.7 1.23.0-pre.1 Reach
type added - private struct : IEquatable<CollisionScene.CollisionCell> internal
Change 1.22.7 1.23.0-pre.1 Reach
type added - private sealed class internal
Change 1.22.7 1.23.0-pre.1 Reach
type added - private sealed class internal
Change 1.22.7 1.23.0-pre.1 Reach
overload added - internal static byte[] CompressOffset4(byte[] data, int len, bool reuseBuffer) internal
Change 1.22.7 1.23.0-pre.1 Reach
overload added - internal byte[] Compress(byte[] data, int length, int reserveOffset, bool reuseBuffer) internal
Change 1.22.7 1.23.0-pre.1 Reach
type added - public delegate public
Change 1.22.7 1.23.0-pre.1 Reach
added - protected readonly Dictionary<string, AssetLocation> _pathLookup public
added - public bool TryResolveAsset(string fullPath, out IAsset asset) public
Change 1.22.7 1.23.0-pre.1 Reach
overload added - public EnumHemisphere GetHemisphere(double x, double z) public
overload added - public EnumSeason GetSeason(double x, double z) public
overload added - public float GetSeasonRel(double x, double z) public
Change 1.22.7 1.23.0-pre.1 Reach
type changed public class : IDisposable public sealed class : IDisposable public
added - public void ClearStageData() public
changed internal void CloseConnection() public void CloseConnection() internal → public
removed private IGameDbConnection conn - internal
added - private IGameDbConnection connection internal
added - public byte[] GetStageChunk(int x, int y, int z, int dimension) public
added - public byte[] GetStageMapChunk(int x, int z) public
added - public byte[] GetStageMapRegion(int x, int z) public
changed private ILogger logger private readonly ILogger logger internal
added - public void MoveStageChunks() public
added - public void MoveStageMapChunks() public
added - public void MoveStageMapRegions() public
added - private IGameDbConnection openedConnection { get; } internal
added - public bool ReadOnly { get; private set; } public
added - public void SetStageChunks(IEnumerable<DbChunk> chunks) public
added - public void SetStageMapChunks(IEnumerable<DbChunk> mapchunks) public
added - public void SetStageMapRegions(IEnumerable<DbChunk> mapregions) public
removed public void UpgradeToWriteAccess() - public
Change 1.22.7 1.23.0-pre.1 Reach
added - private Vec3d colliderHitPosition internal
added - private readonly Cuboidd colliderSelectionBounds internal
added - private readonly Ray colliderSelectionRay internal
added - public ICollisionScene CollisionScene { get; } public
added - public Dictionary<string, CustomRegistryBase> customRegistries public
added - public CustomRegistryBase GetCustomRegistry(string code) public
changed public RecipeRegistryBase GetRecipeRegistry(string code) public CustomRegistryBase GetRecipeRegistry(string code) [Obsolete: Use GetCustomRegistry instead] public
added - private BlockSelection getSelectedCollider(IWorldIntersectionSupplier supplier, Ray ray, int dimension, BlockFilter filter) internal
added - public void OnEntityDespawn(Entity entity, EntityDespawnData reason) public
removed public Dictionary<string, RecipeRegistryBase> recipeRegistries - public
added - public T RegisterCustomRegistry<T>(string customRegistryCode) public
changed public T RegisterRecipeRegistry<T>(string recipeRegistryCode) public T RegisterRecipeRegistry<T>(string recipeRegistryCode) [Obsolete: Use RegisterCustomRegistry instead] public
added - private readonly Vec3d selectedColliderHitPosition internal
added - private readonly List<Collider> selectionColliders internal
added - private static double selectionDistanceSq(Ray ray, BlockSelection selection) internal
Change 1.22.7 1.23.0-pre.1 Reach
type added - public class public
Change 1.22.7 1.23.0-pre.1 Reach
added - public override void BeginMultiUpdate() public
added - public override void EndMultiUpdate() public
added - private int multiUpdateDepth internal
added - private bool recipeCheckPending internal
Change 1.22.7 1.23.0-pre.1 Reach
changed public virtual void HandleClientPacket(IPlayer byPlayer, int packetId, byte[] data) public virtual void HandleClientPacket(IServerPlayer byPlayer, int packetId, SerializedData data) public
removed protected virtual void RevertPlayerItemstackMove(IPlayer owningPlayer, string[] invIds, int[] slotIds) - public
added - protected virtual void Send2Slots(IPlayer owningPlayer, string[] invIds, int[] slotIds) public
changed public virtual void SendInventoryRollback(IServerPlayer byPlayer, int packetId, ReadOnlySpan<byte> packetData) public virtual void SendInventoryRollback(IServerPlayer byPlayer, int forClientPacketId, SerializedData forClientPacketData) public
Change 1.22.7 1.23.0-pre.1 Reach
added - internal const int BackpackSlotsCount = 4 internal
Change 1.22.7 1.23.0-pre.1 Reach
added - private int getHotbarSlotIndex(int slotId) internal
added - internal const int MainHandSlotsCount = 10 internal
added - internal const int OffHandSlotIndex = 11 internal
removed protected const int offHandSlotIndex = 11 - public
removed protected const int skillSlotIndex = 10 - public
added - internal const int SkillSlotIndex = 10 internal
added - internal const int SpecialSlotsCount = 2 internal
added - public virtual void UpdateOffhandHungerPenalty(IPlayer player) public
Change 1.22.7 1.23.0-pre.1 Reach
changed public ModCompilationContext() public ModCompilationContext(EnumAppSide side) public
changed private readonly string[] references private readonly List<string> references internal
Change 1.22.7 1.23.0-pre.1 Reach
changed public ModContainer(FileSystemInfo fsInfo, ILogger parentLogger, bool logDebug) private ModContainer() public → internal
added - public static ModContainer CreateIfSourceTypeIsUnderstood(FileSystemInfo fsInfo, ILogger parentLogger, bool enableTraceLogging) public
Change 1.22.7 1.23.0-pre.1 Reach
changed public void LoadMods(List<ModContainer> mods, IEnumerable<string> disabledModsByIdAndVersion = …) public void LoadMods(EnumAppSide side, List<ModContainer> mods, IEnumerable<string> disabledModsByIdAndVersion = …) public
changed public void LoadMods(IEnumerable<string> disabledModsByIdAndVersion = …) public void LoadMods(EnumAppSide side, IEnumerable<string> disabledModsByIdAndVersion = …) public
Change 1.22.7 1.23.0-pre.1 Reach
removed public abstract NetIncomingMessage ReadMessage() - public
removed public abstract void Send(byte[] data) - public
added - public abstract void SendUncompressed(byte[] data) public
added - public abstract bool TryReadMessage(out NetIncomingMessage message) public
Change 1.22.7 1.23.0-pre.1 Reach
changed internal const string ApiServerURL = "http://api.vintagestory.at" internal const string ApiServerURL = "https://api.vintagestory.at" internal
changed internal const string ReleaseMetaDataURL = "http://api.vintagestory.at/stable-unstable.json" internal const string ReleaseMetaDataURL = "https://api.vintagestory.at/stable-unstable.json" internal
changed internal const string StableVersionURL = "http://api.vintagestory.at/lateststable.txt" internal const string StableVersionURL = "https://api.vintagestory.at/lateststable.txt" internal
changed internal const string UnstableVersionURL = "http://api.vintagestory.at/latestunstable.txt" internal const string UnstableVersionURL = "https://api.vintagestory.at/latestunstable.txt" internal
Change 1.22.7 1.23.0-pre.1 Reach
type changed public class public struct public
removed public NetIncomingMessage() - public
added - private const uint LENGTH_MASK = 2147483647 internal
added - private const uint PACKED_FLAG = 2147483648 internal
added - public static void ReadHeaderUnsafe(ReadOnlySpan<byte> rawMessage, out int length, out bool isCompressed) public
removed public static int ReadInt(byte[] readBuf) - public
added - public static void WriteHeaderUnsafe(Span<byte> destination, int length, bool isCompressed) public
removed public static void WriteInt(byte[] writeBuf, int n) - public
added - public static void WriteMessageUnsafe(Span<byte> destination, ReadOnlySpan<byte> data, bool isCompressed) public
Change 1.22.7 1.23.0-pre.1 Reach
added - public string ListenIp { get; } public
removed public string LocalEndpoint { get; } - public
removed public abstract NetIncomingMessage ReadMessage() - public
added - public abstract bool TryReadMessage(out NetIncomingMessage message) public
Change 1.22.7 1.23.0-pre.1 Reach
added - public bool TryResolveAsset(string filePath, out IAsset asset) public
Change 1.22.7 1.23.0-pre.1 Reach
changed public PlayerInventoryManager(OrderedDictionary<string, InventoryBase> AllInventories, IPlayer player) protected PlayerInventoryManager(OrderedDictionary<string, InventoryBase> allInventories, IPlayer player) public
added - public int GetHotbarSlotIndex(int slotId) public
Change 1.22.7 1.23.0-pre.1 Reach
type removed public class - public
Change 1.22.7 1.23.0-pre.1 Reach
type removed public class - public
Change 1.22.7 1.23.0-pre.1 Reach
type added - public static class public
Change 1.22.7 1.23.0-pre.1 Reach
added - internal bool DeveloperMode internal
Change 1.22.7 1.23.0-pre.1 Reach
changed public static Task CopyToAsync(Stream source, Stream destination, int bufferSize, IProgress<int> progress = …, CancellationToken cancellationToken = …) public static Task CopyToAsync(Stream source, Stream destination, int bufferSize, Nullable<long> sizeTotal, DownloadProgressDelegate progressCallback, CancellationToken cancellationToken) public
added - public const int DefaultCopyBufferSize = 81920 public
Change 1.22.7 1.23.0-pre.1 Reach
changed private CancellationTokenSource cts private readonly CancellationTokenSource cts internal
changed private Memory<byte> dataRcvBuf private readonly byte[] dataRcvBuf internal
removed protected void OnBytesReceived(object state) - public
added - public static VintageStorySocket PrepareSocket(string host) public
changed public void Receive(byte[] data, int dataLength, out int total) public int Receive(Span<byte> destination) public
changed private Queue<byte> received private readonly GrowableCyclicByteArray received internal
added - protected Task ReceiveLoop() public
changed public void Send(byte[] data, int length) public void Send(ReadOnlyMemory<byte> data) public
added - private readonly GrowableCyclicByteArray toSendBeforeConnected internal
removed private Queue<byte> tosendBeforeConnected - internal
Change 1.22.7 1.23.0-pre.1 Reach
changed public Task DownloadAsync(string requestUri, Stream destination, IProgress<Tuple<int, long>> progress = …, CancellationToken cancellationToken = …) public Task DownloadAsync(Uri requestUri, Stream destination, DownloadProgressDelegate progressCallback, CancellationToken cancellationToken) public
Change 1.22.7 1.23.0-pre.1 Reach
removed public Dictionary<BlockPos, BlockEntity> BlockEntities - public
added - public Dictionary<int, BlockEntity> blockEntities public
added - public Dictionary<int, BlockEntity> BlockEntities { get; set; } public
overload added - public BlockEntity GetLocalBlockEntityAtBlockPos(FastBlockPos position) public
removed private Dictionary<BlockPos, BlockEntity> Vintagestory.API.Common.IWorldChunk.BlockEntities { get; set; } - internal
Change 1.22.7 1.23.0-pre.1 Reach
added - private const int chunkSize = 32 internal
added - public static int ClampToValidMapSize(int mapSize, int maxSize) public
added - public static bool IsValidMapSize(int mapSize, int maxSize) public
Change 1.22.7 1.23.0-pre.1 Reach
overload added - public abstract BlockEntity GetBlockEntity(FastBlockPos position) public
overload added - public abstract WorldChunk GetChunk(FastBlockPos pos) public
Change 1.22.7 1.23.0-pre.1 Reach
added - public abstract void ClearStageData() public
added - public abstract byte[] GetStageChunk(ulong coord) public
added - public abstract byte[] GetStageMapChunk(ulong coord) public
added - public abstract byte[] GetStageMapRegion(ulong coord) public
added - public abstract void MoveStageChunks() public
added - public abstract void MoveStageMapChunks() public
added - public abstract void MoveStageMapRegions() public
added - public abstract void SetStageChunks(IEnumerable<DbChunk> chunks) public
added - public abstract void SetStageMapChunks(IEnumerable<DbChunk> mapchunks) public
added - public abstract void SetStageMapRegions(IEnumerable<DbChunk> mapregions) public
removed public abstract void UpgradeToWriteAccess() - public
Change 1.22.7 1.23.0-pre.1 Reach
added - public void ClearStageData() public
added - public byte[] GetStageChunk(ulong position) public
added - public byte[] GetStageMapChunk(ulong position) public
added - public byte[] GetStageMapRegion(ulong position) public
added - public void MoveStageChunks() public
added - public void MoveStageMapChunks() public
added - public void MoveStageMapRegions() public
added - public void SetStageChunks(IEnumerable<DbChunk> chunks) public
added - public void SetStageMapChunks(IEnumerable<DbChunk> mapchunks) public
added - public void SetStageMapRegions(IEnumerable<DbChunk> mapregions) public
removed public void UpgradeToWriteAccess() - public
Change 1.22.7 1.23.0-pre.1 Reach
added - public void ClearStageData() public
changed protected override void CreateTablesIfNotExists(SqliteConnection sqliteConn) protected override void CreateTablesIfNotExists() public
added - private SqliteCommand getPlayerDataCmd internal
added - public byte[] GetStageChunk(ulong position) public
added - private SqliteCommand getStageChunkCmd internal
added - public byte[] GetStageMapChunk(ulong position) public
added - private SqliteCommand getStageMapChunkCmd internal
added - public byte[] GetStageMapRegion(ulong position) public
added - private SqliteCommand getStageMapRegionCmd internal
added - public void MigratePlayerData() public
added - private SqliteCommand moveStageChunkCmd internal
added - public void MoveStageChunks() public
added - private SqliteCommand moveStageMapChunkCmd internal
added - public void MoveStageMapChunks() public
added - private SqliteCommand moveStageMapRegionCmd internal
added - public void MoveStageMapRegions() public
added - private SqliteCommand setGameDataCmd internal
added - private SqliteCommand setMapRegionCmd internal
added - private SqliteCommand setPlayerDataCmd internal
added - public void SetStageChunks(IEnumerable<DbChunk> chunks) public
added - private SqliteCommand setStageChunksCmd internal
added - public void SetStageMapChunks(IEnumerable<DbChunk> mapchunks) public
added - private SqliteCommand setStageMapChunksCmd internal
added - private SqliteCommand setStageMapRegionCmd internal
added - public void SetStageMapRegions(IEnumerable<DbChunk> mapregions) public
added - public bool TableExists(string tableName) public
added - public void TryMigrate() public
removed public void UpgradeToWriteAccess() - public
Change 1.22.7 1.23.0-pre.1 Reach
added - public TagSetFast CreateTagSet(ReadOnlySpan<string> tags) public
Change 1.22.7 1.23.0-pre.1 Reach
type added - internal struct internal
Change 1.22.7 1.23.0-pre.1 Reach
changed public int TagId public long TagId public
Change 1.22.7 1.23.0-pre.1 Reach
removed private readonly string commandPrefix - internal
changed public Task<Exception> DownloadModAsync(string fileUrl, string fileName, ModDbUtil.DownloadProgressDelegate progressCallback, CancellationToken cancellationToken = …) public Task<Exception> DownloadModAsync(string fileUrl, string fileName, DownloadProgressDelegate progressCallback, CancellationToken cancellationToken = …) public
removed private void loadVersionIds(GameVersionResponse gameVersions) - internal
removed public void onSearchCommand(string modId, Action<string> onProgressUpdate) - public
removed public void onSearchCompatibleCommand(string modId, Action<string> onProgressUpdate) - public
removed public void onSearchForAndCompatibleCommand(string version, string modId, Action<string> onProgressUpdate) - public
removed public void onSearchForCommand(string version, string modId, Action<string> onProgressUpdate) - public
added - public void onSearchForCompatibleGameVersionCommand(string gameVersion, string modId, Action<string> onProgressUpdate) public
added - public void onSearchForCompatibleWithCurrentGameVersionCommand(string modId, Action<string> onProgressUpdate) public
added - public void onSearchForCurrentGameVersionCommand(string modId, Action<string> onProgressUpdate) public
added - public void onSearchForSpecificGameVersionCommand(string gameVersion, string modId, Action<string> onProgressUpdate) public
removed public int[] sameMinorVersionIds - public
changed private void search(string searchText, Action<string> onDone, int[] gameVersionIds) private void search(string searchText, Action<string> onDone, long[] gameVersionIds, long majorGameVersionId = …) internal
changed public void Search(string searchText, Action<ModSearchResult> onDone, int[] gameVersionIds, string mv = …, string sortBy = …, int limit = …) public void Search(string searchText, Action<ModSearchResult> onDone, long[] gameVersionIds, long majorVersionId = …, string sortBy = …, int limit = …) public
removed public int selfGameVersionId - public
Change 1.22.7 1.23.0-pre.1 Reach
type removed public delegate - public
Change 1.22.7 1.23.0-pre.1 Reach
type removed internal class : BoxedPacket - internal
Change 1.22.7 1.23.0-pre.1 Reach
removed private TextCommandResult getSetCollectibleAttr(TextCommandCallingArgs args) - internal
removed private TextCommandResult getSetItemstackAttr(TextCommandCallingArgs args) - internal
removed private static TextCommandResult getSetItemStackAttr(ItemSlot slot, string key, string type, string value) - internal
Change 1.22.7 1.23.0-pre.1 Reach
removed private bool entityTypeMatches(EntityProperties type, EntityProperties referenceType, string searchCode, bool isWildcard) - internal
removed private TextCommandResult WipeAllHandler(TextCommandCallingArgs args) - internal
Change 1.22.7 1.23.0-pre.1 Reach
added - private static bool canModifyProtectedPrivileges(Caller caller, string errorVerb, string privilege, string targetPlayerName, out TextCommandResult errorResult) internal
Change 1.22.7 1.23.0-pre.1 Reach
added - public int recentChunkRequestsCount public
Change 1.22.7 1.23.0-pre.1 Reach
added - public override void TriggerEntityGroupSpawning(Entity[] spawningEntities, long herdId) public
removed public override bool TriggerTrySpawnGroupNearOffthread(IBlockAccessor blockaccessor, EntityProperties props, BlockPos spawnPosition) - public
Change 1.22.7 1.23.0-pre.1 Reach
type changed public class : NetServer public sealed class : NetServer public
changed private DummyNetConnection connectedClient private readonly DummyNetConnection connectedClient internal
added - public string ListenIp { get; } public
removed public string LocalEndpoint { get; } - public
removed public override NetIncomingMessage ReadMessage() - public
added - public override bool TryReadMessage(out NetIncomingMessage msg) public
Change 1.22.7 1.23.0-pre.1 Reach
changed public EntitySpawnerResult(List<SpawnOppurtunity> spawnPositions, SpawnState spawnState) public EntitySpawnerResult(List<SpawnOpportunity> spawnPositions, SpawnState spawnState) public
changed private static void DoSpawn(ServerMain server, EntityProperties entityType, Vec3d spawnPosition, long herdid, AssetLocation originalType) private static Entity DoSpawn(ServerMain server, EntityProperties entityType, Vec3d spawnPosition, long herdid, AssetLocation originalType) internal
changed private List<SpawnOppurtunity> spawnPositions private List<SpawnOpportunity> spawnPositions internal
Change 1.22.7 1.23.0-pre.1 Reach
type changed public class internal struct public → internal
removed public HeartbeatPacket() - public
Change 1.22.7 1.23.0-pre.1 Reach
type changed public class internal struct public → internal
removed public ModPacket() - public
Change 1.22.7 1.23.0-pre.1 Reach
changed public void BroadcastBlockEntityPacket(BlockPos pos, int packetId, byte[] data = …) public void BroadcastBlockEntityPacket(FastBlockPos pos, int packetId, SerializedData packetData = …) public
changed public void BroadcastBlockEntityPacket(BlockPos pos, int packetId, byte[] data = …, IServerPlayer[] skipPlayers) public void BroadcastBlockEntityPacket(FastBlockPos pos, int packetId, SerializedData packetData = …, ReadOnlySpan<IServerPlayer> skipPlayers) public
added - public virtual void BroadcastPacketInRange(FastBlockPos pos, byte[] data) public
Change 1.22.7 1.23.0-pre.1 Reach
added - public virtual void BroadcastPacketInRange<T>(FastBlockPos pos, T message) public
Change 1.22.7 1.23.0-pre.1 Reach
removed public Dictionary<string, PlayerBlockBreaks> BlockBreakEventsByPlayer - public
added - public Dictionary<string, PlayerBlockBreaks> BlockEventsByPlayer public
added - public int ElapsedMinutes { get; } public
changed private long ElapsedMs { get; } public long ElapsedMs { get; } internal → public
added - private void EventManager_DidPlaceBlock(IServerPlayer byPlayer, int oldblockId, BlockSelection blockSel, ItemStack withItemStack) internal
changed private void moderatePlayer(string uid) private void moderatePlayer(string uid, int blockBurstLimitCount) internal
added - private void moderatePlayerSlow(string uid, int limit) internal
added - private void RemoveInactivePlayers() internal
added - public int slowCounter public
removed public static int TriggerOnBlockBreakCount { get; set; } - public
added - public static int TriggerOnBlockBreakPlaceCount { get; set; } public
added - public static int TriggerOnBlockBreakPlaceSlowCount { get; set; } public
added - public static int TriggerOnDurationSlowMin { get; set; } public
Change 1.22.7 1.23.0-pre.1 Reach
added - public long[] BurstBuffer public
added - public ushort BurstLastIndex public
added - public int BurstTotalEvents public
added - public void ClearBurst() public
removed public long[] EventsRingBuffer - public
added - public int GetSlowTotals(int currentMinute) public
removed public ushort LastIndex - public
added - public void RecordPlaceBreak(long elapsedMs, int elapsedMinutes) public
added - public void RecordSlow(int currentMinute) public
added - public int SlotForSlow(long minute) public
added - public int[] SlowBuffer public
added - public int[] SlowBufferMinute public
added - public int SlowTotalEventsCache public
removed public int TotalEvents - public
Change 1.22.7 1.23.0-pre.1 Reach
removed public List<PlayerEntry> BannedPlayers - public
added - public Dictionary<string, PlayerEntry> BannedPlayersByUID public
removed public PlayerEntry GetPlayerBan(string playername, string playeruid) - public
removed private PlayerEntry GetPlayerEntry(List<PlayerEntry> list, string playeruid, string playername) - internal
removed public PlayerEntry GetPlayerWhitelist(string playername, string playeruid) - public
added - private static string LoadISODateTime(string dateTime, string playerUID) internal
added - private void TryLoadISODateTimes(ServerPlayerData plrdata) internal
changed public bool UnWhitelistPlayer(string playername, string playeruid) public bool UnWhitelistPlayer(string playeruid) public
removed public List<PlayerEntry> WhitelistedPlayers - public
added - public Dictionary<string, PlayerEntry> WhitelistedPlayersByUID public
Change 1.22.7 1.23.0-pre.1 Reach
type changed public class internal struct public → internal
removed public PlaystylePacket() - public
Change 1.22.7 1.23.0-pre.1 Reach
type changed public class internal struct public → internal
removed public RegisterRequestPacket() - public
added - public ulong _nonce internal
added - public string fqdn internal
added - public string token internal
Change 1.22.7 1.23.0-pre.1 Reach
type changed public class internal class public → internal
Change 1.22.7 1.23.0-pre.1 Reach
added - public bool InDeveloperMode { get; } internal
Change 1.22.7 1.23.0-pre.1 Reach
type added - public class public
Change 1.22.7 1.23.0-pre.1 Reach
added - private EnumProtectionLevel antiAbuse internal
removed public int AntiAbuseTriggerOnBlockBreakCount { get; set; } - public
added - public int AntiAbuseTriggerOnBlockBreakPlaceCount { get; set; } public
added - public int AntiAbuseTriggerOnBlockBreakPlaceCountSlow { get; set; } public
added - public int AntiAbuseTriggerOnDurationSlowMin { get; set; } public
added - public string FQDN { get; set; } public
added - public event Action onAntiAbuseChanged public
added - private Action onAntiAbuseChanged internal
added - public event Action onPasswordChanged public
added - private Action onPasswordChanged internal
added - public event Action onWhitelistmodeChanged public
added - private Action onWhitelistmodeChanged internal
added - private string password internal
added - public EnumProtectionLevel RuntimeAntiAbuse { get; set; } public
added - public string ServerToken { get; set; } public
added - private EnumWhitelistMode whitelistMode internal
Change 1.22.7 1.23.0-pre.1 Reach
changed public override void Disconnect(string message) public override void Disconnect(string logMessage) public
overload added - public override void Disconnect(string logMessage, string playerMessage) public
Change 1.22.7 1.23.0-pre.1 Reach
added - public IXPlatformInterface PlatformUtils { get; } public
Change 1.22.7 1.23.0-pre.1 Reach
added - public event EntityGroupDelegate OnEntityGroupSpawning internal
added - public event OnSchematicExport OnSchematicExport internal
added - private OnSchematicExport OnSchematicExport internal
added - public event OnSchematicImport OnSchematicImport internal
added - private OnSchematicImport OnSchematicImport internal
removed public event TrySpawnGroupDelegate OnTrySpawnGroupNearOffthread - internal
added - public void TriggerEntityGroupSpawning(Entity[] spawningEntities, long herdId) internal
added - public void TriggerSchematicExport(IBlockAccessor blockAccessor, IWorldAccessor world, BlockPos start, BlockPos end, Dictionary<BlockPos, Dictionary<string, byte[]>> modData) internal
added - public void TriggerSchematicImport(IBlockAccessor blockAccessor, IWorldAccessor world, BlockPos startpos, Dictionary<uint, Dictionary<string, byte[]>> modData, Nullable<Rectanglei> rect = …) internal
Change 1.22.7 1.23.0-pre.1 Reach
added - public event EntityGroupDelegate OnEntityGroupSpawning public
added - private EntityGroupDelegate OnEntityGroupSpawning internal
removed public event TrySpawnGroupDelegate OnTrySpawnGroupNearOffthread - public
removed private TrySpawnGroupDelegate OnTrySpawnGroupNearOffthread - internal
added - public virtual void TriggerEntityGroupSpawning(Entity[] spawningEntities, long herdId) public
removed public virtual bool TriggerTrySpawnGroupNearOffthread(IBlockAccessor blockaccessor, EntityProperties props, BlockPos pos) - public
Change 1.22.7 1.23.0-pre.1 Reach
changed internal void BroadcastArbitraryPacket(Packet_Server packet, IServerPlayer[] skipPlayers) internal void BroadcastArbitraryPacket(Packet_Server packet, ReadOnlySpan<IServerPlayer> skipPlayers) internal
changed internal void BroadcastArbitraryPacket(byte[] data, IServerPlayer[] skipPlayers) internal void BroadcastArbitraryPacket(byte[] data, ReadOnlySpan<IServerPlayer> skipPlayers) internal
added - internal void BroadcastArbitraryPacketInRange(FastBlockPos pos, Packet_Server packet) internal
added - internal void BroadcastArbitraryPacketInRange(FastBlockPos pos, byte[] data) internal
changed internal void BroadcastArbitraryUdpPacket(Packet_UdpPacket data, IServerPlayer[] skipPlayers) internal void BroadcastArbitraryUdpPacket(Packet_UdpPacket data, ReadOnlySpan<IServerPlayer> skipPlayers) internal
changed public void BroadcastBlockEntityPacket(int x, int y, int z, int packetId, byte[] data = …, IServerPlayer[] skipPlayers) public void BroadcastBlockEntityPacket(int x, int y, int z, int packetId, SerializedData packetData = …, ReadOnlySpan<IServerPlayer> skipPlayers) public
changed public void BroadcastPacket(Packet_Server packet, IServerPlayer[] skipPlayers) public void BroadcastPacket(Packet_Server packet, ReadOnlySpan<IServerPlayer> skipPlayers) public
added - private readonly Packet_Server completeServerQueryAnswerPacket internal
added - private static bool ContainsPlayer(ReadOnlySpan<IServerPlayer> list, int playerId) internal
added - internal readonly Packet_ServerQueryAnswer CurrentServerQueryAnswer internal
added - private byte[] currentServerQueryAnswerSerialized internal
added - public long GetTotalUnpausedTimeMs() public
added - public long GetTotalUptimeMs() public
changed public void HandleChatMessage(IServerPlayer player, int groupid, string message) public void HandleChatMessage(IServerPlayer player, int groupId, string message) public
added - public bool InDeveloperMode { get; } public
removed private int lastClientId - internal
changed private static Packet_Recipes RecipesToPacket(RecipeRegistryBase reg, string code, ServerMain world, FastMemoryStream ms) private static Packet_Recipes RecipesToPacket(CustomRegistryBase reg, string code, ServerMain world, FastMemoryStream ms) internal
added - public int SeedWorldgen { get; } public
changed private void SendPacket(int clientId, BoxedPacket box) private void SendPacket(ConnectedClient client, BoxedPacket box) internal
changed private void SendPacket(int clientId, byte[] packetBytes) private void SendPacket(ConnectedClient client, byte[] packetBytes) internal
overload added - public void SendPacket(ConnectedClient client, Packet_Server packet) public
overload added - public void SendPacketFast(ConnectedClient client, Packet_Server packet) public
changed private readonly BoxedPacket_ServerAssets serverAssetsPacket private byte[] serverAssetsPacket internal
added - private readonly object serverAssetsPacketLock internal
added - public void TriggerDidBreakBlock(IPlayer player, int oldBlockId, BlockSelection blockSelection) public
added - public void TriggerDidPlaceBlock(IPlayer player, int oldBlockId, BlockSelection blockSelection, ItemStack withItemStack) public
added - internal void UpdateServerQueryAnswer() internal
Change 1.22.7 1.23.0-pre.1 Reach
changed public virtual void Disconnect(string message) public virtual void Disconnect(string logMessage) public
overload added - public virtual void Disconnect(string logMessage, string playerMessage) public
changed internal static bool isInInteractionRangeOf(IPlayer player, IBlockAccessor blockAccessor, BlockPos blockPos, float slack) [Obsolete: This signature will change in 1.23. Avoid it for now.] internal static bool isInInteractionRangeOf(IPlayer player, IBlockAccessor blockAccessor, FastBlockPos blockPos, float slack) internal
overload added - public bool IsInInteractionRangeOf(FastBlockPos blockPos, float slack = …) public
added - public void SendPlayerRedirect(string host, string name) public
removed private bool Vintagestory.API.Common.IPlayer.IsInInteractionRangeOf(BlockPos blockPos, float slack = …) [Obsolete: This signature will change in 1.23. Avoid it for now.] - internal
Change 1.22.7 1.23.0-pre.1 Reach
changed public ServerPlayerInventoryManager(OrderedDictionary<string, InventoryBase> AllInventories, IPlayer player, ServerMain server) public ServerPlayerInventoryManager(OrderedDictionary<string, InventoryBase> allInventories, IPlayer player, ServerMain server) public
changed public override bool DropItem(ItemSlot slot, bool fullStack = …) public override bool DropItem(ItemSlot slot, bool fullStack) public
removed private ServerMain server - internal
Change 1.22.7 1.23.0-pre.1 Reach
added - public bool Readonly { get; set; } public
Change 1.22.7 1.23.0-pre.1 Reach
added - internal const int InteractStepsCatchupLimit = 100 internal
Change 1.22.7 1.23.0-pre.1 Reach
added - private CancellationTokenSource beatCts internal
added - public void CancelRemainingBeat(bool recreateSignal = …) public
removed private void Config_onAdvertiseChanged() - internal
removed private void Config_onUpnpChanged() - internal
added - private bool currentStatePermitsBeating() internal
added - private static readonly TimeSpan DEFAULT_INTERVAL internal
added - private static readonly PlaystylePacket DEFAULT_PLAYSTYLE internal
added - private Task enterHeartbeatLoop() internal
removed private bool heartbeatTaskRunning - internal
added - private static readonly TimeSpan MAX_INTERVAL internal
added - private ModPacket[] modPackets internal
removed private ModPacket[] mods - internal
added - public override void OnBeginConfiguration() public
added - private void onRelevantConfigChanged() internal
removed public void SendHeartbeat() - public
removed private void SendRegister() - internal
changed private static void SendRequestAsync<T>(string url, T packet, Action<ResponsePacket> onComplete) private Task<ResponsePacket> SendRequestAsync<T>(string apiPath, T packet, ECDsa ecdsa, CancellationToken cancellationToken) internal
removed public void SendUnregister() - public
added - private Task task internal
removed private Task Tick() - internal
removed private string token - internal
removed public void TryRegister() - public
added - private bool tryStartBeating() internal
removed private bool upnpComplete - internal
added - private bool upnpSuccessful internal
Change 1.22.7 1.23.0-pre.1 Reach
added - private void SetRuntimeAntiAbuseLevel() internal
added - public static void SetRuntimeAntiAbuseLevel(ServerMain server) public
Change 1.22.7 1.23.0-pre.1 Reach
added - private List<long> workingSendList internal
Change 1.22.7 1.23.0-pre.1 Reach
overload added - public override BlockEntity GetBlockEntity(FastBlockPos position) public
overload added - public override WorldChunk GetChunk(FastBlockPos pos) public
Change 1.22.7 1.23.0-pre.1 Reach
type added - public struct public
Change 1.22.7 1.23.0-pre.1 Reach
type removed public class - public
Change 1.22.7 1.23.0-pre.1 Reach
removed public CancellationTokenSource cts - public
added - private Task EnterConnectLoop() internal
removed private string Ip - internal
added - private string ipAddress internal
added - public string ListenIp { get; } public
removed public string LocalEndpoint { get; } - public
changed private ConcurrentQueue<NetIncomingMessage> messages private readonly ConcurrentQueue<NetIncomingMessage> messages internal
added - private int port internal
removed private int Port - internal
removed public override NetIncomingMessage ReadMessage() - public
removed protected ServerNetManager server - public
removed private void ServerConnected(TcpNetConnection tcpConnection) - internal
added - private Socket socket internal
added - private readonly CancellationTokenSource socketCts internal
added - public override bool TryReadMessage(out NetIncomingMessage msg) public
Change 1.22.7 1.23.0-pre.1 Reach
type changed public class internal struct public → internal
removed public UnregisterPacket() - public
Change 1.22.7 1.23.0-pre.1 Reach
added - public int SeedWorldgen { get; } internal
Change 1.22.7 1.23.0-pre.1 Reach
added - public ICollisionScene CollisionScene { get; } internal
added - public CustomRegistryBase GetCustomRegistry(string code) internal
removed public RecipeRegistryBase GetRecipeRegistry(string code) - internal
added - public long GetTotalUnpausedTimeMs() internal
added - public long GetTotalUptimeMs() internal
added - public int SeedWorldgen { get; } internal
added - public void TriggerDidBreakBlock(IPlayer player, int oldBlockId, BlockSelection blockSelection) internal
added - public void TriggerDidPlaceBlock(IPlayer player, int oldBlockId, BlockSelection blockSelection, ItemStack withItemStack) internal
Change 1.22.7 1.23.0-pre.1 Reach
type added - internal static class internal
Change 1.22.7 1.23.0-pre.1 Reach
type removed public class : IDisposable - public
Change 1.22.7 1.23.0-pre.1 Reach
removed public string Address - public
removed public const int clientIdentificationPacketId = 8 - public
removed private Memory<byte> dataRcvBuf - internal
removed public static int DetermineMaxPacketId() - public
removed public IPEndPoint IpEndpoint - public
changed public static int MaxPacketClientId public static readonly int MaxPacketClientId public
removed public const int pingPacketId = 18 - public
added - public IPEndPoint RemoteEndpoint public
changed public override EnumSendResult Send(byte[] data, bool compressedFlag) public override EnumSendResult Send(byte[] data, bool isCompressed) public
changed public EnumSendResult SendPreparedBytes(byte[] dataWithLength, int length, bool compressedFlag) public EnumSendResult SendPreparedBytes(byte[] rawMessage, int length, bool isCompressed) public
Change 1.22.7 1.23.0-pre.1 Reach
added - public const int MaxMovePerPacket = 128 public
removed private const int maxMovePerPacket = 128 - internal
Change 1.22.7 1.23.0-pre.1 Reach
changed public void HandlePlayerPosition(Packet_EntityPosition packet, ServerPlayer player) public void HandlePlayerPosition(Packet_EntityPosition packet, ServerPlayer player, Packet_CustomPacket standingPacket = …) public
Change 1.22.7 1.23.0-pre.1 Reach
added - private void DidPlaceBlock(IServerPlayer byplayer, int oldblockid, BlockSelection blocksel, ItemStack withitemstack) internal
removed private void DidPlaceBLock(IServerPlayer byplayer, int oldblockid, BlockSelection blocksel, ItemStack withitemstack) - internal
added - private static string GetToolAndBuffInfo(ItemStack itemStack) internal