Skip to content
VSPT

1.23: the API and the base game mods

This guide covers the public API (VintagestoryAPI.dll) and the three base game mods that code mods reference: VSEssentials.dll, VSSurvivalMod.dll and VSCreativeMod.dll. Changes to game assets, shaders and bundled libraries, and to the closed engine (VintagestoryLib.dll), are covered in companion guides. They are mentioned here only where the API depends on them.

1.23.0-pre.1 is a pre-release. Anego describe it as unfinished and ask modders to report API changes that look unintended, so details may change before 1.23.0 stable. Several of the old overloads that still work carry source comments saying they are kept for “at least one more version”. Move off them now rather than relying on them.

How it was made. Three sources were compared:

  • every public and protected type and member of the four assemblies, compiled, in 1.22.7 and in 1.23.0-pre.1, with signatures and [Obsolete] messages;
  • Anego’s public source repositories (vsapi, vsessentialsmod, vssurvivalmod, vscreativemod) at both versions;
  • the decompiled engine, only where it decides which API overload gets called.

Nothing here was tested in game. Behaviour notes come from reading the source. An entry marked “(inferred)” is a conclusion drawn from the code rather than something the code states directly.

How to use it.

  1. Point your project references at a 1.23.0-pre.1 install and rebuild. The target framework is still net10.0 (checked in all four assemblies).
  2. Fix the compile errors with the tables in sections 3 to 17. Appendix A lists every changed or removed member by type, if you need to look one up.
  3. Then work through the obsolete warnings (section 18). Several old packet and serialisation overloads still compile but are no longer called, or are called in a different order.
  4. Read the behaviour-change lists for the areas your mod touches.
  5. Test on a new world and on a world upgraded from 1.22.

Naming. Names are written with the namespace that follows Vintagestory.API.:

  • Common.BlockEntity means Vintagestory.API.Common.BlockEntity.
  • Common.Entities.Entity means Vintagestory.API.Common.Entities.Entity.
  • The same applies to Client., Server., Config., Datastructures., MathTools. and Util..

Base-mod types are written with the namespace that follows Vintagestory., so GameContent.BlockEntityShelf means Vintagestory.GameContent.BlockEntityShelf. ServerMods. and Essentials. work the same way.

The new namespace Vintagestory.Datastructures is always written in full. It lives in VintagestoryAPI.dll but has no .API in its name, and it is a different namespace from Vintagestory.API.Datastructures.

  1. Rebuild. A mod built against 1.22.7 that touches any changed member fails at load or at first call, with MissingMethodException, MissingFieldException or TypeLoadException. Config.GameVersion constants are also compiled into your DLL. (section 3)
  2. Packet handlers. OnReceivedClientPacket and OnReceivedServerPacket on Common.BlockEntity, Common.BlockEntityBehavior, Common.Entities.Entity and Common.Entities.EntityBehavior have new SerializedData overloads; the client-packet ones also take ref CachedAccessPerms. The engine calls both the old and new overloads, and some old ones are never reached. (section 4)
  3. Binary serialisation. FromBytes(BinaryReader …) became FromBytes(ref BinarySpanReader …) across tree attributes, item stacks, entities, recipes and particles. Old overrides compile with a warning but are skipped or crash at run time. (section 5)
  4. Animation managers. Common.AnimationManager and Common.PlayerAnimationManager constructors now take the entity, and Init no longer stores it. onReceivedServerAnimation takes its argument by ref. (section 6)
  5. Worldgen seed. World generation must use the new server-only SeedWorldgen. Worlds from 1.22 get a new random Seed the first time 1.23 loads them. (section 14)
  6. Schematic placement. Common.BlockSchematic.Place, PlaceDecors, PlaceEntitiesAndBlockEntities and the base mods’ structure-placement methods now take a Vintagestory.Datastructures.SchematicPlacementData. (section 14)
  7. Registries. Recipe registries became custom registries (RegisterCustomRegistry, GetCustomRegistry, CustomRegistryBase). RegisterRecipeRegistry<RecipeRegistryGeneric<T>> no longer compiles. (section 10)
  8. INatFloat. These fields changed from MathTools.NatFloat to MathTools.INatFloat: CrushingProperties.Quantity, TransitionableProperties.FreshHours and TransitionHours, SoundAttributes.Pitch and Volume. (section 16)
  9. Armour. Common.ProtectionModifiers lost its flat, relative and tier fields; armour now uses ProtectionTiers per damage type. Armour JSON in the old format gives no protection. (section 6)
  10. Block entity lookup. Common.IWorldChunk.BlockEntities is now keyed by a chunk-local int index instead of BlockPos. (section 14)
  11. Contained interactions. The methods of GameContent.IContainedInteractable take Common.BlockEntity instead of GameContent.BlockEntityContainer. (section 8)
  12. Attachable gear. GameContent.IAttachableToEntity.GetAttachedShape gained an Entity parameter. (section 8)
  13. Keyframes. The Common.AnimationKeyFrameElement fields became float? properties. (section 6)
  14. Required members. Common.JsonItemStack.Code is now required, and so on every subclass (BarrelOutputStack, CookingRecipeStack, TradeItem and others). (sections 3 and 8)
  15. Mouse wheel. Client.MouseWheelEventArgs.delta, deltaPrecise, value and valuePrecise are obsolete, and value now holds a timestamp. Use DeltaY, DeltaYInt and IsFresh. (section 12)
  16. Dialog range checks. Client.GuiDialog.IsInRangeOf and Client.GuiDialogGeneric.IsInRangeOfBlock are obsolete errors. Use Common.IPlayer.IsInInteractionRangeOf. (section 12)
  17. Spawn events. Server.IServerEventAPI.OnTrySpawnGroupNearOffthread is removed, and OnTrySpawnEntity now runs on the spawner’s background thread. (section 14)
  18. Handbook. GameContent.InitCustomPagesDelegate and GameContent.OnCreatePagesDelegate now use List<IFlatListItem>. (section 12)
  19. Pathfinding and AI tasks. Path traversers take a new GaitMeta preferredGait parameter. AiTaskSeekFoodAndEat, AiTaskSeekBlockAndLay and AiTaskStayCloseToEntity have new base classes. (section 7)
  20. Melee damage type. Melee hits now use the held item’s damage type, which defaults to SlashingAttack. In 1.22.7 every melee hit dealt BluntAttack. (section 8)

Also check Appendix B. If your mod implements an API interface itself (a custom block accessor, a mock, a wrapper), it must add the interface’s new abstract members.

Was (1.22.7) Now (1.23.0-pre.1) What to do
A mod DLL compiled against 1.22.7 Many members changed from fields to properties, gained or lost parameters, or moved to other types Rebuild every mod. Appendix A lists the members that break an old binary.
Config.GameVersion constants: APIVersion “1.22.0”, AssemblyVersion “1.22.7.0”, NetworkVersion “1.22.6”, OverallMajorMinor “1.22”, OverallVersion “1.22.7”, ShortGameVersion “1.22.7”, Branch Stable “1.23.0”, “1.23.0.0”, “1.23.2”, “1.23”, “1.23.0”, “1.23.0-pre.1”, Unstable These are const, so the compiler copies their values into your DLL. Rebuild. For a check at run time, call GameVersion.IsAtLeastVersion(...) or IsCompatibleApiVersion(...), or read LongGameVersion, which are evaluated inside the loaded API.
Types without required members These now have required members: Common.JsonItemStack.Code (so also its subclasses GameContent.BarrelOutputStack, CookingRecipeStack, JsonItemStackBuildStage, MetalAlloyIngredient, PanningDrop and TradeItem), Common.AttachmentPointAndPose.AttachPoint, Datastructures.TreeModifiedListener.listener, GameContent.SpawnEntityProperties.Code, GameContent.ClothPointPacket.Point, ClothSystemPacket.ClothSystems, UnregisterClothSystemPacket.ClothIds Set these in every object initialiser (new JsonItemStack { Code = ..., Type = ... }), otherwise you get error CS9035. The member listing shows these types’ parameterless constructors as “[Obsolete error] Constructors of types with required members are not supported in this version of your compiler”. That marker is aimed at compilers older than C# 11; it is not a deprecation.
Types usable anywhere Datastructures.SerializedData, Datastructures.BinarySpanReader and Vintagestory.Datastructures.ArrayPoolReturner<T> are ref structs They cannot be stored in fields, captured by lambdas, or used in async methods or iterators. Copy the bytes out (packetData.RawData.ToArray()) before handing them to EnqueueMainThreadTask or a callback. The member listing marks these types “[Obsolete error] Types with embedded references…”, which is the compiler’s ref-struct marker, not a deprecation.
Common/Collectible/Collectible.cs and Common.IPlayerInventoryManager had #nullable disable Nullable annotations are on, for example ItemSlot? ActiveHotbarSlot and GetNutritionProperties(IWorldAccessor? world, ...) With nullable warnings treated as errors, overrides that declare those parameters non-nullable now fail (CS8765). Add the ?.
Non-virtual members Now virtual: MathTools.Cuboidd and Cuboidf intersection and push-out methods, Common.AnimationUtil.Dispose, OnRenderFrame and StopAnimation, Client.GuiElementMainMenuCell.Compose, OnMouseUpOnElement and OnRenderInteractiveElements, GameContent.AiTaskStayCloseToEntity.OnNoPath and OnStuck, GameContent.EntityBehaviorSelectionBoxes.GetCenterPosOfBox, IsAPCode and OnRenderFrame, GameContent.ItemFishingPole.StopFishing and HandbookPageCodeForStack Callers are unaffected. A subclass method with the same signature now hides the base method (warning CS0114, an error if warnings are errors). Add override.
protected virtual members Now public virtual: GameContent.BEBehaviorFruitingBush.getHarvestTimeMul, getNutrientUseMul, getRipeTimeMul and getYieldMul, GameContent.BlockEntityGenericTypedContainer.InitInventory Overrides must become public override (error CS0507).
A C# version older than 13 The new params ReadOnlySpan<IServerPlayer> overload of BroadcastBlockEntityPacket needs C# 13. required needs C# 11. net10.0 projects default to C# 14, so this matters only if your project pins an older LangVersion.

Interfaces that mods may implement gained abstract members. They are listed in Appendix B.

These points were checked in the engine’s handlers and in the API’s base classes:

  • The engine calls both overloads. For every block entity packet and entity packet, in both directions, it first calls the new overload (SerializedData; on the server also ref CachedAccessPerms), then the old byte[] one.

  • The base implementations forward separately. The new base forwards to the behaviours’ new overloads. The old base forwards to the behaviours’ old overloads.

  • One exception: Common.Entities.Entity.OnReceivedServerPacket(int, byte[]) now has an empty body. As a result Common.Entities.EntityBehavior.OnReceivedServerPacket(int, byte[], ref EnumHandling) is never called by anything. Overriding it is dead code.

  • “Never override both”, as the [Obsolete] messages put it, means this: if you override both overloads, your code runs twice per packet. The two passes keep separate EnumHandling state, so setting PreventSubsequent in the new pass does not stop behaviours’ old overloads.

  • An override of only the old overload still runs, but late. It runs after every new-overload handler and gets no permission cache. It can no longer veto vanilla handling, because vanilla’s logic moved into the new overloads and has already run.

  • The engine does no reach or claim check before calling your handler. It only builds the CachedAccessPerms struct. The check runs when your handler calls TryAccessingBlockAtPos (block entities) or IsInteractingPlayerAllowedTo (entities):

    • with validatePickRange, it first checks reach through IPlayer.IsInInteractionRangeOf (selection boxes, default slack 0.25);
    • it then runs the land claim check, which also sends the player an error message on denial;
    • it caches the result in the struct;
    • it writes one audit log line per failure.

    The struct is passed by ref through the block entity or entity and all its behaviours, so each check runs once per packet.

Migrating a handler (described, not copied):

  1. Override the new overload and delete the old override.
  2. Read the payload with packetData.AsBinaryReader(), which gives a BinarySpanReader positioned at the start, or with packetData.Deserialize<T>() for protobuf classes.
  3. Before changing anything for a client packet, call perms.TryAccessingBlockAtPos(EnumBlockAccessFlags.Use, true, "my thing") and return if it fails.
  4. Call base with ref perms so behaviours still see the packet.
Was (1.22.7) Now (1.23.0-pre.1) What to do
Common.BlockEntity.OnReceivedClientPacket(IPlayer fromPlayer, int packetid, byte[] data) Kept with renamed parameters, [Obsolete("Use the overload with CachedAccessPerms. Never override both.")]. New: OnReceivedClientPacket(Server.IServerPlayer fromPlayer, int packetId, Datastructures.SerializedData packetData, ref Common.BlockEntity.CachedAccessPerms perms) Override the new overload only. Call base.OnReceivedClientPacket(fromPlayer, packetId, packetData, ref perms).
Common.BlockEntity.OnReceivedServerPacket(int packetid, byte[] data) Kept, [Obsolete]. New: OnReceivedServerPacket(int packetId, SerializedData packetData) Override the new overload only.
Common.BlockEntityBehavior.OnReceivedClientPacket(IPlayer, int, byte[]) and OnReceivedServerPacket(int, byte[]) Kept, [Obsolete]. New overloads with the same shapes as on BlockEntity Override the new overloads. See the note on vanilla block entities below.
Common.Entities.Entity.OnReceivedClientPacket(Server.IServerPlayer player, int packetId, byte[] packetData) That signature is gone. The byte[] overload now takes Common.IPlayer and is [Obsolete]. New: OnReceivedClientPacket(IServerPlayer player, int packetId, SerializedData packetData, ref Common.Entities.Entity.CachedAccessPerms perms) An existing override no longer compiles. Move it to the new overload.
Common.Entities.Entity.OnReceivedServerPacket(int packetid, byte[] data) [Obsolete], with an empty body. New: OnReceivedServerPacket(int packetId, SerializedData packetData), which now holds the base logic (teleport handling and forwarding to behaviours) Override the new overload and call base on it. A base call to the old one does nothing.
Common.Entities.EntityBehavior.OnReceivedClientPacket(IServerPlayer, int packetid, byte[] data, ref EnumHandling) [Obsolete]. New: (IServerPlayer player, int packetId, SerializedData packetData, ref EnumHandling handled, ref Entity.CachedAccessPerms perms) Override the new overload.
Common.Entities.EntityBehavior.OnReceivedServerPacket(int packetid, byte[] data, ref EnumHandling) [Obsolete] and never called. New: (int packetId, SerializedData packetData, ref EnumHandling handled) You must migrate; the old override is dead code.
Common.EntityPlayer overrides of both handlers Moved to the new overloads Subclasses override, and call base on, the new overloads.
Common.BlockEntity.CachedAccessPerms(IWorldAccessor, BlockPos, IPlayer) CachedAccessPerms(IWorldAccessor world, MathTools.FastBlockPos blockPos, IPlayer player) Inside a handler, use the ref perms you are given. Elsewhere, use new BlockEntity.CachedAccessPerms(world, new FastBlockPos(pos), player). FastBlockPos has no implicit conversion from BlockPos.
Common.BlockEntity.CachedAccessPerms.IsInteractingPlayerAllowedTo(EnumBlockAccessFlags, bool validatePickRange, string thingNameForLog) Renamed TryAccessingBlockAtPos, same parameters Rename the call. Common.Entities.Entity.CachedAccessPerms still uses the name IsInteractingPlayerAllowedTo.
Server.IServerNetworkAPI.BroadcastBlockEntityPacket(BlockPos pos, int packetId, byte[] data = null) and the overload with params IServerPlayer[] skipPlayers (both abstract) [Obsolete(error)] default methods that forward to the new abstract BroadcastBlockEntityPacket(FastBlockPos pos, int packetId, SerializedData data = default) and (…, params ReadOnlySpan<IServerPlayer> skipPlayers) Call the new overloads: BroadcastBlockEntityPacket(new FastBlockPos(Pos), id, new SerializedData(bytes)). Alternatively use the unchanged protobuf overload BroadcastBlockEntityPacket<T>(BlockPos, int, T).
Common.IInventoryNetworkUtil.HandleClientPacket(IPlayer byPlayer, int packetId, byte[] data) (abstract) [Obsolete(error)] default method that casts and forwards. New abstract: HandleClientPacket(IServerPlayer byPlayer, int packetId, SerializedData packetData) Callers pass on the player and payload they received. Implementers implement the new method.
Common.IInventoryNetworkUtil.SendInventoryRollback(IServerPlayer, int, ReadOnlySpan<byte>) SendInventoryRollback(IServerPlayer, int, SerializedData) Pass the SerializedData you received.
VSSurvivalMod block entity overrides of OnReceivedClientPacket(IPlayer, int, byte[]) on GameContent.BETileConnector, BlockEntityAnvil, BlockEntityBarrel, BlockEntityBlockRandomizer, BlockEntityChisel, BlockEntityClayForm, BlockEntityFruitPress, BlockEntityGuiConfigurableCommands, BlockEntityKnappingSurface, BlockEntityLabeledChest, BlockEntityLocustNest, BlockEntityOpenableContainer, BlockEntitySign, BlockEntitySignPost, BlockEntitySpawner, BlockEntityTicker, FurnaceSection Override the new client overload If you subclass one of these, override, and call base on, the new overload.
VSSurvivalMod overrides of OnReceivedServerPacket(int, byte[]) on GameContent.BECheeseCurdsBundle, BlockEntityBarrel, BlockEntityClayForm, BlockEntityFirepit, BlockEntityFruitPress, BlockEntityKnappingSurface, BlockEntityLabeledChest, BlockEntityOpenableContainer, BlockEntityQuern, BlockEntitySign, BlockEntitySignPost, BlockEntitySpawner, FurnaceSection Override the new server overload Same.
GameContent.BlockEntityFirepit.OnReceivedClientPacket, BlockEntityQuern.OnReceivedClientPacket, BlockEntityItemFlow.OnReceivedServerPacket Removed. They only called base; the inherited handler now applies No action.
Entity overrides: GameContent.EntityTradingHumanoid, EntityVillager (client); EntityBell, EntityTrader, EntityTradingHumanoid, EntityVillager, EntityBlockFalling (server) Override the new overloads Subclasses override the new overloads.
Entity behaviour overrides: GameContent.EntityBehaviorHarvestable, EntityBehaviorOpenableContainer (client); EntityBehaviorMouthInventory, EntityBehaviorMilkable (server); EntityBehaviorConversable, EntityBehaviorWritingSurface (both) Override the new overloads Same.
GameContent.BEBehaviorContainedBagInventory (both directions), GameContent.EntityBehaviorAttachable (client) Old overrides kept but [Obsolete], next to new ones Override the new ones.
GameContent.BlockEntityContainedBagWorkspace.OnReceivedClientPacket(IPlayer, int, byte[]) and OnReceivedServerPacket(int, byte[]) The first is [Obsolete(error)], the second [Obsolete]; both bodies are now empty. New: (IServerPlayer, int, SerializedData, ref BlockEntity.CachedAccessPerms) and (int, SerializedData) Call the new overloads.
GameContent.BlockEntityGuiConfigurableCommands.UpdateFromPacket(byte[] data) (protected virtual) [Obsolete]; the packet handler now calls the new UpdateFromPacket(SerializedData) Override the SerializedData version; an override of the old one is never called.
GameContent.BlockEntityContainerOpen.FromBytes(byte[] data) FromBytes(SerializedData data) Pass the SerializedData.
GameContent.EntityBehaviorConversable.BeginConvoPacketId, SelectAnswerPacketId, CloseConvoPacketId (public static int) public const int with the same values (1213, 1214, 1215) Recompile. They can no longer be assigned.
GameContent.IAttachedInteractions.OnReceivedClientPacket(ItemSlot, int, Entity, IServerPlayer, int, byte[], ref EnumHandling, Action) (abstract) [Obsolete("Use the CachedAccessPerms overload. Never override both.")] with an empty default. New, also with an empty default: (ItemSlot itemslot, int slotIndex, Entity onEntity, IServerPlayer player, int packetId, SerializedData packetData, ref EnumHandling handled, ref Entity.CachedAccessPerms perms, Action onRequireSave) Implement the new overload, but see the note on crafting stands below.
GameContent.CollectibleBehaviorHeldBag.OnReceivedClientPacket(ItemSlot, int, Entity, IServerPlayer, int, byte[], ref EnumHandling, Action) (public) Removed. Replaced by an explicit implementation of the new IAttachedInteractions overload Call it through (IAttachedInteractions). Explicit implementations cannot be overridden (inferred).
GameContent.AttachedContainerWorkspace.OnReceivedClientPacket(IServerPlayer, int, byte[], ItemSlot, int, ref EnumHandling) byte[] replaced by SerializedData packetData, with no permission cache The caller does the access check.
GameContent.ItemAnchor.OnReceivedClientPacket(..., byte[] data, ref EnumHandling, Action) (..., SerializedData packetData, ref EnumHandling, ref Entity.CachedAccessPerms perms, Action) Match the new signature.
Config.GameVersion.IsCompatibleNetworkVersion(string) Removed No direct replacement found. The engine compares network versions by exact string equality, and did so in 1.22.7 as well. Compare against GameVersion.NetworkVersion yourself.
Server.IServerPlayer.Disconnect(string message) Disconnect(string logMessage) plus a new Disconnect(string logMessage, string playerMessage) The one-argument message only ever went to the log, in 1.22.7 too. Use the two-argument form to show the player a reason. Named arguments using message: break.
Server.EnumProtectionLevel (Off, Basic, Pedantic), defined in the deleted file EnumCheatProtectionLevel.cs Same type and namespace, with new values LogOnly (3) and Auto (4), plus extension methods ShouldModerate() and ShouldLog() (Server.EnumProtectionLevelExtension) Replace ordinal tests such as level >= Basic with the extension methods.
  • Some vanilla block entities do not call base from their client handler. The base call is commented out in BlockEntityOpenableContainer and its subclasses (chests, labelled chests, firepit, quern, BlockEntityItemFlow, FurnaceSection) and in BlockEntityAnvil, BlockEntityClayForm, BlockEntityKnappingSurface and BlockEntityChisel (source: BEOpenableContainer.cs, with a developer note asking why). On these, a BlockEntityBehavior’s new OnReceivedClientPacket is not reached. Because these classes no longer override the old overload, behaviours on them now receive client packets through the old overload instead. BlockEntityOpenableContainer’s server handler also skips base.
  • Crafting stands only use the old IAttachedInteractions overload. The new GameContent.EntityBehaviorWearablesCraftingStand forwards packets only through the old overload. EntityBehaviorAttachable calls both. So an item that implements only the new overload gets no packets from a crafting stand, and one that implements both handles packets twice on EntityBehaviorAttachable.
  • The bag workspace’s old overloads are empty, so code calling BlockEntityContainedBagWorkspace’s old handlers now does nothing.
  • Anti-abuse defaults to Auto. The server’s AntiAbuse setting now defaults to Auto, and 1.22 configs set to Off are migrated to Auto. Auto resolves to Off in single player, LogOnly on LAN or whitelisted or password-protected servers, and Basic on open dedicated servers. IServerConfig.AntiAbuse can now return Auto or LogOnly. This is engine behaviour, seen in the decompiled server.
  • New packet ids. The game added EntityClientPacketId.HeldAttackCommitted (297) and EntityServerPacketId.EmoteStop (204). A mod sending its own entity packets with those numbers to players may now collide (inferred).
  • New privilege. Server.Privilege.minbrightness is new; it is granted to the sumod and crmod roles when the server config is upgraded.
  • Datastructures.SerializedData: a readonly ref struct wrapping a ReadOnlySpan<byte>. It has RawData, AsBinaryReader() and Deserialize<T>() (protobuf). Construct it with new SerializedData(bytes).
  • Server.IServerNetworkAPI.BroadcastPacketInRange(FastBlockPos, byte[]) and Server.IServerNetworkChannel.BroadcastPacketInRange<T>(FastBlockPos, T): send to every player whose loaded area may contain the position.
  • Server.IServerPlayer.SendPlayerRedirect(string host, string name).
  • Common.IPlayer.IsInInteractionRangeOf(FastBlockPos blockPos, float slack = 0.25f) is now public. The Entity overload already was.
  • Unchanged: SendBlockEntityPacket, SendEntityPacket and BroadcastEntityPacket (all byte[]), the whole client network API, and the protobuf channel API apart from BroadcastPacketInRange<T>.

All FromBytes(BinaryReader …) reading paths moved to Datastructures.BinarySpanReader, a ref struct that reads from a span. Writing (ToBytes(BinaryWriter …)) is unchanged. The engine now only calls the ref BinarySpanReader overloads.

Was (1.22.7) Now (1.23.0-pre.1) What to do
Common.IByteSerializable.FromBytes(BinaryReader, IWorldAccessor) (abstract) A virtual default marked [Obsolete(error)]. New virtual default: FromBytes(ref BinarySpanReader reader, IWorldAccessor resolver) Implement the span overload as a public method and delete the old one. Both overloads now have default bodies, so a class implementing neither still compiles, then fails at run time (see below).
Datastructures.IAttribute.FromBytes(BinaryReader), Common.IItemStack.FromBytes(BinaryReader), Common.IParticlePropertiesProvider.FromBytes(BinaryReader, IWorldAccessor) (abstract) Same pattern: the old method is a virtual [Obsolete(error)] default, and there is a new ref BinarySpanReader overload Implement the span overload.
Datastructures.ITreeAttribute New abstract members Get2DByteArray(string, byte[,]) and Set2DByteArray(string, byte[,]) Only custom implementers of ITreeAttribute must add them.
FromBytes(BinaryReader) on 17 attribute types: Datastructures.BoolArrayAttribute, BoolAttribute, ByteArrayAttribute, DoubleArrayAttribute, DoubleAttribute, FloatArrayAttribute, FloatAttribute, IntArrayAttribute, IntAttribute, ItemstackAttribute, LongArrayAttribute, LongAttribute, StreamedByteArrayAttribute, StringArrayAttribute, StringAttribute, TreeArrayAttribute, TreeAttribute [Obsolete(error)] (parameter renamed reader). New: FromBytes(ref BinarySpanReader) Call the span overload. TreeAttribute.FromBytes is virtual, so subclasses must override the span overload; an override of the old one still compiles (warning CS0672) but is never called.
Datastructures.SyncedTreeAttribute.FromBytes(BinaryReader) override override FromBytes(ref BinarySpanReader) Same.
Datastructures.TreeAttribute.FromBytes(byte[]) and TreeAttribute.CreateFromBytes(byte[]) [Obsolete] (warning); new ReadOnlySpan<byte> overloads Optional change.
Common.ItemStack(BinaryReader), ItemStack(BinaryReader, IWorldAccessor) constructors, and ItemStack.FromBytes(BinaryReader) [Obsolete(error)] Use new ItemStack(ref reader), new ItemStack(ref reader, world) (the second also resolves the block or item), or FromBytes(ref BinarySpanReader). ItemStack(byte[]) is now [Obsolete]; prefer ItemStack(ReadOnlySpan<byte>).
Common.Entities.Entity.FromBytes(BinaryReader, bool) and FromBytes(BinaryReader, bool, Dictionary<string,string>) [Obsolete(error)]. New ref BinarySpanReader versions of both Override FromBytes(ref BinarySpanReader reader, bool isSync) and call base first, as before. Keep no old override anywhere in your class hierarchy (see below).
Entity subclasses whose old override is gone: Common.EntityAgent, EntityChunky, EntityItem, EntityPlayer; GameContent.EntityBlockFalling, EntityProjectileBase (VSEssentials); GameContent.EntityAnimalBot, EntityBoatConstruction, EntityBobber, EntityElevator, EntityThrownBeenade, EntityThrownSnowball, EntityThrownStone, EntityTrader, EntityTradingHumanoid, EntityVillager (VSSurvivalMod) Each overrides FromBytes(ref BinarySpanReader, bool) Subclasses override the span version and call base.FromBytes(ref reader, isSync).
Common.Entities.EntityPos.FromBytes(BinaryReader) [Obsolete(error)], plus FromBytes(ref BinarySpanReader) Use the span overload.
Common.EntityControls.FromBytes(BinaryReader, bool) [Obsolete] (warning), plus a ref overload Use the span overload.
Particles: the old overload is gone on Common.BlockBreakingParticleProps, BlockCubeParticles, EntityCubeParticles, StackCubeParticles and WaterSplashParticles. It is [Obsolete(error)] on Common.AdvancedParticleProperties, AirBubbleParticles, CollectibleParticleProperties, ExplosionSmokeParticles, ParticlesProviderBase and SimpleParticleProperties. FromBytes(ref BinarySpanReader, IWorldAccessor). AdvancedParticleProperties.createFromBytes(BinaryReader, ...) is [Obsolete]; its replacement is CreateFromBytes(ref BinarySpanReader, ...) with a capital C. Override or call the span overloads.
Recipes: the old overload is gone on Common.RecipeBase, GridRecipe, LayeredVoxelRecipe and CraftingRecipeIngredient, and on GameContent.AlloyRecipe, BarrelRecipe, BarrelRecipeIngredient, BarrelOutputStack, CookingRecipe, CookingRecipeStack and MetalAlloyIngredient. GameContent.CookingRecipeIngredient.FromBytes(BinaryReader, IClassRegistryAPI) is [Obsolete]. Span overloads An override of the old overload no longer compiles; override the span overload.
Common.JsonItemStack.FromBytes(BinaryReader, IWorldAccessor) Removed. FromBytes(BinaryReader, IClassRegistryAPI) is [Obsolete(error)]. New: FromBytes(ref BinarySpanReader, IClassRegistryAPI) and FromBytes(ref BinarySpanReader, IWorldAccessor) Use the span overloads.
[Obsolete(error)]: Common.AmbientModifier.FromBytes(BinaryReader), Common.BlockDropItemStack.FromBytes(BinaryReader, IClassRegistryAPI), Common.CreativeTabAndStackList.FromBytes(BinaryReader, IClassRegistryAPI), Common.TransitionableProperties.FromBytes(BinaryReader, IClassRegistryAPI) Span overloads Use them.
[Obsolete] (warning): Common.AnimationMetaData.FromBytes(BinaryReader, string), Common.AnimationSound.CreateFromBytes(BinaryReader, string), Common.SoundAttributes.FromBytes(BinaryReader, string), Datastructures.TagSet.FromBytes, Datastructures.TagSetFast.FromBytes, Datastructures.ComplexTagConditionExtensions.FromBytes and FastFromBytes, MathTools.BlockPos.CreateFromBytes, MathTools.EvolvingNatFloat.CreateFromBytes, MathTools.NatFloat.FromBytes and createFromBytes, MathTools.Vec3d.CreateFromBytes, MathTools.Vec3f.CreateFromBytes, MathTools.WeightedFloat.FromBytes, MathTools.WeightedFloatArray.FromBytes, ServerMods.WorldEdit.WorldEditWorkspace.FromBytes(BinaryReader) (VSCreativeMod) Each has a ref BinarySpanReader overload Migrate. The first three and WorldEditWorkspace can fail at run time even though they compile (see below).
Util.SerializerUtil.FromBytes(byte[], ByteReadDelegate) [Obsolete] with no message No direct replacement found. Build a BinarySpanReader over the bytes yourself (inferred).
Util.FastSerializerDelegate (type) Removed No direct replacement found. The documentation of CustomFastSerializerAttribute now describes only a method-name convention.
Common.RecipeRegistryBase.FromBytes(IWorldAccessor, int, byte[]) and ToBytes(IWorldAccessor, out byte[], out int) Moved unchanged to the new base class Common.CustomRegistryBase See section 10.

Old overloads that still compile but fail at run time. The obsolete BinaryReader members route through an internal bridge, which:

  • throws UnauthorizedAccessException when the reader wraps a MemoryStream built from a byte[], the usual pattern in mods;
  • does not advance the stream position when it does work.

This applies to AnimationMetaData.FromBytes(BinaryReader, string), AnimationSound.CreateFromBytes, SoundAttributes.FromBytes, AdvancedParticleProperties.createFromBytes, CookingRecipeIngredient.FromBytes and WorldEditWorkspace.FromBytes. It also applies to every [Obsolete(error)] API overload, which a DLL built against 1.22.7 can still reach. These members keep their own BinaryReader code and are safe: TagSet, TagSetFast, ComplexTagConditionExtensions, BlockPos, Vec3d, Vec3f, EvolvingNatFloat, NatFloat, WeightedFloat, WeightedFloatArray and EntityControls. (Source: Datastructures/BinarySpanReader.cs; checked by running Anego’s own reader code outside the game.)

Compatibility shims based on reflection. The span overloads on Entity, JsonItemStack, BlockDropItemStack, CollectibleParticleProperties and ParticlesProviderBase look for a public old BinaryReader overload on the runtime type and call it if they find one.

  • Keeping both overloads skips the base fields. If you keep an old override next to a new one, base.FromBytes(ref …) calls your old override instead of reading the base fields.

  • Interface defaults fail when there is no old method. If a class implements neither overload publicly, the interface default fails as follows:

    • IAttribute reads nothing, so the stream is misaligned for whatever follows;
    • IByteSerializable, IItemStack and IParticlePropertiesProvider throw NullReferenceException.
  • The reverse direction is broken. The old-overload defaults that try to call a span overload by reflection never find it, because the lookup does not match ref parameters. As a result:

    • an old-style call through IByteSerializable or IItemStack throws;
    • an old-style call through IAttribute or IParticlePropertiesProvider does nothing;
    • the old Entity.FromBytes reads only the base Entity fields.

    (Source: Common/ByteSerializable.cs, Datastructures/AttributeTree/Other/IAttribute.cs, Common/Entity/Entity.cs.)

Util.SerializerUtil.DeserializeInto with a struct. The DeserializeInto<T>(ref T, SerializedData) overload for structs discards the result. Assign its return value, or use Deserialize<T>.

BinarySpanReader against BinaryReader:

  • Reading past the end throws ArgumentOutOfRangeException or IndexOutOfRangeException, not EndOfStreamException.
  • Instead of testing BaseStream.Position < BaseStream.Length, test RemainingBytes.Length > 0.
  • ReadBytes returns a view of the span, not a copy.
  • There is no ReadChar, ReadChars, ReadDecimal or Read7BitEncodedInt.
  • ReadString(limit) throws FormatException on a malformed or oversized length.
  • SerializedData.AsBinaryReader() starts at offset 0 on every call, so keep one local reader and pass it on by ref.

Hashes. ArrayAttribute.GetHashCode is now order-sensitive. TreeAttribute.GetHashCode(ignoredAttributes) now passes the ignore list down into nested item stacks. Hash values differ from 1.22.7, so do not persist them.

  • Datastructures.BinarySpanReader:

    • little- and big-endian Read* methods, ReadBoolean, ReadBytes, ReadString(limit), SkipBytes;
    • CurrentOffset and RemainingBytes;
    • extension ReadStringArray.

    BinarySpanReaderExtensions.ActAsBinaryReader and UnsafeActAsBinarySpanReader are marked “Don’t use this”.

  • Vintagestory.Datastructures.ArrayPoolReturner<T>: a disposable ref struct holding a rented array.

  • Util.SerializerUtil: Deserialize<T>(ReadOnlySpan<byte>), Deserialize<T>(SerializedData) and DeserializeInto overloads.

  • Tree attributes: Datastructures.ByteArray2DAttribute (attribute id 17), Array2DAttribute<T> and IHashWithIgnoredAttributes, plus TreeAttribute.TryCopyAttribute, Get2DByteArray and Set2DByteArray.

  • Common.Entities.Entity.fromBytes(ref BinarySpanReader, bool) (lower-case f): the base deserialiser, without the compatibility shim.

6. Entities, animation, physics and combat (API)

Section titled “6. Entities, animation, physics and combat (API)”
Was (1.22.7) Now (1.23.0-pre.1) What to do
Common.AnimationManager() Common.AnimationManager(Common.Entities.Entity entity) Pass the entity when you create one; subclasses call : base(entity). AnimationManager.Init(api, entity) still exists and Entity.Initialize still calls it, but it no longer stores the entity, so move per-entity setup into your constructor.
Common.PlayerAnimationManager() and its Init(ICoreAPI, Entity) override PlayerAnimationManager(Common.EntityPlayer entity); the Init override is removed Pass the player entity.
AnimationManager.onReceivedServerAnimation(AnimationMetaData) and the PlayerAnimationManager override (protected virtual) onReceivedServerAnimation(ref AnimationMetaData animmetadata) Add ref to your override and its base call. The handler may now replace the metadata.
AnimationManager.ShouldPlaySound(IWorldAccessor, Vec3f, int, Dictionary<string, ILoadedSound> loopingSounds, string animationMetaCode, AnimationSound, Entity) (static) ShouldPlaySound(IWorldAccessor, Vec3f, int, ref Dictionary<string, ILoadedSound>? loopingSounds, string animationCode, AnimationSound, Entity?); the dictionary is created on demand Pass a field or local by ref. The key is now the animation code, not the metadata code.
AnimationManager.ShouldPlaySound(string animationMetaCode, AnimationSound), Common.AnimationUtil.ShouldPlaySound(string animationMetaCode, AnimationSound) Parameter renamed animationCode Only named arguments break. The value passed is now the animation code.
Common.Animation.GenerateFrame(..., List<ElementPose> transforms, bool recursive = true) (protected) Takes string sourceForLogging before recursive Subclasses that call it add the argument.
Common.Animation.GenerateAllFrames(ShapeElement[], Dictionary<int, AnimationJoint>, bool) [Obsolete]; the new overload takes string sourceForLogging Pass a shape path or entity code, used in log messages.
Common.AnimationKeyFrameElement fields OffsetX/Y/Z, StretchX/Y/Z, RotationX/Y/Z, OriginX/Y/Z (double?) Properties of type float? Cast when assigning (RotationX = 90.0 no longer compiles). No ref or out use. Reflection must use PropertyInfo. The JSON names are unchanged and old animation JSON still loads.
AnimationKeyFrameElement.RotShortestDistanceX/Y/Z (bool fields) bool properties Recompile.
Common.AnimationMetaData.SupressDefaultAnimation (field) [Obsolete("Misspelled, use SuppressDefaultAnimation instead")] property that forwards to the new field SuppressDefaultAnimation Use SuppressDefaultAnimation. JSON accepts both spellings.
Common.Entities.EntityProperties.Drops (BlockDropItemStack[]) EntityDropItemStack[]. The new Common.EntityDropItemStack : BlockDropItemStack adds EnumDamageType? DamageType Create arrays as EntityDropItemStack[]. Reading elements as BlockDropItemStack still works. The same change applies to ServerMods.NoObf.EntityType.Drops in VSEssentials.
Common.ProtectionModifiers fields RelativeProtection, PerTierRelativeProtectionLoss, FlatDamageReduction, PerTierFlatDamageReductionLoss, ProtectionTier, HighDamageTierResistant Removed. Replaced by Dictionary<EnumDamageType, int> ProtectionTiers and a static attack-tier against protection-tier table (DamageReductionValues, MinDamageReductionValue, ProtectionTierRounding, loaded from config/damagereductiontable.json). New methods GetProtectionTier(...) and Apply(ref float damage, out int durabilityLoss, EntityAgent, DamageSource), and statics Add, Average, GetDamageReduction and GetDescription. The class moved to its own file; same namespace. There is no direct replacement for the relative or flat values. Code reading the old fields should call GetProtectionTier or Apply. Armour JSON becomes "protectionModifiers": { "protectionTiers": { "BluntAttack": 2, ... } }.
Common.EntityBehaviorPassivePhysics.newPos and prevPos (protected) Declared on the base class Common.Entities.PhysicsBehaviorBase instead, same names and types Source still compiles; recompile. A PhysicsBehaviorBase subclass that declares its own fields with these names now hides the base ones.
Common.Entities.EntityBehavior(Entity) constructor was public protected No source impact for subclasses; the class is abstract.
Common.Entities.Entity.PlayEntitySound(string type, IPlayer); Common.EntityAgent.ReceiveSaturation, ShouldReceiveSaturation and Common.Entities.EntityBehavior.OnEntityReceiveSaturation parameters saturation and saturationLossDelay Renamed code, satiety and satietyLossDelay Only named arguments break.
Common.FoodNutritionProperties.SaturationLossDelay (field) [Obsolete("Use SatietyLossDelay instead.")] property that forwards to the new field SatietyLossDelay Use SatietyLossDelay.
Common.TrySpawnGroupDelegate and Server.IServerEventAPI.OnTrySpawnGroupNearOffthread Removed See section 14.
MathTools.Cuboidd and MathTools.Cuboidf intersection, push-out, Clone and OffsetCopyDouble methods Now virtual, so that the new rotated cuboids can override them See section 3.

Animation managers

  • The entity comes only from the constructor. The old null-entity early returns in StopAnimation and StopAllAnimations are gone. (AnimationManager.cs)
  • Frame callbacks:
    • they fire only while their animation is active and playing;
    • they are cleared when that animation is stopped or reset, and StopAllAnimations clears all of them, so register them again after a restart;
    • the new AnimFrameCallback.RepeatEachIteration makes a callback fire once per loop.
  • Animation sounds:
    • the sound listener now receives the animation code (meta.Animation), not meta.Code;
    • looping sounds are actually tracked now (in 1.22.7 the dictionary was passed by value and lost);
    • looping sounds stop when their animation stops or restarts, and follow the entity.

Animation codes and sync

  • Case of animation codes. AnimatorBase.OnFrame no longer lowercases ActiveAnimationsByAnimCode keys; StartAnimation lowercases them. A mixed-case key written straight into the dictionary is now treated as missing.
  • Metadata changes apply without a restart. Starting an animation that is already running, with different metadata, swaps the metadata in without restarting.
  • Sync to clients:
    • matching now goes by animation code plus CRC, so server-side metadata changes reach clients;
    • animations flagged ClientSide are no longer sent to clients.
  • SuppressDefaultAnimation is honoured more widely. It now applies to any active animation not started by the default animation, including animations started from code. (EntityAgent.cs)

Interpolation and shapes

  • Keyframe interpolation and blending:
    • RotShortestDistance is now applied when in-between frames are baked;
    • elements with weight 0 are skipped (except in “Add” blend mode);
    • “Add” blend mode uses the easing factor directly;
    • in retro mode animations run at 10 frames per second.
  • Shape changes:
    • InitForAnimations resolves joints once per Shape instance, so a later call with different requireJointsForElements is ignored;
    • element removal also matches the part of a name after @.

Damage and death

  • Knockback:
    • Entity.ReceiveDamage no longer forces the vertical knockback component;
    • DamageSource.YDirKnockbackDiv is still declared but nothing reads it;
    • knockback from entity attackers is scaled by the attacker-to-target weight ratio;
    • a new kbstrength watched attribute drives a knockback timer on the ground that ignores walk input.
  • Melee damage (EntityAgent, attack interaction):
    • the damage type comes from the held item (see section 8), and so does the knockback strength;
    • underwater damage multipliers now come from the world config: underwaterDamageMultiplier 0.7, underwaterFloatingDamageMultiplier 0.8, and underwaterSevereDamageMultiplier 0.2. The last one is skipped for piercing attacks and when the projectile’s ApplyUnderwaterPenalty is false.
  • Death and drops. Entity.Die records the death reason and damage type before GetDrops. Entity drops with a damageType drop only when the kill used that damage type.
  • Armour in the old JSON format gives no protection. The old keys are silently ignored, so the protection tiers stay empty: no damage reduction and no armour wear (inferred from the deserialiser’s behaviour). Note that vanilla’s own itemtypes/wearable/seraph/armor.json and armor-hide.json still use the old keys in pre.1.

Movement and teleporting

  • Teleporting.
    • Entity.TeleportToDouble now treats y as the internal Y, which includes the dimension. A dimension-local Y given for an entity in another dimension moves it to dimension 0 (inferred).
    • Teleports now broadcast the teleport packet and increment positionVersionNumber.
  • Collision scene. CollisionTester.ApplyTerrainCollision, MultiCollisionTester and the physics behaviours now also collide with colliders registered in the new World.CollisionScene. Standing on a collider sets OnGround, and “dry” colliders clear FeetInLiquid. CollisionTester.IsColliding(IBlockAccessor, …) is still terrain-only.
  • Passive physics:
    • on the server, EntityBehaviorPassivePhysics skips simulation for entities that are not controlled by the server;
    • it now overrides OnGameTick, so subclasses that override OnGameTick should call base (inferred).
  • Movement:
    • diagonal flight is normalised like walking;
    • gravity is skipped while swimming and pressing up;
    • liquid blocks’ walk-speed multipliers apply only when the feet are in liquid.
  • Head controller. Head angles update in first person; the body yaw locks to the seat when mounted with a fixed seat; head yaw and pitch are wrapped to ±π.

Other

  • FoodNutritionProperties.Clone now copies SatietyLossDelay, HealthDurationSec and HealthTicks. In 1.22.7 the delay was reset to 10.

Animation

  • Keyframe interpolation and tangents:
    • Common.EnumKeyFrameInterpolation (Linear, Bezier, Step), set per channel through AnimationKeyFrameElement.PositionInterp, RotationInterp and ScaleInterp;
    • Bezier tangents through OffsetTangentIn/OutX/Y/Z, RotationTangentIn/OutX/Y/Z and StretchTangentIn/OutX/Y/Z;
    • in JSON, for example "rotationInterp": "Bezier".
  • RunningAnimation.TimeScale; AnimationManager.AddActiveAnimation and ClearFrameCallbacks; AnimatorBase.RecalculateMatrices(); PlayerAnimationManager.StartHeldHitAnim(string, float).
  • Held items that animate:
    • when the holder plays an animation whose metadata has attributes: { animateHeldItem: true }, the item’s own shape plays its animation with the same code;
    • supporting members: new Client.ItemRenderInfo fields (AnimationModelRef, AnimationShape, AnimationModelVariant, AnimatedAttachmentStack, AnimatedAttachmentElement, AnimatedAttachmentTransform), Client.ITesselatorManager.GetAnimationCodes and GetAnimationModel, and GameContent.HeldItemAnimator in VSEssentials.

Collision

  • Common.ICollisionScene, reached through the new IWorldAccessor.CollisionScene:
    • RegisterCollider, RegisterTransformedCollider, UnregisterCollider and UnregisterEntityColliders;
    • Sweep, Raycast, GetColliders, GetIntersectingColliders and IntersectsAny;
    • supporting types Common.Collider, ColliderTransform, CollisionLayer, CollisionQueryFilter, CollisionHit and IEntityColliderProvider.
  • Standing on colliders, on Common.Entities.PhysicsBehaviorBase: MaxWalkableSlopeGrade (JSON maxWalkableSlopeGrade), StandingColliderId, TryStandOnCollider and IsInsideDryCollider; also Common.Entities.StandingColliderSync and StandingColliderPose.
  • CollisionTester.ClipColliderVelocity, IsWalkableColliderSurface, SupportingCollider and dimension-aware IsColliding overloads; MultiCollisionTester.CanTranslate and CanRotate.

Maths

  • MathTools.RotatedCuboidd, RotatedCuboidf, IRotatedCuboid<T,C>, RotatedCuboidMath, TransformedCuboidd and CuboidContact.
  • Cuboidd/Cuboidf.IsRotated() and HalfExtentX/Y/Z.
  • Common.ShapeColliderBuilder.Build(...): builds collision boxes from chosen shape elements.
  • MathTools.CollisionPlaneSolver, MathTools.BallisticsUtil.TrySolve (aim direction under gravity), and new AABBIntersectionTest.Testintersection overloads.

Entities and players

  • Entity additions:
    • identity: LogicalId, which survives growing up and basket traps;
    • control: IsControlledByClient, IsControlledByServer;
    • events: OnEntityJump, also on EntityBehavior;
    • sounds: TryGetEntitySound.
  • EntityPos.SetPosWithDimension; EntityStats.Remove(code); EntityAgent.TryUnmount(bool force) and RequestedHandUseCancelReason.
  • Melee on Common.EntityPlayer:
    • attack state: IsPerformingMeleeAttack;
    • hit freeze: StartHitFreeze, FinishHitFreeze;
    • damage modes: StageHeldAttackDamageMode, GetHeldAttackDamageType.
  • Melee damage modes: Common.IHeldAttackDamageModes and HeldAttackDamageMode.

Combat and food

  • Common.EnumDamageType.Tearing and Lava.
  • FoodNutritionProperties.SatietyLossDelay, HealthDurationSec and HealthTicks (healing over time).
  • Common.StatModifiers dictionaries (generalStats, positiveEffectStats, negativeEffectStats) with AddFrom, Apply and GetDescription.
  • Common.ICustomAttachableGear.AddGearToShape(...).

7. Entity behaviours, AI tasks, gaits and mounts (base mods)

Section titled “7. Entity behaviours, AI tasks, gaits and mounts (base mods)”
Was (1.22.7) Now (1.23.0-pre.1) What to do
Common.PathTraverserBase.NavigateTo (both overloads), NavigateTo_Async, FleeFrom, Flee_Async (VSEssentials), and the same overrides on Essentials.WaypointsTraverser Each takes an extra trailing optional GameContent.GaitMeta? preferredGait = null Callers recompile (the change breaks old binaries). Overriders add the parameter and store it in the new public field preferredGait.
PathTraverserBase.WalkTowards(..., EnumAICreatureType creatureType = Default), also on WaypointsTraverser WalkTowards(..., EnumAICreatureType? creatureType = null, GaitMeta? preferredGait = null) Overriders change the signature. The default is now null, not Default.
GameContent.AiTaskComeToOwnerR, AiTaskGetOutOfWaterR, AiTaskGetOutOfWaterConfig, AiTaskSeekBlockAndLayR, AiTaskSeekFoodAndEatR, AiTaskSeekFoodAndEatConfig, AiTaskStayCloseToEntityR, AiTaskStayCloseToEntityConfig [Obsolete("Use the original … instead")]. The -r task codes are still registered. Use or subclass the originals: AiTaskComeToOwner, AiTaskGetOutOfWater, AiTaskSeekBlockAndLay, AiTaskSeekFoodAndEat and AiTaskStayCloseToEntity. They were rewritten to absorb what the -r variants added (gait support, a JSON creatureType, tracking of failed seeks, a chance to seek food without eating, teleport chance and delay) and keep their old JSON keys.
GameContent.AiTaskFollowLeadHolderR, AiTaskFollowLeadHolderConfig (VSSurvivalMod) Removed, and so is the followleadholder-r task code Use GameContent.AiTaskFollowLeadHolder (followleadholder).
GameContent.AiTaskSeekFoodAndEat derived from Common.AiTaskBase Derives from the new GameContent.AiTaskSeekPoiBase<IAnimalFoodSource>; its CanContinueExecute, ContinueExecute and MinDistanceToTarget come from the base Overrides still compile. Put arrival work in OnArrival(), per-tick work at the target in TickTargetReached(), and abort conditions in ShouldAbort(). Set done = true to finish. Navigation is started for you in StartExecute.
GameContent.AiTaskSeekBlockAndLay derived from Common.AiTaskBase Derives from AiTaskSeekPoiBase<IAnimalNest>. lastPOISearchTotalMs, moveSpeed and targetPoi are inherited. porregistry became pointsOfInterest, and sitTimeNow became timeSinceTargetReached (inferred). nowStuck and sitAnimStarted are gone. MinDistanceToTarget() is now an override. Restructure around OnArrival, OnStuck and done. The sit animation now starts in OnArrival.
GameContent.AiTaskStayCloseToEntity derived from Common.AiTaskBase Derives from GameContent.AiTaskBaseTargetable. targetEntity is inherited (now Entity?); range became the inherited searchRange (default 8); entityCode has no field (JSON entityCode still read, entityCodes preferred) Rename and add null checks. Targeting now goes through the base class, so entityCodes and tags work.
AiTaskStayCloseToEntity.initialTargetPos, targetOffset (Vec3d) MathTools.FastVec3d (a struct) Use .Set(...). Null checks no longer compile.
AiTaskStayCloseToEntity.teleportToRange (int) float, now the maximum teleport scatter radius (default 4.5) Adjust reads and their meaning.
GameContent.AiTaskStayCloseToGuardedEntity.GetGuardedEntity() No longer declared on this class; the method that already existed on AiTaskBaseTargetable applies Callers compile unchanged. Behaviour may differ (inferred).
GameContent.AiTaskBaseTargetable.GetOwnGeneration() Moved to Common.AiTaskBase Recompile.
GameContent.AiTaskLookAtEntity.seekingRange (public field), GameContent.AiTaskSeekEntity.seekingRange (protected field), GameContent.AiTaskMeleeAttack.attackRange (protected field) Protected properties marked [Obsolete("Use searchRange instead")] that forward to searchRange Use AiTaskBaseTargetable.searchRange. ref uses no longer compile.
GameContent.AiTaskComeToOwner.CanContinueExecute, ContinueExecute; GameContent.AiTaskFollowLeadHolder.OnGoalReached Inherited from AiTaskStayCloseToEntity Recompile.
GameContent.AiTaskStayInRange.searchRange (protected field) Inherited AiTaskBaseTargetable.searchRange (public, default 25) Recompile.
GameContent.EntityBehaviorGait.Gaits (public readonly field), IdleGaits (public field) Properties with private setters You can no longer reassign them; editing their contents still works.
GameContent.GaitMeta.Direction (int) GameContent.EnumDirection (Backwards -1, Stationary 0, Forwards 1) Compare with enum values, or cast.
GameContent.GaitMeta.Sound (AssetLocation) [Obsolete("Use SoundCode instead")], still played as a fallback Use SoundCode, a key into the entity type’s sounds.
GameContent.EntityBehaviorMultiply.GiveBirth(float q) GiveBirth(), which spawns the litter chosen at conception Override GiveBirth() or ChooseLitterSize(). Spawn single offspring with the static SpawnNewborn(...).
EntityBehaviorMultiply.IsPregnant had a setter Get-only End a pregnancy with SetNotPregnant(); start one with MateWith(sire) or ConceiveLitter(...).
EntityBehaviorMultiply.PopulateSpawnEntityCodes(JsonObject) Removed; the logic is inlined in Initialize Override Initialize, call base, then set the protected SpawnEntityCodes.
GameContent.EntityBehaviorNameTag.SetName(string playername); field showNameTagOnlyWhenTargeted SetName(string? newName) plus static SetName(Entity, string?) and GetName(Entity); the field is [Obsolete("Use the property instead")] Fix named arguments; use ShowOnlyWhenTargeted.
GameContent.EntityBehaviorControlledPhysics Now also implements IRenderer and IDisposable, with virtual OnRenderFrame, RenderOrder (0.02), RenderRange and Dispose(). newPos and prevPos moved to Common.Entities.PhysicsBehaviorBase. Subclasses that implemented IRenderer themselves override these members instead.
GameContent.EntityBehaviorPlayerPhysics implemented IRenderer and IDisposable itself, with Dispose(), RenderOrder (1) and RenderRange Inherits them from EntityBehaviorControlledPhysics; OnRenderFrame is now an override Override the base members. The render order changed from 1 to 0.02.
GameContent.EntityBehaviorSelectionBoxes.Testintersection(Cuboidd, Ray) Removed Use the static MathTools.AABBIntersectionTest.Testintersection(Cuboidd, Ray, ref Vec3d).
GameContent.EntityProjectile.ApplyGravity, IsInteractable; GameContent.EntityThrownItem.IsInteractable Inherited from EntityProjectileBase Recompile.
GameContent.EntityThrownItem.Initialize(...) override Removed; its setup moved to AfterInitialized(bool) Overrides of Initialize still compile.
GameContent.ClothSystem.pp, ClothSystem.OnPinnnedEntityLoaded(Entity) ParticlePhysics; OnPinnedEntityLoaded(Entity) (typo fixed) Rename.
GameContent.ElkAnimationManager(), EidolonAnimManager(), PersonalizedAnimationManager(), RemapAnimationManager() and RemapAnimationManager(Dictionary<string,string>) Constructors take (Entity entity); RemapAnimationManager also has (Entity, Dictionary<string,string>) Pass the entity.
GameContent.ErelAnimManager() with an Init override, and onReceivedServerAnimation(AnimationMetaData) ErelAnimManager(EntityErel); the Init override is gone; onReceivedServerAnimation(ref AnimationMetaData) Pass the entity; add ref.
Common.EntityBehaviorPassivePhysicsMultiBox.InitServer(ICoreServerAPI) (VSSurvivalMod); mcollisionTester ([ThreadStatic] field) InitServer removed; mcollisionTester is a static get-only property. Per-thread testers come from the new Common.ModSystemThreadStaticCollisionTester. Delete the call; do not assign the property.
GameContent.EntityBehaviorSeatable Also implements IRenderer and IDisposable, explicitly Subclasses that implement IRenderer re-implement the interface; check which members win.
GameContent.EntityElevator with ISeatInstSupplier, IMountableListener, CreateSeat, DidMount, DidUnmount, IsCreature, MountAnimations; type GameContent.EntityElevatorSeat All removed. Riders now stand on a kinematic collider. No direct replacement found.
GameContent.EntityBoat.IsCreature (returned true), GameContent.EntityElevator.IsCreature Overrides removed; the base value (false) applies See behaviour changes below.
GameContent.EntityBobber.SwimmingOffsetY (returned 0.2), EntityBobber.accum Override and field removed; the bobber is now a state machine Override SwimmingOffsetY yourself if you relied on it. No direct replacement found for accum.
GameContent.ItemKnife.knifeHitBlockAnimation, knifeHitEntityAnimation, OnLoaded override Removed. Block hits use HeldTpHitAnimation; everything else uses the base hit animation logic No direct replacement found; the item attributes are ignored.
GameContent.ItemFishingPole.cm clothManager Rename.
GameContent.EntityBehaviorRideable, EntityBehaviorRopeTieable, EntityBoat Gained interfaces IMountedHungerProvider, IRopeRippedListener, IKinematicColliderTransformProvider Additive.

AI tasks

  • A diet is now required. AiTaskSeekFoodAndEat throws in its constructor if the entity has no creatureDiet attribute; 1.22.7 only logged a warning.
  • Tamed generation counts for every task. Every task’s minGeneration and maxGeneration now use GetOwnGeneration(), which adds 10 when the entity type has tamed: true. Before, only targetable tasks did.
  • Task animations stop by animation name. AiTaskBase.FinishExecute stops animMeta.Animation, not animMeta.Code.
  • Laying. AiTaskSeekBlockAndLay honours JSON portionsEatenForLay (1.22.7 forced it to 3); its default execution chance dropped from 0.03 to 0.01.
  • Failed seeks. A food source or nest that failed to path is skipped for 60 s, or for 240 s after more than four failures.
  • Fleeing. AiTaskFleeEntity no longer reads the task-level aiCreatureType; use creatureType. Its targets are no longer limited to EntityAgent.
  • Staying close.
    • With no entityCode or entityCodes, AiTaskStayCloseToEntity now targets players by default; before, it targeted nothing.
    • Matching supports wildcards and tags.
    • With navigateUsingGaits, it picks a gait to match the target’s speed.
  • Gait codes are checked strictly. A wrong preferredGait or fastestGait code on wander, get-out-of-water, seek-entity, flee or stay-close throws KeyNotFoundException when the task is initialised.

Gaits and pathfinding

  • Gaits drive movement. With navigateUsingGaits, WaypointsTraverser and StraightLineTraverser drive EntityBehaviorGait.SetMotion instead of turning and walking the entity themselves.
  • No client-side path search. WaypointsTraverser now looks up the path finder only on the server.
  • EntityBehaviorGait changes:
    • it moves the entity only on the side that controls it;
    • the initial idle gait is set only on the server;
    • GetYawMultiplier() falls back to 1 (it was 3.5).

Breeding

  • EntityBehaviorMultiply rework:
    • breeding stops when the area is crowded;
    • litter size is fixed at conception;
    • pregnancy length varies;
    • miscarriage is optional;
    • mates avoid close relatives;
    • offspring record mother, father and foster ids;
    • saves with the old isPregnant flag are converted.
  • Code domains. Its JSON is read with the entity’s own domain, and spawn codes resolve in that domain, so a mod entity that names vanilla entities must now write game:.
  • Growing up. EntityBehaviorGrow copies the name tag, genetics, parent ids and LogicalId to the adult.

Names, hunger and health

  • Name tags. EntityBehaviorNameTag.GetName replaces the default name only when a name is set and ReplaceDefaultName is true. SetName("") clears the name.
  • Hunger.
    • The default satiety loss rates changed: 0.24/s base, 0.72/s moving or swimming, 2.22/s sprinting, 0.1 per jump.
    • While mounted, the rider’s own movement adds nothing. Only an IMountedHungerProvider on the mount adds drain, so a modded mount without one costs only the base rate.
  • Health. EntityBehaviorHealth reads and displays the new damageMultipliers JSON. As written in pre.1, its condition never applies the multipliers (source: BehaviorHealth.cs, the index check).

Physics, mounts and boats

  • Kinematic colliders.
    • Entities can stand on kinematic colliders (boats, elevators, platforms).
    • Swimming and feet-in-liquid are suppressed on dry colliders.
    • Creatures are kept from walking off a carrier.
  • Player push. EntityBehaviorRepulseAgents had its player2PlayerCollisions check inverted. With the fix, players now push each other unless the setting is false.
  • Boats and elevators are no longer creatures. EntityBoat and EntityElevator report IsCreature == false. Searches with EnumEntitySearchType.Creatures no longer find them, and the entity map layer skips them.
  • Rideables.
    • Saddle-break setup moved to AfterInitialized.
    • A shape animation named <anim>-rider replaces the mount’s animation while it is ridden.

Selection boxes, cloth and pickup

  • Selection boxes. EntityBehaviorSelectionBoxes.IsAPCode now accepts box index 0 (an off-by-one fix), and boxes can be gated on the training attribute.
  • Cloth. IRopeRippedListener is delivered through Entity.GetInterface, and a rope deactivates when one of its points is in an unloaded chunk.
  • Item pickup. EntityBehaviorCollectEntities now only scans inanimate entities.
  • GameContent.AiTaskSeekPoiBase<T>: base class for seeking a point of interest. It has hooks OnArrival, TickTargetReached and ShouldAbort, and JSON moveSpeed, preferredGait and creatureType.

  • Other AI tasks:

    • AiTaskStayCloseToEntity.ChooseNextGait and FindDecentTeleportPos;
    • AiTaskManager.ContinueTask(IAiTask, float).
  • Gaits: GameContent.EnumDirection, and EntityBehaviorGait members NavigateUsingGaits, SetMotion(...), ChooseGait(...) and GetTargetEnvironment().

  • Breeding: EntityBehaviorMultiply.MateWith, ConceiveLitter, ChooseLitterSize, SetNotPregnant, and static SpawnNewborn, IsCloseRelative and ChooseAvoidingCloseRelatives.

  • Genetics: entity behaviour genetics (GameContent.EntityBehaviorGenetics), and GameContent.ModSystemGenetics with RegisterInterpreter(code, factory).

  • New entity behaviours:

    • colliders and hit boxes: kinematiccollider (EntityBehaviorKinematicCollider), hitboxgroups;
    • state and memory: memory, timers, visibility, sight, state-tree, states, abilities;
    • reactions: animate, damagereactions, ellipsoidalrepulseagents.

    Several of these, especially the state-tree and abilities systems, have thin documentation, and whether they are meant for mod use yet is not clear.

  • GameContent.IMountedHungerProvider.OnMountedHungerTick.

  • GameContent.ILayeredAttachableToEntity.

  • GameContent.SelectionBoxConfig (Name, MinTraining).

  • GameContent.EntityUtil.RestrictedByOwnership(onEntity, byEntity).

  • GameContent.EntityKinematicPlatform (VSCreativeMod): a moving test platform.

8. Blocks, block entities, items and collectibles

Section titled “8. Blocks, block entities, items and collectibles”

No virtual method on Common.CollectibleObject, Common.Block, Common.BlockBehavior, Common.CollectibleBehavior, Common.BlockGeneric or Common.StrongBlockBehavior was removed or had its signature changed. They only gained members. The breaking changes are in the base mods and in a few property types.

Was (1.22.7) Now (1.23.0-pre.1) What to do
GameContent.IContainedInteractable: all members took GameContent.BlockEntityContainer be; Help, Start, Step and Stop were abstract Every member takes Common.BlockEntity be. Only OnContainedInteractStart is abstract. The others now have defaults: Help returns an empty array, Step returns false, Stop does nothing, Cancel returns true. Change the parameter type and cast be yourself (for example be is BlockEntityGroundStorage, or be.GetBehavior<BEBehaviorDisplay>() on display blocks; shelves are no longer containers). You can delete trivial Step and Stop implementations.
Implementers changed accordingly: GameContent.BlockCookedContainerBase, BlockCrock, BlockLantern, BlockLiquidContainerTopOpened, BlockMeal (now virtual, with a new Cancel), CollectibleBehaviorGroundStoredHeldBag, CollectibleBehaviorGroundStoredProcessable, ItemFishingPole (now virtual), ItemOre New parameter type Subclass overrides change the parameter type.
OnContainedInteractStep/Stop (and BlockLantern.GetContainedInteractionHelp) on BlockCookedContainerBase, BlockLantern, BlockLiquidContainerTopOpened, CollectibleBehaviorGroundStoredHeldBag, ItemFishingPole Removed; the interface defaults apply A call through a class-typed reference no longer compiles; cast to IContainedInteractable.
GameContent.IAttachableToEntity.GetAttachedShape(ItemStack stack, string slotCode) (VSEssentials) GetAttachedShape(ItemStack stack, Entity onentity, string slotCode). No default bridge; onentity can be null. Implementers changed: GameContent.BlockChisel, BlockCrate, BlockFigurehead, BlockGenericTypedContainer, ItemAnchor, AttributeAttachableToEntity (which also gained a layer overload and ILayeredAttachableToEntity) Change every implementation and call site.
Common.CrushingProperties.Quantity, Common.TransitionableProperties.FreshHours and TransitionHours (NatFloat) MathTools.INatFloat Read .Average instead of .avg; see section 16.
Common.FoodNutritionProperties.SaturationLossDelay (field) Obsolete property; use SatietyLossDelay See section 6.
Common.FastSearchCraftingRecipeIngredient(CraftingRecipeIngredient parent) FastSearchCraftingRecipeIngredient(CraftingRecipeIngredient parent, IWorldAccessor worldForResolve) Pass the world. It is normally built for you by CraftingRecipeIngredient.Resolve(world, source, recipe).
Common.ItemStack, Datastructures.ItemstackAttribute, Datastructures.TreeAttribute Also implement Datastructures.IHashWithIgnoredAttributes No action.
GameContent.BlockEntityShelf : BlockEntityDisplay BlockEntityShelf : Common.BlockEntity. The shelf now runs on the display system: block behaviours BlockEntityInteract and Display (GameContent.BlockBehaviorDisplay), and block entity behaviour Display (GameContent.BEBehaviorDisplay). Rewrite a subclass against BEBehaviorDisplay. Its inventory is InventoryInv; placement surfaces come from BlockBehaviorDisplay.PlacementSurfaces. Old saves are migrated on load.
Removed from BlockEntityShelf: inv, slotCount, CanPlace, CanUse, OnInteract, GetSlotType, Inv_OnAcquireTransitionSpeed; and, with the old base class, Inventory, InventoryClassName, AttributeTransformCode, genTransformationMatrices No direct replacements; the logic lives in BEBehaviorDisplay and BlockBehaviorDisplay. Items opt in through IShelvable or JSON (section 17).
GameContent.BlockShelf.OnBlockInteractStart, GetPlacedBlockInteractionHelp overrides Removed; handled by the block behaviours Callers are unaffected.
GameContent.BlockPie overrides OnHeldInteractStart, OnHeldInteractStep, OnHeldInteractStop, UpdateAndGetTransitionState, GetContentNutritionFacts Removed. Eating goes through CollectibleObject, gated by the new CanEat; the rest falls to BlockMeal or the base. Callers are unaffected. A subclass calling base.X gets the base behaviour.
BlockPie.canEat(ItemSlot) (protected) public override bool CanEat(ItemSlot, EntityAgent?) Override CanEat.
BlockPie.FillingFoodCategory(ItemStack) (static), BlockPie.UnspoilContents (protected) Removed No direct replacement found. For the first, InPieProperties.ReadFrom(stack)?.FoodCategory is the nearest (inferred).
BlockPie.GetOnShelfTransform(ItemStack) Replaced by IShelvable.GetOnShelfTransform (default null) plus BlockPie.GetDisplayableProps(slot, displayType) Use those.
GameContent.BlockEntityPie.HasCrust Removed. New: ToppingType (EnumPiePartType?), PieBlock, PieContents, CanAddIngredient(...) Test ToppingType == EnumPiePartType.Crust (inferred replacement).
GameContent.InPieProperties.FoodCategory (EnumFoodCategory?) EnumFoodCategory, default NoNutrition. PartType is now required. Test for NoNutrition instead of null. Read pie properties with InPieProperties.ReadFrom(...), which validates them.
GameContent.BlockBed : Block, IClaimTraverseable with an OnEntityCollide override IClaimTraverseable dropped; the bounce moved to the new block behaviour BounceOnImpact (GameContent.BlockBehaviorBounceOnImpact) Add the behaviour in JSON.
GameContent.BlockBellows.OnEntityCollide, GameContent.BlockSmeltedContainer.OnBeforeRender and OnHeldIdle overrides Removed. BlockSmeltedContainer now implements Common.IHeldParticleEmitter.SpawnHeldParticles for pouring particles. Callers are unaffected.
GameContent.BlockEntityAnvilPart.FromTreeAttributes/ToTreeAttributes overrides Removed; they only called base No action.
GameContent.BlockEntityMicroBlock.CreateDecalMesh(ITexPositionSource) and the static CreateDecalMesh(ICoreClientAPI, List<uint>, ITexPositionSource, uint[]) Removed. New instance method CreateDecalMeshes(ITexPositionSource, out MeshData blockMesh, out MeshData decalMesh) In GetDecal, assign both outputs, as BlockMicroBlock.GetDecal does (section 11). There is no static equivalent.
GameContent.BEBehaviorFruitingBushMesh.ensureMeshExists() ensureMeshExists(ITexPositionSource texSource) Pass a texture source (vanilla passes this).
GameContent.BlockEntitySignPost.GetTextForDirection(Cardinal); public field textByCardinalDirection Method removed; field now protected No replacement accessor. Subclass, or read the tree attributes text0 to text7.
GameContent.CollectibleBehaviorSqueezable.SqueezedLiquid Removed Use GetLiquidStack(ItemSlot).
CollectibleBehaviorSqueezable.CanSqueezeInto(IWorldAccessor, Block, BlockSelection) [Obsolete]; no longer called Override CanSqueezeInto(ItemSlot?, IWorldAccessor, Block, BlockSelection?).
GameContent.BlockEntityFruitPress.getJuiceableProps, GameContent.CollectibleBehaviorHandbookTextAndExtraInfo.getjuiceableProps and getDistillationProps [Obsolete] Use JuiceableProperties.ReadFrom(ItemStack, IWorldAccessor) and DistillationProps.ReadFrom(ItemStack, IWorldAccessor).
GameContent.ItemCrowbar.getBeh(BlockSelection) (protected) Removed; the class now implements IHeldItemOnMouseWheel Use public static ItemCrowbar.getBeamBehavior(ICoreAPI, BlockSelection).
GameContent.ItemRope.TryMergeStacks override Removed; the base merge rules apply Ropes now merge only when their attributes are equal.
GameContent.ItemFishingPole.LoadHeldItemModelMatrix(...) (public static) Public virtual instance method Call it on the item instance.
GameContent.FishingSupportModSystem Now sealed It can no longer be subclassed.
GameContent.BEBehaviorDisplay, BEBehaviorMannequin, BlockCookingContainer, BlockSnow, BlockWateringCan, BlockPan, BlockLantern, ItemShieldFromAttributes, CollectibleBehaviorTypedTexture Gained interfaces (IInteractableWithHelp, ILongInteractable, IContainedInteractable, ICustomSnowAccumBehavior, IContainedCustomName, IHandBookPageCodeProvider, IHandbookListGrouping, IContainedMeshSource) Additive. CollectibleBehaviorTypedTexture also gained a protected capi field, so a subclass field with that name now hides it (warning CS0108).

Doors, gates, trapdoors and firepits as static meshes

Section titled “Doors, gates, trapdoors and firepits as static meshes”

The announcement says open doors, gates and trapdoors, and inactive firepits, now become static meshes. The source confirms it:

  • How the baking works:
    • GameContent.BEBehaviorAnimatable now builds its animation helper through the new virtual CreateAnimationUtil.
    • GameContent.BlockEntityAnimationUtil waits a settle time, then bakes the final pose into the chunk mesh and stops the dynamic renderer. The settle time is ceil(8 / easingSpeed) seconds; easingSpeed defaults to 10, giving 1 s.
    • StartAnimation and StopAnimation wake it up again.
  • What a subclass must now do:
    • call animUtil.RefreshStaticMesh() after changing the renderer’s rotation, scale or custom transform;
    • call NotifyAnimationChanged() after changing the animator directly;
    • respect the return value of base.OnTesselation.
  • Options for animations that keep moving:
    • For moving or looping poses, pass a canBakePose predicate to the new constructor BlockEntityAnimationUtil(api, be, settleDurationSeconds, canBakePose).
    • To opt out entirely, override CreateAnimationUtil and return the old-style new BlockEntityAnimationUtil(api, be).
  • Side effects:
    • Baked meshes drop custom vertex data (joint ids and damage effects).
    • The animator does not advance while the mesh is static.
  • Firepit. A clay pot in a firepit below 50 °C becomes part of the terrain mesh. IInFirepitRendererSupplier and IInFirepitMeshSupplier are now found through GetCollectibleInterface, so collectible behaviours can supply them.

(Source: vsessentialsmod BlockEntityBehavior/BlockEntityAnimationUtil.cs and BEBehaviorAnimatable.cs; vssurvivalmod BEBehaviorDoor.cs, BEBehaviorTrapDoor.cs, BEBehaviorCabinetDoors.cs and BEFirepit.cs.)

Combat and held items

  • Melee damage type. In 1.22.7 every held-item melee hit dealt BluntAttack. It now uses EntityPlayer.GetHeldAttackDamageType(slot), then CollectibleObject.GetDamageType(stack). The new field CollectibleObject.DamageType defaults to SlashingAttack for every item and block, and knockback comes from GetKnockbackStrength. If your weapon should stay blunt, set damageType in JSON or override GetDamageType. (Common/Entity/EntityAgent.cs, Common/Collectible/Collectible.cs)
  • Hit animations. CollectibleObject.GetHeldTpHitAnimation first asks the player for a combo, sprint or aim animation, and falls back to HeldTpHitAnimation.
  • OnHeldActionAnimStart reaches behaviours. CollectibleObject.OnHeldActionAnimStart now calls each behaviour’s new OnHeldActionAnimStart. An override that does not call base cuts off behaviours such as AnimationAuthoritative.

Eating

  • Eating is gated by the new CanEat. For interaction help, GetHeldInteractionHelp calls CanEat(slot, null). That calls GetNutritionProperties(null, stack, null), passing a null world (it used to pass api.World). Overrides of GetNutritionProperties and similar property getters must cope with a null world.
  • Eating effects:
    • the satiety loss delay now scales with spoilage;
    • the eaten stack goes into the slot only if the slot can hold it;
    • the health effect uses the new HealthDurationSec and HealthTicks.

Names and block events

  • Custom names. GetHeldItemName returns the stack attribute customName (translated) when present, and GetHeldItemInfo uses customDesc for the description.
  • Block events now reach block behaviours. Block.OnEntityInside, Block.OnEntityCollide and Block.GetDecal walk the block’s behaviours before running the default. A block subclass that overrides them without calling base skips its behaviours.
  • Breaking sounds and snow. Block.OnGettingBroken skips the hit sound when the held hit animation defines damage frames and the estimated break time is at least 2 s. Removing a snow cover now uses ExchangeBlock, which keeps the block entity.

Recipes

  • Crafting attribute matching. A wildcard or tag CraftingRecipeIngredient that sets attributes now also requires the input’s attributes to contain them. Such ingredients return false if they were resolved without the three-argument Resolve(world, source, recipe). (Common/Crafting/CraftingRecipeIngredient.cs)

Inventories and storage

  • Bags. BagInventory.GetEnumerator returns a snapshot of the slots.
  • Shelves and display blocks. IContainedInteractable here receives a BlockEntity that is not a container. The default OnContainedInteractStep returns false, so a long interaction ends after Start unless you implement Step.
  • Pies. InPieProperties.ReadFrom validates pie ingredients and rejects invalid ones with an error. Liquids are allowed.
  • Containers and drops.
    • BlockLiquidContainerBase returns full-container sounds when filled.
    • BlockGenericTypedContainer.GetDrops returns the typed stack.

Other blocks

  • AttributeAttachableToEntity now tries the shape by variant and slot, then by variant, then by slot, then attachedShape.
  • Bed claims. A bed in someone else’s land claim now needs Use permission rather than Traverse (inferred).
  • Firepits. A firepit registers its tick listeners only when its code does not contain “construct”.
  • Fruiting bushes. BEBehaviorFruitingBush.Initialize throws if the block lacks BlockBehaviorFruitingBush.

CollectibleObject and its behaviours

  • New fields on Common.CollectibleObject:
    • DamageType, KnockbackStrength;
    • HeldTpHitCombo (and its High, Mid and Low variants), HeldTpHitSprintAnimation.
  • New virtual methods:
    • GetDamageType, GetKnockbackStrength, GetHeldSounds(stack, pos);
    • CanEat, GetMaterialDensity;
    • IsToolModeToggle (the tool-mode key cycles the mode instead of opening the dialog);
    • OnPlacementBySchematicCustom(sapi, slot, tree).
  • New methods on Common.CollectibleBehavior: GetDamageType, GetKnockbackStrength, IsToolModeToggle, OnHeldActionAnimStart.

Blocks and their behaviours

  • New methods on Common.BlockBehavior: OnEntityInside(..., ref handling), OnEntityCollide(..., ref handling), GetDecal(...).
  • New on Common.Block:
    • GetEstimatedBreakingTime(player, sel, slot);
    • BleedCornerOverlayTexture;
    • FastBlockPos overloads of GetBlockEntity<T>, GetBEBehavior<T> and GetInterface<T>. These are separate virtuals, and vanilla BlockMPMultiblockBase overrides both GetInterface overloads, so mods that override GetInterface should too (inferred).
  • Common.StrongBlockBehavior.GetDropsForHandbook(stack, player, ref handled).
  • BlockEntity.OnPlacementBySchematicCustom and BlockEntityBehavior.OnPlacementBySchematicCustom: placement data such as dungeon keys (section 14).

New interfaces

  • Common.IHeldParticleEmitter.SpawnHeldParticles: client side, each frame, for held stacks. It works on the item or block class, not on a behaviour.
  • Common.IHeldAttackDamageModes and HeldAttackDamageMode.
  • Common.ICustomSnowAccumBehavior.

Inventories and item stacks

  • Common.EnumItemUseCancelReason.PlayerTriggered.
  • InventoryBase.BeginMultiUpdate(), EndMultiUpdate() and DidAutoMove(...); event InventoryGeneric.OnDidAutoMove.
  • JsonItemStack.FromItemStack(world, stack, ignoreAttributes), ModelTransform.Lerp(a, b, t), BakingProperties.Clone().

Base mods

  • IShelvable and EnumShelvableLayout (now used generally); BEBehaviorDisplay.SetMeshAngleRad and MarkDisplayDirty; InPieProperties.ReadFrom; BlockPie.GetRandomCrustType.
  • New block behaviours BounceOnImpact and DamageOnTouch. The old GameContent.BlockDamageOnTouch class moved to a Legacy folder in the source; it is unchanged and not marked [Obsolete].
  • Systems/CombinedWearables (VSSurvivalMod): modular armour, a crafting stand, and collectible behaviours CombinedWearable, CombinedWearableStats, CombinedWearableArmor and others.
  • GameContent.CollectibleBehaviorDamageModes (DamageModes) and CollectibleBehaviorObbMeleeSweep (ObbMeleeSweep) in VSEssentials. The sweep is active only when the world config obbCombat is true, which is off by default.
Was (1.22.7) Now (1.23.0-pre.1) What to do
GameContent.Mechanics.BEBehaviorMPBase.lastKnownAngleRad, GameContent.Mechanics.MechanicalNetwork.angle and serverSideAngle (float) double Cast where you store them into a float. AngleRad is still a virtual float; the new UnreversedAngleRad and MechanicalNetwork.TotalAngleRad are double.
GameContent.Mechanics.BEBehaviorMPConsumer.AngleRad, BEBehaviorMPWaterWheel.AngleRad Overrides removed; the base AngleRad applies. The water wheel’s dir field was removed in favour of a protected TorqueDirection. Override TorqueDirection if you need direction (inferred).
BEBehaviorMPAngledGears.CheckLargeGearJoin(), LargeGearAngleRad(float), OnTesselation override Renamed checkLargeGearJoin() (protected) and GetLargeGearAngleRad(float); override removed Rename.
GameContent.Mechanics.BlockAngledGears.getGearBlock(...) GetGearBlock(...), same parameters Rename.
GameContent.Mechanics.BlockSpurGear.Orientation (protected) orientation, orientations (protected), public SpurFacing and SpurFacings Rename.
GameContent.Mechanics.BEPulverizer.hasAxle, hasLPounder, hasRPounder, hasPounderCaps, ToTreeAttributes override; getDrops(...) Fields removed; fitted parts live in inventory slots exposed as ToggleStack, LeftPounderStack, RightPounderStack, LeftCapStack and RightCapStack, with CanCrush(bool right) and IsComplete. getDrops is [Obsolete("Fitted parts now drop from Inventory. Use Block.GetDrops() for the frame.")]. Use the stack properties. For hasAxle there is no exact replacement; ToggleStack is the closest (inferred).
GameContent.Mechanics.BlockMPMultiblockGear, BlockMPMultiblockPulverizer derived from Common.Block Derive from the new GameContent.Mechanics.BlockMPMultiblockBase, which now holds their shared overrides Recompile subclasses.
GameContent.BlockGrindingWheel : BlockMPConsumer BlockGrindingWheel : GameContent.Mechanics.BlockAxleAttachment; its interaction and connector overrides were removed (the wheel now mounts on an axle) Re-base subclasses.
GameContent.BlockEntityMechPoweredBellows.connected, mpc, renderer; protected animUtil and capi Fields removed; animUtil and capi are private. The class is now driven by a linkage rod (GameContent.Mechanics.ILinkageConsumer, ILinkageEndpoint) Rewrite a subclass against the linkage interfaces.
BEBrake.Initialize, BEMPMultiblock.Initialize and OnBlockPlaced, BlockArchimedesScrew, BlockBrake and BlockToggle OnNeighbourBlockChange, BlockLargeGear3m.OnLoaded, BlockPulverizer.GetDrops overrides Removed Callers are unaffected.
Seven mechanical power block entities and behaviours, plus GameContent.BlockEntityGrindingWheel Now implement Common.IRotatable (rotation when a schematic is placed) Additive. Implement IRotatable on your own block entity if it stores a direction in its tree attributes (inferred).

Behaviour changes:

  • Connections are checked from both sides. HasMechPowerConnectorAt must be true on both blocks, and their ConnectorFlags must be compatible.
  • Network acceleration is now divided by the summed rotational inertia (each node’s GetRotationalInertia() times its gear ratio squared, default 1). It used to be nodes^0.25, so large networks speed up and slow down differently. (Systems/MechanicalPower/Network/MechanicalNetwork.cs)

New:

  • IMechanicalPowerNode.GetTorqueResponse and GetRotationalInertia, both default-implemented.
  • On BEBehaviorMPBase: CurrentSpeed, EffectiveGearedRatio, GetPlacedStack, HasGearingConflict.
  • On MechanicalNetwork: GetLoad, HasPowerProducer.
  • On BlockMPBase: ConnectorFlags, RotationalInertia.
  • EnumMechanicalPowerConnectorFlags.
  • The linkage system: ModSystemLinkage, ItemLinkage, ILinkageProducer/ILinkageConsumer/ILinkageEndpoint.
Was (1.22.7) Now (1.23.0-pre.1) What to do
Common.ICoreAPICommon.RegisterRecipeRegistry<T>(string) where T : RecipeRegistryBase (abstract) [Obsolete("Use RegisterCustomRegistry instead")] default method. New abstract RegisterCustomRegistry<T>(string customRegistryCode) where T : CustomRegistryBase Switch to RegisterCustomRegistry. RegisterRecipeRegistry<RecipeRegistryGeneric<X>> no longer compiles, because RecipeRegistryGeneric<T> is no longer a RecipeRegistryBase (error CS0311).
Common.IWorldAccessor.GetRecipeRegistry(string) returning RecipeRegistryBase [Obsolete("Use GetCustomRegistry instead")] default method returning CustomRegistryBase. New GetCustomRegistry(string) Call GetCustomRegistry and cast (as RecipeRegistryGeneric<X>).
Common.RecipeRegistryBase (abstract, declaring ToBytes and FromBytes) [Obsolete("Use CustomRegistryBase instead")] empty subclass of the new Common.CustomRegistryBase, which now declares those two abstract methods Derive from CustomRegistryBase; your overrides compile unchanged.
Common.RecipeRegistryGeneric<T> : RecipeRegistryBase : CustomRegistryBase T must implement IByteSerializable.FromBytes(ref BinarySpanReader, IWorldAccessor). A test is RecipeRegistryBase on it now fails.
Common.FastSearchCraftingRecipeIngredient(parent) Needs a world too See section 8.

The announcement names the new registration method “RegisterCustomRecipe”. The source and the compiled API call it RegisterCustomRegistry.

New: CustomRegistryBase is a general server-to-client synchronised registry for any custom asset type, not only recipes. VSEssentials’ GameContent.GenomeTypeRegistry is an example.

JSON: an ingredient’s recipeAttributes.attributeWildcards expands a recipe’s allowedVariants into attributes (Common/Crafting/RecipeBase.cs).

Was (1.22.7) Now (1.23.0-pre.1) What to do
Client.CompositeTexture.BlendedOverlays (public field) Property Recompile. Only ref/out uses break in source. JSON is unchanged.
Common.BitmapExternal.bmp (public settable field) Get-only property; throws ObjectDisposedException after Dispose() Supply the SKBitmap through a constructor. Do not read bmp after disposing.
Common.SurfaceDrawImage.Image(ImageSurface, BitmapRef, int, int, int, int) [Obsolete], and now throws ArgumentException unless the bitmap is a BitmapExternal Use the overload that takes a BitmapExternal.
Client.ModelDataPoolLocation.CullVisible, FrustumVisible, Hide, LodLevel (fields) Properties. While the location is in a pool, they read and write the pool’s internal arrays. Recompile; no ref/out. Do not set CullVisible to null (inferred: null marks a free slot internally).
Client.ModelDataPoolLocation.IsVisible(EnumFrustumCullMode, FrustumCulling) Removed; culling now lives in internal code No direct replacement found. Let MeshDataPool.FrustumCull and Draw do the culling, or rebuild the check with Hide, CullVisible, LodLevel and FrustumCulling.InFrustum, InFrustumShadowPass and InFrustumAndRange (inferred, mirrors the removed code).
Client.FrustumCulling.InFrustumAndRange(Sphere, bool nowVisible, int lodLevel = 0) InFrustumAndRange(Sphere, int lodLevel = 0) Drop the bool; it was unused.
Client.ITextureAtlasAPI Adds InsertTextureOrAddReference (three overloads) and ReleaseTextureReference(AssetLocation) Only implementers must add them. Usage is under behaviour changes.
Client.IRenderAPI, Client.IShaderProgram, Client.IStandardShaderProgram, Client.ITesselatorManager Gained abstract members (Appendix B) Only implementers and wrappers must add them.
GameContent.AnvilWorkItemRenderer.ModelMat, origin (protected) Private No replacement found; keep your own in subclasses.
GameContent.MealMeshCache.pieMixedCategoryFillingTextures; pieMixingCodeFillingTextures assignable First removed; second now readonly. Mixed fillings use block/food/pie/fill-mixed<first shared mixing code>, otherwise fill-unknown with an error Ship one texture per mixing code. You can still add dictionary entries.
GameContent.ModSystemSupportBeamPlacer.GetAlignMatrix(IVec3, IVec3, BlockFacing) Removed. New GetBeamTransform(double dX, double dY, double dZ, out float yaw, out float pitch, out float endExtension) Build the matrix yourself from the new outputs.
ModSystemSupportBeamPlacer.generateMesh(..., float slumpPerMeter) Gains float scale = 1 Recompile.
GameContent.BlockEntityMicroBlock.CreateDecalMesh (both) Removed See section 8.
GameContent.MapLayer.OnViewChangedServer(IServerPlayer, List<FastVec2i>, List<FastVec2i>) and the overrides in WaypointMapLayer and OreMapLayer (obsolete since 1.20.10) Removed Override OnViewChangedServer(IServerPlayer fromPlayer, int x1, int z1, int x2, int z2).

Texture atlas reference counting. Existing mods keep their 1.22.7 behaviour; no old method became reference-counted. The new counted path works like this:

  • Inserting. InsertTextureOrAddReference inserts a texture with a count of 1, or adds 1 to an existing count. If the texture already exists permanently, the count is untouched and the texture stays permanent.
  • Releasing. ReleaseTextureReference(loc) decrements the count and frees the space when it reaches zero. For the CompositeTexture overload, release ct.Baked.BakedName.
  • Mixing with the old methods:
    • GetOrInsertTexture still inserts permanently, and makes a counted texture permanent;
    • FreeTextureSpace frees at once, whatever the count.
  • Threading. Main thread only, per the doc comments.

Use the counted path for textures made per instance or at run time. Acquire the new texture before releasing the old one, and release every key you hold on unload. Vanilla examples: vsessentialsmod Entity/Behavior/BehaviorGenetics.cs, vssurvivalmod Systems/MechanicalPower/Renderer/MechanicalMaterialTextureSource.cs. (Engine: TextureAtlasManager.)

Client.MeshDataPool.TryAdd. An empty pool now takes its origin from the first modelOrigin. Later meshes are offset relative to it, and meshes more than 5000 blocks away are refused (null). Passing a null modelOrigin now throws NullReferenceException. Pass one fixed origin for every add, and use it for your shader’s origin uniform. (Client/MeshPool/MeshDataPool.cs)

Decals across atlas pages. As the announcement says, the decal renderer now keeps one pool per block atlas page and draws each with its own page. Contract for Block.GetDecal overrides:

  • blockModelData.UvCount must equal decalModelData.UvCount, or no decal is drawn;
  • the decal mesh takes its texture ids from blockModelData, so return the matching block mesh as well.

(Engine: SystemRenderDecals.)

Blended overlays:

  • Order. Overlays are now applied last to first, so with several overlays the first-listed ends on top. In 1.22.7 the last-listed did.
  • Sizes. Overlays of a different size are now blended, clipped and offset rather than ignored.
  • Baked names. The BakedName format and BlendedOverlayTexture.ToString() changed, so code that builds or parses those strings needs updating. (Client/Texture/CompositeTexture.cs)

Bitmaps. IBitmap.GetPixelsTransformed’s default alpha changed from 100 to 255, and BakedBitmap reads alpha as 0 to 255. Default values are compiled into callers, so recompile. Rotation of non-square bitmaps is fixed. (Common/Texture/BitmapRef.cs)

Meshes:

  • MeshData.AddMeshData(MeshData, MeshDataFilterDelegate) now copies custom attributes per vertex correctly.
  • MeshDataRecycler keeps size budgets and expires entries after 15 s.
  • In retro mode, DefaultShaderUniforms wind and water counters step in 0.1 s increments.

Perception effects. The camera nudges of the damaged, drunk and psychedelic effects now run only when the new PerceptionEffect.DoCameraRotation is true. It is set from the world config perceptionEffectsCameraRotation (default true) in the base OnOwnPlayerDataReceived. Custom effects must call base or set the flag themselves. DamagedPerceptionEffect overrides that method without calling base, so its own camera nudge stays off as written. (Client/Render/PerceptionEffects/)

  • Client.DictionaryTextureSource: a ready-made ITexPositionSource, with required Mapping and Atlas.
  • Client.IRenderAPI additions:
    • camera: MainCamera (Client.ICameraAPI: field of view, camera offset), AllowCameraControl;
    • drawing: GlClearDepthBuffer, RenderWireframeSphere;
    • video recording: CreateAviWriter, GetAvailableCodecs.
  • LineMeshUtil.GetWireframeSphere; MeshData.AddVertexSkipTex(...); IShaderProgram.BindTexture2DArray.
  • Client.UI.Hud3D types: 3D model HUDs with click hit-testing (Hud3DElement, Hud3DPanelScene, ModelRayCaster, ElementHitbox and others).
  • Blend modes:
    • BlendedOverlayTexture.PackBlending and UnpackBlending, now compared by value;
    • new MathTools.EnumColorBlendMode values and ColorBlend helpers (RgbToHsl, HslToRgb, NormalBlend).
  • VSEssentials: BlockEntityAnimationUtil.RefreshStaticMesh, NotifyAnimationChanged, UsesStaticMesh, CalculateSettleDuration; BEBehaviorAnimatable.CreateAnimationUtil and BakePoseMesh.
Was (1.22.7) Now (1.23.0-pre.1) What to do
Client.GuiDialog.IsInRangeOf(Vec3d) [Obsolete(error)]: “Prefer using player.IsInInteractionRangeOf. A dialog does not have an in-world position.” Use capi.World.Player.IsInInteractionRangeOf(new FastBlockPos(...)) or IsInInteractionRangeOf(entity). These use selection boxes with a default slack of 0.25, not a plain distance from the eye.
Client.GuiDialogGeneric.IsInRangeOfBlock(BlockPos) [Obsolete(error)], same message; its body now uses a slack of 0.25 Same.
Client.ICoreClientAPI.Forms [Obsolete("Use PlatformUtils")], same object Use capi.PlatformUtils.
Client.ICoreClientAPI.HideGuis { get; } { get; set; } Implementers add a setter. It writes the same state that F4 toggles; on the main-menu API it throws NotImplementedException.
Client.GuiElementEditableTextBase.LoadValue(List<string>) (virtual void), SetValue(string, bool) (void); Client.GuiElementNumberInput.LoadValue override Return bool: false when OnTryTextChangeText rejects the text or the line limit is hit; when rejected the caret does not move Overrides return base.LoadValue(...). Check the result if you need to.
Client.GuiElementMainMenuCell.Compose, OnMouseUpOnElement, OnRenderInteractiveElements Now virtual; ComposeButton and ComposeHover public virtual Replace new with override.
Client.IconComponent.offY, parentBounds Removed (both unused in 1.22.7) Delete the references.
Client.MouseWheelEventArgs.delta, deltaPrecise, value, valuePrecise [Obsolete]. Use DeltaYInt, DeltaY and IsFresh; new DeltaX and DeltaXInt DeltaY is a float already scaled by the wheel-sensitivity setting. DeltaYInt gives whole steps, with fractions accumulated. IsFresh marks the first event of a burst.
GameContent.HeldItemMouseWheelEventPacket.Delta, DeltaPrecise, Value, ValuePrecise [Obsolete] wrappers; new DeltaX, DeltaY, DeltaXInt, DeltaYInt, IsFresh In IHeldItemOnMouseWheel.OnMouseWheel, read DeltaYInt, DeltaY and IsFresh.
GameContent.InitCustomPagesDelegate(List<GuiHandbookPage>) (event ModSystemSurvivalHandbook.OnInitCustomPages) InitCustomPagesDelegate(List<IFlatListItem>) Change the handler’s parameter type; adding a GuiHandbookPage still works. When reading, use OfType<GuiHandbookPage>() and recurse into INestedListItemWithChildren.Children.
GameContent.OnCreatePagesDelegate returning List<GuiHandbookPage> Returns List<IFlatListItem> Change the return type.
GameContent.GuiDialogHandbook.pageNumberByPageCode Removed Use pageElementByPageCode (Dictionary<string, GuiHandbookPage>).
GuiDialogHandbook.shownHandbookPages Removed; the list is now shownHandbookListItems and may contain nested groups Rename.
GuiDialogHandbook.onLeftClickListElement(int index) onLeftClickListElement(List<IFlatListItem> elements, int index); clicking a group toggles it Update overrides and callers.
GameContent.GuiHandbookPage.PageNumber Removed Use PageCode with pageElementByPageCode.
GameContent.WeightedHandbookPage Removed; use GameContent.WeightedHandbookListItem (field ListItem) Rename.
GameContent.GuiHandbookGroupedItemstackPage Removed (vanilla did not use it in 1.22.7) Group with JSON handbook.listGroupCode or IHandbookListGrouping (section 17).
Handbook “stacklist” element was a GuiElementFlatList Now GameContent.GuiElementNestedList In a subclass, GetFlatList("stacklist") throws InvalidCastException; use GetNestedList.

Mouse wheel

  • Field meanings changed. MouseWheelEventArgs.value and valuePrecise now hold the client’s elapsed milliseconds rather than an accumulated position. deltaPrecise is now a real float; in 1.22.7 it was truncated.
  • Timing. The DeltaYInt and IsFresh burst resets after a 17 ms gap; the doc comments say 50 ms.
  • On a Mac, the 1.22.7 clamp of each step to ±1 is gone.
  • Built-in controls:
    • The closed GuiElementDropDown now moves by +DeltaYInt. This reverses the 1.22.7 direction and may be unintended.
    • GuiElementSlider moves by whole steps, and horizontal scroll wins when present.
    • GuiElementNumberInput steps by DeltaY × Interval.
    • GuiElementScrollbar scrolls by DeltaY.

Dialogs and elements

  • Auto-close distance. GuiDialogBlockEntity auto-closes with a slack of 0.25 instead of 0.5.
  • Search. GuiDialog.RegexFromSearchText returns null for blank text.
  • Icons. IconComponent loads SVGs through the asset manager, so a missing SVG now throws.
  • Backgrounds. GuiElementDialogBackground throws InvalidOperationException when the bounds exceed the surface.
  • Rich-text links are now offset by padding.
  • Menu cells. GuiElementMainMenuCell.OnMouseUpOnElement ignores buttons other than the left one.
  • Key names. GlKeyNames.ToString now returns names such as “Left Shift” and “Right Ctrl”, and Control, Option and Command on a Mac. Code that compares these strings breaks.

Handbook

  • Groupings. Handbook groupings appear only when the client setting handbookGroupings is true. No default was found in code, so it is probably off unless set (inferred).
  • GUI composer:
    • GuiComposer’s constructor, element dictionaries, UnFocusElements and scaled are now public;
    • title bars: AddDialogTitleBarUnmovableInImmersive, GuiElementDialogTitleBar.DisplayMoveModesInImmersiveMode.
  • Controls:
    • drop-downs: Client.DropDownEntry, with AddDropDown(DropDownEntry[], …) and SetList(DropDownEntry[]);
    • sliders, toggles and links: GuiElementSlider.ShowFillValue and HandleWidth, GuiElementToggleButton.SoundName, TextLinkComponent.Underline;
    • icons: an IconComponent constructor with SVG colour and background options;
    • server list: Client.GuiElementServerCell and ServerCellEntry. Three ServerCellEntry fields are marked [Obsolete(error)] “Don’t use this, will be ignored by the cell renderer”.
  • Input:
    • IInputAPI.PreviousKeyboardKeyState, IInputAPI.GetPickingRayFromMousePosition(...);
    • ICoreClientAPI.DeltaTimeLimiter: when above 0, it replaces the frame delta with a fixed value.
  • Handbook: GameContent.IHandbookListGrouping, INestedListItemWithChildren, GuiHandbookNestedListItem, GuiElementNestedList.
Was (1.22.7) Now (1.23.0-pre.1) What to do
Common.SoundAttributes.Pitch, Volume (NatFloat) MathTools.INatFloat nextFloat() and Average work. For avg/var, call .ToNatFloat() (a copy). Do not cast to NatFloat (section 16).
Common.SoundAttributes.NatFloatOne, RandomPitch (static) Removed Use INatFloat.One and INatFloat.Var25Random (uniform 1 ± 0.25, as before).
Common.AnimationManager.ShouldPlaySound (static), Entity.PlayEntitySound See section 6

Behaviour changes:

  • Sound bytes. SoundAttributes.ToBytes now writes a type tag before each pitch and volume value, so bytes written by 1.22.7 will not read back (inferred; no version branch in FromBytes).
  • Client.SoundParams defaults. It now declares protobuf [DefaultValue]s, so false or 0 for DisposeOnFinish, Pitch, LowPassFilter, ReferenceDistance, Volume and Range now survive being sent over the network.
  • Aggressive Optimize. Per the announcement, in the “Aggressive Optimize” RAM mode audio is decoded on demand and loaded JSON drops its line numbers. This is engine behaviour, with no API change.

14. World access, world generation and schematics

Section titled “14. World access, world generation and schematics”
Was (1.22.7) Now (1.23.0-pre.1) What to do
World generation seeded from sapi.WorldManager.Seed or sapi.World.Seed New server-only Server.IWorldManagerAPI.SeedWorldgen and Server.IServerWorldAccessor.SeedWorldgen; Seed is now a separate value that clients also receive Use SeedWorldgen for anything that generates terrain or must match existing chunks. Vanilla made this switch at about 40 places in VSEssentials and 16 in VSSurvivalMod.
Common.BlockSchematic.Place(IBlockAccessor, IWorldAccessor, BlockPos, bool replaceMetaBlocks = true) Place(Vintagestory.Datastructures.SchematicPlacementData data) Build new SchematicPlacementData(blockAccessor, sapi.World) { StartPos = pos, ReplaceMode = schematic.ReplaceMode, ReplaceMeta = replaceMeta, BlockCodes = schematic.BlockCodes, ItemCodes = schematic.ItemCodes } and pass it. Place(data) places blocks and decors, and also entities and block entities unless the accessor is revertable. Set ReplaceMode yourself (see below).
BlockSchematic.Place(IBlockAccessor, IWorldAccessor, BlockPos, EnumReplaceMode, bool) (blocks only) Removed; new PlaceOnlyBlocks(SchematicPlacementData) Use PlaceOnlyBlocks(data) with data.ReplaceMode = mode.
BlockSchematic.PlaceDecors(IBlockAccessor, BlockPos) and PlaceDecors(IBlockAccessor, BlockPos, Rectanglei) PlaceDecors(SchematicPlacementData) and PlaceDecors(SchematicPlacementData, Rectanglei) Only BlockAccessor and StartPos are read.
BlockSchematic.PlaceEntitiesAndBlockEntities(blockAccessor, worldForCollectibleResolve, startPos, blockCodes, itemCodes, replaceBlockEntities, replaceBlocks, centerrockblockid, layerBlockForBlockEntities, resolveImports) PlaceEntitiesAndBlockEntities(SchematicPlacementData) The parameters map to fields: BlockCodes, ItemCodes, ReplaceBlockEntities, ResolvedRockTypeRemaps (was replaceBlocks), CenterRockBlockId, LayerBlockForBlockEntities, and ReplaceMeta (was resolveImports). With a revertable accessor, call it after Commit() and set BlockCodes/ItemCodes.
(did not exist) Vintagestory.Datastructures.SchematicPlacementData, constructed with (IBlockAccessor, IServerWorldAccessor) Schematic placement now needs a server world accessor, so client-side placement no longer compiles (inferred).
ServerMods.BlockSchematicStructure.PlaceRespectingBlockLayers(...) (13 parameters) and PlaceReplacingBlocks(...) Both take SchematicPlacementData Map each argument to the field of the same meaning. rockBlockId becomes data.RockBlock = world.GetBlock(id). PlaceReplacingBlocks still ignores the mode argument and uses the schematic’s own ReplaceMode.
ServerMods.BlockSchematicPartial.PlacePartial(...) (14 parameters) PlacePartial(SchematicPlacementData); there are data.Set(...) helpers for the chunk-related fields replaceMeta and resolveImports are now the single field ReplaceMeta.
ServerMods.TryGenerateHandler(IBlockAccessor, IWorldAccessor, BlockPos, string locationCode) TryGenerateHandler(SchematicPlacementData data) locationCode is data.StoryStructureLocationCode; climate values are data.ClimateUpLeft and so on.
ServerMods.EnumStructurePlacement (removed); ServerMods.WorldGenStructureBase.Placement Vintagestory.Datastructures.EnumStructurePlacement, same five members Add using Vintagestory.Datastructures;.
ServerMods.WorldGenVillage.TryGenerate(..., IWorldAccessor worldForCollectibleResolve, ...) Parameter is IServerWorldAccessor Pass sapi.World.
ServerMods.WorldGenAreaProvider (abstract class) Removed No direct replacement found. Implement ServerMods.IBlockPatchModifier on your own ModStdWorldGen and register it with GenVegetationAndPatches.RegisterPatchModifier(this), as GenStructures does (inferred).
ServerMods.EnumTreeGenMode.NORMAL, BUSH; ServerMods.NoObf.TreeGenTree.mode Enum members are now Normal and Willow; TreeGenTree.mode removed; new ServerMods.NoObf.TreeGenConfig.GenMode Use Normal. BUSH has no replacement. Set the mode on the tree generator config (genMode).
ServerMods.GenCreatures.CreateEntity(EntityProperties, Vec3d) CreateEntity(EntityProperties, Vec3d, AssetLocation originalType) Pass the code before any substitution.
ServerMods.SpawnOppurtunity (class); GenCreatures.spawnPositions (List<SpawnOppurtunity>) ServerMods.SpawnOpportunity (a struct, constructor (EntityProperties forType, Vec3d pos, bool generatingChunk, AssetLocation originalType = null)) Rename. It is a value type now, so write modified list elements back.
ServerMods.GenDungeons.Dungeons (VSSurvivalMod) GenDungeons.DungeonProvider.Dungeons Go through DungeonProvider.
ServerMods.DungeonPlaceTask(code, tilePlaceTasks, generatedStructures, openSet, stairsCon); field Code The constructor adds TreeAttribute schematicTreeData; Code is a property; the class implements Common.IStructureLocation Add the argument.
Common.IWorldChunk.BlockEntities (Dictionary<BlockPos, BlockEntity>) Dictionary<int, BlockEntity>, keyed by the chunk-local index ((y & 31) * 32 + (z & 31)) * 32 + (x & 31), which BlockPos.ToIndex3d() and FastBlockPos.ToIndex3d() return Look up with chunk.GetLocalBlockEntityAtBlockPos(pos), or BlockEntities.TryGetValue(pos.ToIndex3d(), out var be). Use be.Pos for positions. Loops over .Values are unaffected.
Server.IServerEventAPI.OnTrySpawnGroupNearOffthread; Common.TrySpawnGroupDelegate Removed No per-group veto any more. Veto or substitute per entity with OnTrySpawnEntity (see below). The new OnEntityGroupSpawning (Common.EntityGroupDelegate(Entity[] spawningEntities, long herdId)) only notifies, after a group is created.
Common.BlockPos.AddCopy(Vec3f) Removed AddCopy((int)v.X, (int)v.Y, (int)v.Z) keeps the old truncation. AddCopy(float, float, float) truncates after adding, which differs for negative fractions.

Worlds from 1.22 get a new seed. On the first 1.23 load of an older world, the server:

  1. copies the old Seed into SeedWorldgen;
  2. rolls a new random Seed;
  3. sets swappedSeed in the world config.

(Engine: ServerSystemLoadAndSaveGame, checked.)

New worlds put the player’s chosen seed in SeedWorldgen and roll Seed at random. Clients receive only Seed, and /seed shows SeedWorldgen. The consequences:

  • generation code that still reads Seed produces chunks that do not match the ones generated before the upgrade;
  • anything else keyed to Seed changes in upgraded worlds (in vanilla: weather patterns, temperature noise, temporal stability noise);
  • client mods can no longer reproduce world generation from capi.World.Seed.

OnTrySpawnEntity moved off the main thread. The runtime spawner now calls it on its background thread, once per candidate position, before the entity is created. In 1.22.7 it ran on the main thread at spawn time. World generation’s GenCreatures also calls it per candidate. Handlers must be thread-safe. (Engine: ServerSystemEntitySpawner.TrySpawnSomethingAt_offthrad, checked.)

SchematicPlacementData defaults and side effects:

  • ReplaceMode defaults to ReplaceAllNoAir, not to the schematic’s own ReplaceMode, which the old Place used.

  • BlockCodes/ItemCodes stay null with a revertable accessor unless you set them.

  • Placement methods modify the data object you pass:

    • PlaceReplacingBlocks overwrites ReplaceMeta and sets the code maps;
    • PlaceRespectingBlockLayers sets LayerBlockForBlockEntities;
    • the ruin generator moves StartPos.

    Do not reuse one object without resetting it.

  • Threads. PlaceOnlyBlocks uses an instance field of the schematic, so placing the same BlockSchematic from two threads at once is unsafe (inferred).

Entities, mod data and vanilla output:

  • Entities placed from schematics now get AfterInitialized(onFirstSpawn: false).
  • Schematics carry mod data. Through the new IServerEventAPI.OnSchematicExport and OnSchematicImport events, schematics can now carry per-block mod data. Block reinforcements now travel with exported schematics.
  • Vanilla world generation output changes, even with the same seed:
    • villages place with ReplaceBlockEntities and DisplaceWater;
    • caves no longer carve into water;
    • a structure forest-sampling bug was fixed.
  • Schematics:
    • BlockSchematic.ModData and PlaceOnlyBlocks;
    • events IServerEventAPI.OnSchematicExport and OnSchematicImport;
    • OnPlacementBySchematicCustom on BlockEntity, BlockEntityBehavior and CollectibleObject, which receive SchematicPlacementData.Attributes.
  • IServerWorldAccessor additions:
    • SeedWorldgen;
    • GetTotalUnpausedTimeMs() and GetTotalUptimeMs();
    • TriggerDidPlaceBlock(...) and TriggerDidBreakBlock(...), hooks for anti-abuse tools.
  • MathTools.FastBlockPos, a struct with ToIndex3d, FromIndex3d, offsets and operators, plus FastBlockPosComparer.
    • IBlockAccessor has FastBlockPos overloads of GetBlock, GetBlockId, GetMostSolidBlock, GetBlockEntity, GetBlockEntity<T> and GetChunkAtBlockPos.
    • BlockPos(FastBlockPos), BlockPos.Set(FastBlockPos), BlockPos.ToIndex3d().
  • IGameCalendar.GetSeason(x, z), GetSeasonRel(x, z) and GetHemisphere(x, z).
  • GameContent.ModSystemBlockReinforcement.SetReinforcement(BlockReinforcement, BlockPos). Its protected helpers were renamed (getOrCreateReinforcementsAt, SaveReinforcements, toChunkLocalIndex), and the legacy type GameContent.BlockReinforcementOld was removed.

15. Server, config, mod loading and assets

Section titled “15. Server, config, mod loading and assets”
Was (1.22.7) Now (1.23.0-pre.1) What to do
Common.ICoreAPICommon.GetOrCreateDataPath(string foldername), LoadModConfig(string filename), LoadModConfig<T>(string filename), StoreModConfig(JsonObject, string filename), StoreModConfig<T>(T, string filename) Parameters renamed folderName/fileName; documented to throw ArgumentException Only named arguments break. See the path-validation note below.
Common.SQLiteDBConnection.CreateTablesIfNotExists(SqliteConnection) (protected virtual), and the GameContent.MapDB override CreateTablesIfNotExists() Override the parameterless method and use the protected field sqliteConn.
Common.Caller() constructor [Obsolete("Internal use only, use one of the static From* methods.")] Use Caller.FromPlayer(...), FromEntity(...), FromBlock(pos) or FromConsole(...).
Datastructures.ComplexConditionConverter<T> : JsonConverter<ComplexTagCondition<T>> with typed ReadJson/WriteJson Non-generic JsonConverter base with object signatures and CanConvert Use it through a JsonSerializer, or cast the result of ReadJson.
ServerMods.NoObf.RegistryObjectType.solveByType(JToken, string, OrderedDictionary<string,string>) (protected static, changed the token in place) Removed. New public static JToken Resolve(JToken token, string codePath, OrderedDictionary<string,string> searchReplace) Use the returned token; the input is not changed (inferred replacement).
ServerMods.NoObf.BlockType.GetCreativeTabs(code, CreativeInventory, searchReplace) Last parameter renamed variants Only named arguments break.
GameContent.FishingSupportModSystem sealed Cannot be subclassed.

Config files, threads and lookups

  • Mod config and data paths are validated. LoadModConfig, StoreModConfig and GetOrCreateDataPath now join paths with Path.Join and throw ArgumentException if the result contains ... An absolute file name no longer replaces the base folder. (Engine: APIBase.)
  • Thread pool errors are caught. Common.TyronThreadPool.QueueTask(Action, string) now catches and logs exceptions, and silences OperationCanceledException.
  • Wildcards. Util.WildcardUtil.Match(AssetLocation, AssetLocation, string[]) is now case-insensitive and supports @-prefixed regular expressions.
  • Wildcard language keys. A * anywhere in a key is now matched case-insensitively, and keys written ^...$ are treated as regular expressions. Before, a trailing * meant a prefix match. (Localization/TranslationService.cs)

JSON loading

  • inheritFrom merges now apply explicit nulls, so you can set a property to null to stop inheriting it.
  • JsonObject.ToAttribute skips null values.

Settings reachable from mods

  • retroMode: RuntimeEnv.RetroMode, or capi.Settings.Bool["retroMode"].
  • liquidDepthFullResolution: capi.Settings.Bool[...]. It is new and defaults to true.
  • allowSSBOs: capi.Settings.Bool[...]; its effective state is capi.Render.UseSSBOs (unchanged API). The settings migration resets it to the platform default.

None of these settings has a dedicated API member beyond those.

WorldEdit (VSCreativeMod)

  • /we fill takes a mode (all, air, nonair).
  • The rain-map rebuild takes a chunk range and needs a player.
  • /we showwarnings is new.
  • Asset reloading:
    • IAssetManager.WatchCategory, UnwatchCategory, Reload and AssetChangedDelegate;
    • IAssetOrigin.TryResolveAsset, IAsset.FullFilePath;
    • VSEssentialsModServerConfig.EnableAssetHotReloading turns on hot reloading.
  • Polymorphic assets: Common.AssetRegistry, AssetCollection<T>, IBuildableAsset<T>, IAssetInstance, [RegistersAssetTypes] and [PolymorphicAssetElement], with JSON converters and a schema generator.
    • In vanilla, only the new state-tree AI and abilities systems in VSEssentials use them.
    • Whether they are an officially supported extension point for mods is not confirmed.
  • ILogger.Instance, a static logger usable without an API reference.
  • ICoreAPI.InDeveloperMode, IServerAPI.InDeveloperMode.
  • ICoreServerAPI.PlatformUtils.
  • RegistryObject.SourceFilePath.
  • JsonUtil System.Text.Json helpers (SerializeFast, DeserializeFast, SerializeFastToFile, DeserializeFastFromFile).
  • JsonObject.AsNonNullArray<T>, FirstByWildcardKey and AllByWildcardKey.
  • AssetLocation.IsGlobalWildcard.
  • Util.ShapeCache.Load(api, shapeBase).
  • RuntimeEnv.RetroMode, DPIHScale, DPIVScale and DebugOversizedUVs.
Was (1.22.7) Now (1.23.0-pre.1) What to do
MathTools.NatFloat fields: Common.CrushingProperties.Quantity, Common.TransitionableProperties.FreshHours and TransitionHours, Common.SoundAttributes.Pitch and Volume MathTools.INatFloat, with members Average, Type, four nextFloat overloads, Clone() and ToNatFloat() Replace .avg with .Average (Anego did the same in VSSurvivalMod). nextFloat(...) calls compile unchanged. For var, dist or offset, call .ToNatFloat(), which returns a copy. To change a value, assign a new NatFloat; assigning a NatFloat still compiles. Never cast to NatFloat and modify it.
MathTools.NatFloat Now implements INatFloat and IEquatable<NatFloat> No action.
MathTools.BlockPos.AddCopy(Vec3f) Removed See section 14.
MathTools.Cuboidd, Cuboidf methods Now virtual See section 3.
  • Shared INatFloat singletons. In JSON, { "avg": 1, "var": 0 } and the uniform { "avg": 1, "var": 0.25 } now deserialise to the shared immutable INatFloat.One and INatFloat.Var25Random (types MathTools.NatFloatOne and Common.NatFloatVar25Random). So field as NatFloat returns null for them, and a hard cast throws. (Math/NatFloatConverter.cs)
  • Conjunctive ComplexTagCondition. A sub-condition with no required tags now passes when none of its forbidden tags are present; in 1.22.7 it always failed.
  • Ignored stack attributes. Config.GlobalConstants.IgnoredStackAttributes now includes nockedArrow, which affects stack equality.
  • MathTools.FastBlockPos, FastVec3i.HorDistanceSqTo, and FastVec3d operators with Vec3d.
  • Vec3f.LengthSquared, RotatedAroundAxisCopy, GetOrthogonal; Vec3d.Add(BlockFacing).
  • Util.EnumerableExtensions.WithoutNulls (the class moved to its own file; same namespace), ArrayExtensions.AtFraction.

17. JSON asset properties that code mods touch

Section titled “17. JSON asset properties that code mods touch”

These are the JSON-side changes visible in vsapi’s docs/json-docs and in the loaders. Content patches and asset-only mods are covered in more depth by the assets guide.

Breaking or renamed

  • Gaits.
    • gaits is now an object keyed by gait code; an array is still read, with a warning.
    • idleGait is replaced by idleGaits per habitat: Land is required, and a missing Sea entry gives a warning.
    • GaitMeta.sound is replaced by soundCode, a key into the entity’s sounds; the old field still plays.
    • 35 vanilla entity files now use gaits, so patches against vanilla animal AI should be checked again.
  • Removed task code. followleadholder-r is gone. The other -r task codes still work but are obsolete, and their keys do not carry over one-to-one.
  • fleeentity no longer reads the task-level aiCreatureType; use creatureType.
  • Task ranges. searchRange is the range key for targeting tasks. seekingRange and maxDist still work but are obsolete.
  • stayclosetoentity.
    • teleportToRange changed from an integer start index (default 1) to a float maximum radius (default 4.5).
    • entityCode still works but entityCodes is preferred.
  • seekfoodandeat requires the entity attribute creatureDiet.
  • Breeding codes. EntityBehaviorMultiply codes (spawnEntityCodes, requiresNearbyEntityCodes) now resolve in the entity’s own domain; write game: for vanilla entities from a mod.
  • Armour. protectionModifiers now uses protectionTiers per damage type (vanilla parts use protectionTiersByType). The old keys (relativeProtection, flatDamageReduction, protectionTier, and so on) are ignored.
  • Knives. knifeHitBlockAnimation and knifeHitEntityAnimation are no longer read.
  • Misspellings fixed.
    • supressDefaultAnimation became suppressDefaultAnimation; the old spelling is still accepted.
    • saturationLossDelay became satietyLossDelay; the old name stays as an obsolete property.
  • Elevators. elevator.json dropped seatable for kinematiccollider. A seatable elevator in your own JSON would now fail (inferred).

New

  • Items and blocks:
    • combat: damageType (default SlashingAttack), knockbackStrength (default 1), heldTpHitCombo, heldTpHitComboAim (high, mid, low), heldTpHitSprintAnimation;
    • blocks: bleedCornerOverlayTexture; bleedOverlayTexture accepts a trailing wildcard;
    • stack attributes: customName and customDesc on item stacks are shown.
  • Entities:
    • debugColor;
    • drops: a damageType on each drop;
    • physics: maxWalkableSlopeGrade on the physics behaviours;
    • new behaviours: kinematiccollider, genetics and the others listed in section 7.
  • Food: satietyLossDelay, healthDurationSec, healthTicks.
  • AI tasks:
    • gaits: preferredGait, fastestGait;
    • other: creatureType, seekFoodAnywayChance, arrivalDistance, teleportChance, teleportDelaySec;
    • portionsEatenForLay is now honoured.
  • Entity behaviours:
    • hunger: satLossPerSec, satLossPerMoveSec, satLossPerSwimSec, satLossPerSprintSec, satLossPerJump;
    • riding: rider hunger settings on seatable, rideable and boats;
    • names and selection: nametag.replaceDefaultName; selectionboxes entries may be objects { name, minTraining };
    • breeding: crowding, litter and miscarriage settings on multiply;
    • health: damageMultipliers on health, not applied in pre.1 (section 7).
  • Textures:
    • blended overlays: new alpha (0 to 255), appliedTo (0 is the base; below 16, and lower than the overlay’s own position), offsetX and offsetY;
    • new blendMode values: Replace, NormalPreserveAlpha, AlphaMask, AlphaMaskBlackAndWhite, AlphaMaskBlackAndWhiteInverted, MultiplyPreserveAlpha, HueBlend. The further enum values HueShift, SaturationBlend, LuminosityBlend and HueSaturationBlend cannot be used in blendedOverlays, because blend packing accepts only values up to 15.
  • Pies: inPieProperties requires partType and texture, and has new toppingShapeElement (required for toppings), portionSize and portionSizeLitres.
  • Shelves and displays:
    • the display system: shelves use the Display behaviours;
    • item display settings: items use attributes.displayable.shelf or shelvable, with transforms such as onShelfQuarterTransform.
  • Machines:
    • mechanical power: attributes.mechanicalPower.rotationalInertia and connectorFlags;
    • liquid containers: liquidContainerProps.fullBlockSounds and fullHeldSounds.
  • Handbook: handbook.listGroupCode nests entries, with titles from the language key handbook-listitem-<code>.
  • Combat behaviours: DamageModes, ObbMeleeSweep, and AnimationAuthoritative keys isMeleeAtackMove (misspelt in the game itself) and hitFreezeMs.
  • Text areas: TextAreaConfig.maxLength.
  • Doors: the existing easingSpeed attribute on doors and trapdoors also sets the bake delay, ceil(8 / easingSpeed) seconds.

These members and types gained [Obsolete] in 1.23.0-pre.1.

  • “Error” items fail the build if you call them.
  • “Warning” items compile with a warning (CS0618), which is still an error if warnings are treated as errors.
  • Excluded: the compiler’s own markers for ref structs and for constructors of types with required members (section 3).
Member Message
Client.GuiDialog.IsInRangeOf(Vec3d), Client.GuiDialogGeneric.IsInRangeOfBlock(BlockPos) Prefer using player.IsInInteractionRangeOf. A dialog does not have an in-world position.
Server.IServerNetworkAPI.BroadcastBlockEntityPacket(BlockPos, int, byte[]) and (BlockPos, int, byte[], IServerPlayer[]) Use the SerializedData overload
Common.IInventoryNetworkUtil.HandleClientPacket(IPlayer, int, byte[]) prefer using the SerializedData overload.
GameContent.BlockEntityContainedBagWorkspace.OnReceivedClientPacket(IPlayer, int, byte[]) Prefer using the SerializedData overload.
Common.BlockDropItemStack.FromBytes(BinaryReader, IClassRegistryAPI) Prefer the BinarySpanReader overload.
FromBytes(BinaryReader …) on Common.IByteSerializable, Common.IItemStack, Common.IParticlePropertiesProvider, Datastructures.IAttribute, Common.AdvancedParticleProperties, Common.AirBubbleParticles, Common.AmbientModifier, Common.CollectibleParticleProperties, Common.CreativeTabAndStackList, Common.Entities.Entity (both overloads), Common.Entities.EntityPos, Common.ExplosionSmokeParticles, Common.ItemStack, Common.JsonItemStack (the IClassRegistryAPI overload), Common.ParticlesProviderBase, Common.SimpleParticleProperties, Common.TransitionableProperties, and the 17 attribute types Datastructures.BoolArrayAttribute, BoolAttribute, ByteArrayAttribute, DoubleArrayAttribute, DoubleAttribute, FloatArrayAttribute, FloatAttribute, IntArrayAttribute, IntAttribute, ItemstackAttribute, LongArrayAttribute, LongAttribute, StreamedByteArrayAttribute, StringArrayAttribute, StringAttribute, TreeArrayAttribute, TreeAttribute; constructors Common.ItemStack(BinaryReader) and ItemStack(BinaryReader, IWorldAccessor) Use the BinarySpanReader overload.
Client.ServerCellEntry.DetailText, DetailTextFont, TitleFont (new type) Don’t use this, will be ignored by the cell renderer.
Member Message
Common.BlockEntity.OnReceivedClientPacket(IPlayer, int, byte[]) Use the overload with CachedAccessPerms. Never override both.
Common.BlockEntity.OnReceivedServerPacket(int, byte[]) Use the overload with SerializedData. Never override both.
Common.BlockEntityBehavior.OnReceivedClientPacket(IPlayer, int, byte[]), OnReceivedServerPacket(int, byte[]); Common.Entities.Entity.OnReceivedClientPacket(IPlayer, int, byte[]); Common.Entities.EntityBehavior.OnReceivedClientPacket(IServerPlayer, int, byte[], ref EnumHandling), OnReceivedServerPacket(int, byte[], ref EnumHandling) Use the SerializedData overload. Never override both.
Common.Entities.Entity.OnReceivedServerPacket(int, byte[]) Prefer the SerializedData overload.
GameContent.IAttachedInteractions.OnReceivedClientPacket(..., byte[], ref EnumHandling, Action) Use the CachedAccessPerms overload. Never override both.
GameContent.BEBehaviorContainedBagInventory.OnReceivedClientPacket(IPlayer, int, byte[]) and OnReceivedServerPacket(int, byte[]); GameContent.EntityBehaviorAttachable.OnReceivedClientPacket(IServerPlayer, int, byte[], ref EnumHandling) Use the SerializedData overload.
GameContent.BlockEntityContainedBagWorkspace.OnReceivedServerPacket(int, byte[]), GameContent.BlockEntityGuiConfigurableCommands.UpdateFromPacket(byte[]) Prefer using the SerializedData overload.
Common.ItemStack(byte[]) constructor, Datastructures.TreeAttribute.CreateFromBytes(byte[]) Prefer the ReadOnlySpan overload.
Datastructures.TreeAttribute.FromBytes(byte[]) Prefer using the ReadOnlySpan overload.
Common.AdvancedParticleProperties.createFromBytes, Common.AnimationMetaData.FromBytes(BinaryReader, string), Common.AnimationSound.CreateFromBytes, Common.SoundAttributes.FromBytes, Datastructures.ComplexTagConditionExtensions.FromBytes and FastFromBytes, Datastructures.TagSet.FromBytes, MathTools.BlockPos.CreateFromBytes, MathTools.EvolvingNatFloat.CreateFromBytes, MathTools.NatFloat.FromBytes and createFromBytes, MathTools.Vec3d.CreateFromBytes, MathTools.Vec3f.CreateFromBytes, GameContent.CookingRecipeIngredient.FromBytes(BinaryReader, IClassRegistryAPI) Prefer using the BinarySpanReader overload.
Datastructures.TagSetFast.FromBytes, MathTools.WeightedFloat.FromBytes, MathTools.WeightedFloatArray.FromBytes, ServerMods.WorldEdit.WorldEditWorkspace.FromBytes(BinaryReader) Prefer the BinarySpanReader overload.
Common.EntityControls.FromBytes(BinaryReader, bool) Prefer the binarySpanReader overload.
Util.SerializerUtil.FromBytes(byte[], ByteReadDelegate) (no message)
Datastructures.BinarySpanReaderExtensions.ActAsBinaryReader (5 overloads), UnsafeActAsBinarySpanReader (5 overloads) (new) Don’t use this.
Common.ICoreAPICommon.RegisterRecipeRegistry<T>(string) Use RegisterCustomRegistry instead
Common.IWorldAccessor.GetRecipeRegistry(string) Use GetCustomRegistry instead
Common.RecipeRegistryBase (type) Use CustomRegistryBase instead
Common.Animation.GenerateAllFrames(ShapeElement[], Dictionary<int, AnimationJoint>, bool) Use the version that takes a sourceForLogging param instead
Common.AnimationMetaData.SupressDefaultAnimation Misspelled, use SuppressDefaultAnimation instead
Common.FoodNutritionProperties.SaturationLossDelay Use SatietyLossDelay instead.
Common.Caller() constructor Internal use only, use one of the static From* methods.
Client.ICoreClientAPI.Forms Use PlatformUtils
Client.MouseWheelEventArgs.delta; GameContent.HeldItemMouseWheelEventPacket.Delta Please use DeltaYInt instead.
Client.MouseWheelEventArgs.deltaPrecise; GameContent.HeldItemMouseWheelEventPacket.DeltaPrecise Please use DeltaY instead.
Client.MouseWheelEventArgs.value and valuePrecise; GameContent.HeldItemMouseWheelEventPacket.Value and ValuePrecise Use IsFresh to determine if this is the first event of a continuous scroll instead.
Common.SurfaceDrawImage.Image(ImageSurface, BitmapRef, int, int, int, int) Use ‘Image’ method that has ‘BitmapExternal’ as argument.
GameContent.AiTaskComeToOwnerR (type) Use the original task instead
GameContent.AiTaskGetOutOfWaterR, AiTaskGetOutOfWaterConfig (types) Use the original AiTaskGetOutOfWater instead
GameContent.AiTaskSeekBlockAndLayR (type) Use the original SeekBlockAndLay instead
GameContent.AiTaskSeekFoodAndEatR, AiTaskSeekFoodAndEatConfig (types) Use the original SeekFoodAndEat instead
GameContent.AiTaskStayCloseToEntityR, AiTaskStayCloseToEntityConfig (types) Use the original StayCloseToEntity task instead
GameContent.AiTaskFleeEntity.seekingRange, AiTaskLookAtEntity.seekingRange, AiTaskSeekEntity.seekingRange, AiTaskMeleeAttack.attackRange, AiTaskThrowAtEntity.maxDist, AiTaskTurretMode.sensingRange Use searchRange instead
GameContent.EntityBehaviorNameTag.showNameTagOnlyWhenTargeted Use the property instead
GameContent.GaitMeta.Sound Use SoundCode instead
GameContent.BlockEntityFruitPress.getJuiceableProps, GameContent.CollectibleBehaviorHandbookTextAndExtraInfo.getjuiceableProps Use JuiceableProperties.ReadFrom() instead
GameContent.CollectibleBehaviorHandbookTextAndExtraInfo.getDistillationProps Use DistillationProps.ReadFrom() instead
GameContent.CollectibleBehaviorSqueezable.CanSqueezeInto(IWorldAccessor, Block, BlockSelection) Use CanSqueezeInto(ItemSlot, IWorldAccessor, Block, BlockSelection?) instead
GameContent.Mechanics.BEPulverizer.getDrops(IWorldAccessor, ItemStack) Fitted parts now drop from Inventory. Use Block.GetDrops() for the frame.

GameContent.BlockDamageOnTouch is described in the announcement as replaced by the DamageOnTouch block behaviour, but the class itself is not marked [Obsolete].

For these, no successor was found in the source. Look elsewhere, or keep your own copy of the logic.

Removed Notes
Config.GameVersion.IsCompatibleNetworkVersion(string) Compare GameVersion.NetworkVersion strings; the engine requires an exact match.
Util.FastSerializerDelegate
Util.SerializerUtil.FromBytes(byte[], ByteReadDelegate) (obsolete, still present) No BinarySpanReader equivalent; build the reader yourself.
Common.TrySpawnGroupDelegate, Server.IServerEventAPI.OnTrySpawnGroupNearOffthread Only a per-entity veto (OnTrySpawnEntity) and a notification after the fact (OnEntityGroupSpawning) remain.
Client.ModelDataPoolLocation.IsVisible(...) Culling is internal now.
Client.IconComponent.offY, parentBounds Unused in 1.22.7.
Common.ProtectionModifiers flat and relative protection fields Replaced by a different model (tiers per damage type), not one-to-one.
ServerMods.WorldGenAreaProvider Implement IBlockPatchModifier yourself (inferred).
ServerMods.EnumTreeGenMode.BUSH
GameContent.AiTaskFollowLeadHolderR, AiTaskFollowLeadHolderConfig Use AiTaskFollowLeadHolder.
GameContent.AiTaskSeekBlockAndLay.nowStuck, sitAnimStarted Restructure around OnArrival and OnStuck.
GameContent.EntityBehaviorMultiply.PopulateSpawnEntityCodes Logic inlined into Initialize.
GameContent.EntityElevator seat members, GameContent.EntityElevatorSeat Elevators use a kinematic collider now.
GameContent.EntityBobber.accum
GameContent.ItemKnife.knifeHitBlockAnimation, knifeHitEntityAnimation
GameContent.BlockPie.FillingFoodCategory, UnspoilContents
GameContent.BlockEntitySignPost.GetTextForDirection Read tree attributes text0 to text7.
GameContent.Mechanics.BEPulverizer.hasAxle ToggleStack is the closest (inferred).
GameContent.BlockEntityMechPoweredBellows.renderer, connected, mpc Bellows are linkage-driven now.
GameContent.AnvilWorkItemRenderer.ModelMat, origin Now private.
GameContent.BlockEntityMicroBlock.CreateDecalMesh (static overload) Only the instance CreateDecalMeshes exists.
GameContent.ModSystemSupportBeamPlacer.GetAlignMatrix GetBeamTransform gives yaw, pitch and extension instead of a matrix.
GameContent.GuiHandbookGroupedItemstackPage Use list groupings.
GameContent.BlockReinforcementOld Legacy migration type.
Subclassing GameContent.FishingSupportModSystem Now sealed.
  1. Reference the 1.23.0-pre.1 install (VintagestoryAPI.dll, VSEssentials.dll, VSSurvivalMod.dll, VSCreativeMod.dll) and keep net10.0.
  2. Rebuild, and update the game dependency version in your modinfo.json.
  3. Packet handlers: move every OnReceivedClientPacket/OnReceivedServerPacket override to the SerializedData overloads, delete the old ones, and add explicit checks with perms.TryAccessingBlockAtPos(...). Check behaviours attached to vanilla containers, anvils, clay forming, knapping and chisel blocks.
  4. Serialisation: move every FromBytes(BinaryReader …) override and call to ref BinarySpanReader, and leave no old overrides in place.
  5. Set required members (JsonItemStack.Code and the others) in object initialisers.
  6. Animation managers: pass the entity to the constructor and add ref to onReceivedServerAnimation.
  7. World generation: use SeedWorldgen, and test on a world upgraded from 1.22 to check for seams.
  8. Schematic placement: build a SchematicPlacementData and set ReplaceMode, BlockCodes and ItemCodes explicitly.
  9. Registries: use RegisterCustomRegistry/GetCustomRegistry and CustomRegistryBase.
  10. Change NatFloat reads on the retyped fields to INatFloat, and never cast or modify them.
  11. Look up block entities in a chunk with GetLocalBlockEntityAtBlockPos or ToIndex3d().
  12. Update IContainedInteractable, IAttachableToEntity, handbook delegates, mouse wheel handlers and dialog range checks.
  13. Weapons and tools: set damageType deliberately; the default is now SlashingAttack.
  14. Armour: move protection to protectionTiers.
  15. Animated block entities (doors and similar): call RefreshStaticMesh and NotifyAnimationChanged where needed, or opt out of baking.
  16. Make OnTrySpawnEntity handlers thread-safe.
  17. Interface implementers: add the new abstract members in Appendix B.
  18. Clear the obsolete warnings in section 18. The warning-level packet and serialisation overloads will be removed in a later version.
  19. Test with a fresh world and an upgraded world, in single player and on a dedicated server.

Appendix A. Every changed or removed public member, by type

Section titled “Appendix A. Every changed or removed public member, by type”

This table lists every public or protected member of the four assemblies that exists in 1.22.7 and is not identical in 1.23.0-pre.1. It leaves out members whose only change is a new [Obsolete] attribute; those are in section 18.

It is generated from the member comparison, so it also includes changes that do not break anything on their own: parameter renames (these break only named arguments), interfaces added to a class, and access widened from protected to public. VSCreativeMod has no section because its only change to an existing member is the newly obsolete WorldEditWorkspace.FromBytes(BinaryReader).

Columns:

  • Type: the type, named as described in section 1.
  • Change: what changed.
    • “overload signature changed or removed” means the overload with those parameter types no longer exists; the replacement is in the relevant section.
    • “no longer declared here; inherited from” means a member of the same name now comes from a base class. Code still compiles, but a 1.22.7 binary may not bind to it, and behaviour may differ.
  • Members: method parameters are shown as types only.
Type Change Members
Client.CompositeTexture field became property BlendedOverlays
Client.FrustumCulling overload signature changed or removed InFrustumAndRange(Sphere, bool, int)
Client.GuiElementEditableTextBase type changed: void to bool LoadValue(List<string>), SetValue(string, bool)
Client.GuiElementMainMenuCell became virtual Compose(), OnMouseUpOnElement(MouseEvent, int), OnRenderInteractiveElements(ICoreClientAPI, float)
Client.GuiElementNumberInput type changed: void to bool LoadValue(List<string>)
Client.IconComponent access protected to public iconPath
Client.IconComponent removed offY, parentBounds
Client.ICoreClientAPI setter added HideGuis
Client.ModelDataPoolLocation field became property CullVisible, FrustumVisible, Hide, LodLevel
Client.ModelDataPoolLocation removed IsVisible(EnumFrustumCullMode, FrustumCulling)
Common.Animation overload signature changed or removed GenerateFrame(int, AnimationFrame[], ShapeElement[], Dictionary<int, AnimationJoint>, float[], List<ElementPose>, bool)
Common.AnimationKeyFrameElement field became property OffsetX, OffsetY, OffsetZ, OriginX, OriginY, OriginZ, RotShortestDistanceX, RotShortestDistanceY, RotShortestDistanceZ, RotationX, RotationY, RotationZ, StretchX, StretchY, StretchZ
Common.AnimationManager overload signature changed or removed ShouldPlaySound(IWorldAccessor, Vec3f, int, Dictionary<string, ILoadedSound>, string, AnimationSound, Entity), constructor(), onReceivedServerAnimation(AnimationMetaData)
Common.AnimationManager parameter names changed ShouldPlaySound(string, AnimationSound)
Common.AnimationMetaData field became property SupressDefaultAnimation
Common.AnimationUtil became virtual Dispose(), OnRenderFrame(float, EnumRenderStage), StopAnimation(string)
Common.AnimationUtil parameter names changed ShouldPlaySound(string, AnimationSound)
Common.BitmapExternal field became property bmp
Common.BlockBreakingParticleProps overload signature changed or removed FromBytes(BinaryReader, IWorldAccessor)
Common.BlockCubeParticles overload signature changed or removed FromBytes(BinaryReader, IWorldAccessor)
Common.BlockEntity parameter names changed OnReceivedClientPacket(IPlayer, int, byte[]), OnReceivedServerPacket(int, byte[])
Common.BlockEntity.CachedAccessPerms overload signature changed or removed constructor(IWorldAccessor, BlockPos, IPlayer)
Common.BlockEntity.CachedAccessPerms removed IsInteractingPlayerAllowedTo(EnumBlockAccessFlags, bool, string)
Common.BlockEntityBehavior parameter names changed OnReceivedClientPacket(IPlayer, int, byte[]), OnReceivedServerPacket(int, byte[])
Common.BlockSchematic overload signature changed or removed Place(IBlockAccessor, IWorldAccessor, BlockPos, EnumReplaceMode, bool), Place(IBlockAccessor, IWorldAccessor, BlockPos, bool), PlaceDecors(IBlockAccessor, BlockPos), PlaceDecors(IBlockAccessor, BlockPos, Rectanglei), PlaceEntitiesAndBlockEntities(IBlockAccessor, IWorldAccessor, BlockPos, Dictionary<int, AssetLocation>, Dictionary<int, AssetLocation>, bool, Dictionary<int, Dictionary<int, int>>, int, Dictionary<BlockPos, Block>, bool)
Common.CraftingRecipeIngredient overload signature changed or removed FromBytes(BinaryReader, IWorldAccessor)
Common.CrushingProperties type changed: NatFloat to INatFloat Quantity
Common.Entities.Entity overload signature changed or removed OnReceivedClientPacket(IServerPlayer, int, byte[])
Common.Entities.Entity parameter names changed OnReceivedServerPacket(int, byte[]), PlayEntitySound(string, IPlayer)
Common.Entities.EntityBehavior access public to protected constructor(Entity)
Common.Entities.EntityBehavior parameter names changed OnEntityReceiveSaturation(float, EnumFoodCategory, float, float), OnReceivedClientPacket(IServerPlayer, int, byte[], ref EnumHandling), OnReceivedServerPacket(int, byte[], ref EnumHandling)
Common.Entities.EntityProperties type changed: BlockDropItemStack[] to EntityDropItemStack[] Drops
Common.EntityAgent overload signature changed or removed FromBytes(BinaryReader, bool)
Common.EntityAgent parameter names changed ReceiveSaturation(float, EnumFoodCategory, float, float), ShouldReceiveSaturation(float, EnumFoodCategory, float, float)
Common.EntityBehaviorPassivePhysics no longer declared here; inherited from Common.Entities.PhysicsBehaviorBase (behaviour may differ) newPos, prevPos
Common.EntityChunky overload signature changed or removed FromBytes(BinaryReader, bool)
Common.EntityCubeParticles overload signature changed or removed FromBytes(BinaryReader, IWorldAccessor)
Common.EntityItem overload signature changed or removed FromBytes(BinaryReader, bool)
Common.EntityPlayer overload signature changed or removed FromBytes(BinaryReader, bool), OnReceivedClientPacket(IServerPlayer, int, byte[]), OnReceivedServerPacket(int, byte[])
Common.FastSearchCraftingRecipeIngredient overload signature changed or removed constructor(CraftingRecipeIngredient)
Common.FoodNutritionProperties field became property SaturationLossDelay
Common.GridRecipe overload signature changed or removed FromBytes(BinaryReader, IWorldAccessor)
Common.IByteSerializable abstract became virtual FromBytes(BinaryReader, IWorldAccessor)
Common.ICoreAPICommon parameter names changed GetOrCreateDataPath(string), LoadModConfig(string), LoadModConfig<T>(string), StoreModConfig(JsonObject, string), StoreModConfig<T>(T, string)
Common.ICoreAPICommon abstract became virtual RegisterRecipeRegistry<T>(string)
Common.IInventoryNetworkUtil parameter names changed HandleClientPacket(IPlayer, int, byte[])
Common.IInventoryNetworkUtil overload signature changed or removed SendInventoryRollback(IServerPlayer, int, ReadOnlySpan<byte>)
Common.IItemStack abstract became virtual FromBytes(BinaryReader)
Common.IParticlePropertiesProvider abstract became virtual FromBytes(BinaryReader, IWorldAccessor)
Common.ItemStack adds IHashWithIgnoredAttributes (the type itself)
Common.ItemStack parameter names changed FromBytes(BinaryReader)
Common.IWorldAccessor abstract became virtual GetRecipeRegistry(string)
Common.IWorldChunk type changed: Dictionary<BlockPos, BlockEntity> to Dictionary<int, BlockEntity> BlockEntities
Common.JsonItemStack overload signature changed or removed FromBytes(BinaryReader, IWorldAccessor)
Common.LayeredVoxelRecipe overload signature changed or removed FromBytes(BinaryReader, IWorldAccessor)
Common.PlayerAnimationManager overload signature changed or removed constructor(), onReceivedServerAnimation(AnimationMetaData)
Common.PlayerAnimationManager removed (was an override) Init(ICoreAPI, Entity)
Common.ProtectionModifiers removed FlatDamageReduction, HighDamageTierResistant, PerTierFlatDamageReductionLoss, PerTierRelativeProtectionLoss, ProtectionTier, RelativeProtection
Common.RecipeBase overload signature changed or removed FromBytes(BinaryReader, IWorldAccessor)
Common.RecipeRegistryBase now [Obsolete: Use CustomRegistryBase instead]; base class none to Common.CustomRegistryBase (the type itself)
Common.RecipeRegistryBase no longer declared here; inherited from Common.CustomRegistryBase (behaviour may differ) FromBytes(IWorldAccessor, int, byte[]), ToBytes(IWorldAccessor, out byte[], out int)
Common.RecipeRegistryGeneric<T> base class Common.RecipeRegistryBase to Common.CustomRegistryBase (the type itself)
Common.SimpleParticleProperties parameter names changed Clone(IWorldAccessor)
Common.SoundAttributes removed NatFloatOne, RandomPitch
Common.SoundAttributes type changed: NatFloat to INatFloat Pitch, Volume
Common.SQLiteDBConnection overload signature changed or removed CreateTablesIfNotExists(SqliteConnection)
Common.StackCubeParticles overload signature changed or removed FromBytes(BinaryReader, IWorldAccessor)
Common.TransitionableProperties type changed: NatFloat to INatFloat FreshHours, TransitionHours
Common.TrySpawnGroupDelegate type removed (the type itself)
Common.WaterSplashParticles overload signature changed or removed FromBytes(BinaryReader, IWorldAccessor)
Config.GameVersion constant value changed APIVersion, AssemblyVersion, Branch, NetworkVersion, OverallMajorMinor, OverallVersion, ShortGameVersion
Config.GameVersion removed IsCompatibleNetworkVersion(string)
Datastructures.BoolArrayAttribute parameter names changed FromBytes(BinaryReader)
Datastructures.BoolAttribute parameter names changed FromBytes(BinaryReader)
Datastructures.ByteArrayAttribute parameter names changed FromBytes(BinaryReader)
Datastructures.ComplexConditionConverter<T> base class Newtonsoft.Json.JsonConverter<Datastructures.ComplexTagCondition> to Newtonsoft.Json.JsonConverter (the type itself)
Datastructures.ComplexConditionConverter<T> overload signature changed or removed ReadJson(JsonReader, Type, ComplexTagCondition<T>, bool, JsonSerializer), WriteJson(JsonWriter, ComplexTagCondition<T>, JsonSerializer)
Datastructures.DoubleArrayAttribute parameter names changed FromBytes(BinaryReader)
Datastructures.DoubleAttribute parameter names changed FromBytes(BinaryReader)
Datastructures.FloatArrayAttribute parameter names changed FromBytes(BinaryReader)
Datastructures.FloatAttribute parameter names changed FromBytes(BinaryReader)
Datastructures.IAttribute abstract became virtual FromBytes(BinaryReader)
Datastructures.IntArrayAttribute parameter names changed FromBytes(BinaryReader)
Datastructures.IntAttribute parameter names changed FromBytes(BinaryReader)
Datastructures.ItemstackAttribute adds IHashWithIgnoredAttributes (the type itself)
Datastructures.ItemstackAttribute parameter names changed FromBytes(BinaryReader)
Datastructures.LongArrayAttribute parameter names changed FromBytes(BinaryReader)
Datastructures.LongAttribute parameter names changed FromBytes(BinaryReader)
Datastructures.StreamedByteArrayAttribute parameter names changed FromBytes(BinaryReader)
Datastructures.StringArrayAttribute parameter names changed FromBytes(BinaryReader)
Datastructures.StringAttribute parameter names changed FromBytes(BinaryReader)
Datastructures.SyncedTreeAttribute overload signature changed or removed FromBytes(BinaryReader)
Datastructures.TreeArrayAttribute parameter names changed FromBytes(BinaryReader)
Datastructures.TreeAttribute adds IHashWithIgnoredAttributes (the type itself)
Datastructures.TreeAttribute parameter names changed FromBytes(BinaryReader)
MathTools.BlockPos overload signature changed or removed AddCopy(Vec3f)
MathTools.Cuboidd became virtual Clone(), Intersects(Cuboidd), Intersects(Cuboidf), Intersects(Cuboidf, Vec3d), Intersects(Cuboidf, double, double, double), IntersectsOrTouches(Cuboidd), IntersectsOrTouches(Cuboidf, Vec3d), IntersectsOrTouches(Cuboidf, double, double, double), pushOutX(Cuboidd, double, ref EnumPushDirection), pushOutY(Cuboidd, double, ref EnumPushDirection), pushOutZ(Cuboidd, double, ref EnumPushDirection)
MathTools.Cuboidf became virtual Intersects(Cuboidf, double, double, double), IntersectsOrTouches(Cuboidf), OffsetCopyDouble(double, double, double), pushOutX(Cuboidf, float, ref EnumPushDirection), pushOutY(Cuboidf, float, ref EnumPushDirection), pushOutZ(Cuboidf, float, ref EnumPushDirection)
MathTools.NatFloat adds IEquatable, INatFloat (the type itself)
Server.IServerEventAPI removed OnTrySpawnGroupNearOffthread
Server.IServerNetworkAPI abstract became virtual BroadcastBlockEntityPacket(BlockPos, int, byte[]), BroadcastBlockEntityPacket(BlockPos, int, byte[], IServerPlayer[])
Server.IServerPlayer parameter names changed Disconnect(string)
Util.FastSerializerDelegate type removed (the type itself)
Type Change Members
Common.PathTraverserBase overload signature changed or removed FleeFrom(Vec3d, float, float, Action, Action, Action, bool, int, EnumAICreatureType?), Flee_Async(Vec3d, float, float, Action, Action, Action, int, EnumAICreatureType?), NavigateTo(Vec3d, float, Action, Action, Action, int, EnumAICreatureType?), NavigateTo(Vec3d, float, float, Action, Action, Action, bool, int, int, EnumAICreatureType?), NavigateTo_Async(Vec3d, float, float, Action, Action, Action, int, int, EnumAICreatureType?), WalkTowards(Vec3d, float, float, Action, Action, EnumAICreatureType)
Common.PathTraverserBase access protected to public movingSpeed
Essentials.WaypointsTraverser overload signature changed or removed FleeFrom(Vec3d, float, float, Action, Action, Action, bool, int, EnumAICreatureType?), Flee_Async(Vec3d, float, float, Action, Action, Action, int, EnumAICreatureType?), NavigateTo(Vec3d, float, float, Action, Action, Action, bool, int, int, EnumAICreatureType?), NavigateTo_Async(Vec3d, float, float, Action, Action, Action, int, int, EnumAICreatureType?), WalkTowards(Vec3d, float, float, Action, Action, EnumAICreatureType)
GameContent.AiTaskBaseTargetable no longer declared here; inherited from Common.AiTaskBase (behaviour may differ) GetOwnGeneration()
GameContent.AiTaskComeToOwnerR now [Obsolete: Use the original task instead] (the type itself)
GameContent.AiTaskFleeEntity access protected to public creatureType
GameContent.AiTaskGetOutOfWaterConfig now [Obsolete: Use the original AiTaskGetOutOfWater instead] (the type itself)
GameContent.AiTaskGetOutOfWaterR now [Obsolete: Use the original AiTaskGetOutOfWater instead] (the type itself)
GameContent.AiTaskLookAtEntity field became property seekingRange
GameContent.AiTaskMeleeAttack field became property attackRange
GameContent.AiTaskSeekBlockAndLay base class Common.AiTaskBase to GameContent.AiTaskSeekPoiBase<GameContent.IAnimalNest> (the type itself)
GameContent.AiTaskSeekBlockAndLay removed (was an override) CanContinueExecute(), ContinueExecute(float)
GameContent.AiTaskSeekBlockAndLay now an override MinDistanceToTarget()
GameContent.AiTaskSeekBlockAndLay no longer declared here; inherited from GameContent.AiTaskSeekPoiBase<T> (behaviour may differ) lastPOISearchTotalMs, moveSpeed, targetPoi
GameContent.AiTaskSeekBlockAndLay removed nowStuck, porregistry, sitAnimStarted, sitTimeNow
GameContent.AiTaskSeekBlockAndLayR now [Obsolete: Use the original SeekBlockAndLay instead] (the type itself)
GameContent.AiTaskSeekEntity field became property seekingRange
GameContent.AiTaskSeekFoodAndEat base class Common.AiTaskBase to GameContent.AiTaskSeekPoiBase<GameContent.IAnimalFoodSource> (the type itself)
GameContent.AiTaskSeekFoodAndEat removed (was an override) CanContinueExecute(), ContinueExecute(float)
GameContent.AiTaskSeekFoodAndEat no longer declared here; inherited from GameContent.AiTaskSeekPoiBase<T> (behaviour may differ) MinDistanceToTarget()
GameContent.AiTaskSeekFoodAndEatConfig now [Obsolete: Use the original SeekFoodAndEat instead] (the type itself)
GameContent.AiTaskSeekFoodAndEatR now [Obsolete: Use the original SeekFoodAndEat instead] (the type itself)
GameContent.AiTaskStayCloseToEntity base class Common.AiTaskBase to GameContent.AiTaskBaseTargetable (the type itself)
GameContent.AiTaskStayCloseToEntity became virtual OnNoPath(), OnStuck()
GameContent.AiTaskStayCloseToEntity removed entityCode, range
GameContent.AiTaskStayCloseToEntity type changed: Vec3d to FastVec3d initialTargetPos, targetOffset
GameContent.AiTaskStayCloseToEntity no longer declared here; inherited from GameContent.AiTaskBaseTargetable (behaviour may differ) targetEntity
GameContent.AiTaskStayCloseToEntity type changed: int to float teleportToRange
GameContent.AiTaskStayCloseToEntityConfig now [Obsolete: Use the original StayCloseToEntity task instead] (the type itself)
GameContent.AiTaskStayCloseToEntityR now [Obsolete: Use the original StayCloseToEntity task instead] (the type itself)
GameContent.AiTaskStayCloseToGuardedEntity no longer declared here; inherited from GameContent.AiTaskBaseTargetable (behaviour may differ) GetGuardedEntity()
GameContent.AttachedContainerWorkspace overload signature changed or removed OnReceivedClientPacket(IServerPlayer, int, byte[], ItemSlot, int, ref EnumHandling)
GameContent.AttributeAttachableToEntity adds ILayeredAttachableToEntity (the type itself)
GameContent.AttributeAttachableToEntity overload signature changed or removed GetAttachedShape(ItemStack, string)
GameContent.ClothSystem removed OnPinnnedEntityLoaded(Entity), pp
GameContent.CollectibleBehaviorHeldBag removed OnReceivedClientPacket(ItemSlot, int, Entity, IServerPlayer, int, byte[], ref EnumHandling, Action)
GameContent.EntityBehaviorControlledPhysics adds IDisposable, IRenderer (the type itself)
GameContent.EntityBehaviorControlledPhysics no longer declared here; inherited from Common.Entities.PhysicsBehaviorBase (behaviour may differ) newPos, prevPos
GameContent.EntityBehaviorGait field became property Gaits, IdleGaits
GameContent.EntityBehaviorHarvestable overload signature changed or removed OnReceivedClientPacket(IServerPlayer, int, byte[], ref EnumHandling)
GameContent.EntityBehaviorMouthInventory overload signature changed or removed OnReceivedServerPacket(int, byte[], ref EnumHandling)
GameContent.EntityBehaviorMultiply overload signature changed or removed GiveBirth(float)
GameContent.EntityBehaviorMultiply setter removed IsPregnant
GameContent.EntityBehaviorMultiply removed PopulateSpawnEntityCodes(JsonObject)
GameContent.EntityBehaviorNameTag parameter names changed SetName(string)
GameContent.EntityBehaviorOpenableContainer overload signature changed or removed OnReceivedClientPacket(IServerPlayer, int, byte[], ref EnumHandling)
GameContent.EntityBehaviorPlayerPhysics drops IDisposable, IRenderer (the type itself)
GameContent.EntityBehaviorPlayerPhysics no longer declared here; inherited from GameContent.EntityBehaviorControlledPhysics (behaviour may differ) Dispose(), RenderOrder, RenderRange
GameContent.EntityBehaviorPlayerPhysics now an override OnRenderFrame(float, EnumRenderStage)
GameContent.EntityBehaviorSelectionBoxes became virtual GetCenterPosOfBox(int), IsAPCode(EntitySelection, string), OnRenderFrame(float, EnumRenderStage)
GameContent.EntityBehaviorSelectionBoxes removed Testintersection(Cuboidd, Ray)
GameContent.EntityBlockFalling overload signature changed or removed FromBytes(BinaryReader, bool), OnReceivedServerPacket(int, byte[])
GameContent.EntityPlayerShapeRenderer access protected to public smoothedBodyYaw
GameContent.EntityProjectile no longer declared here; inherited from GameContent.EntityProjectileBase (behaviour may differ) ApplyGravity, IsInteractable
GameContent.EntityProjectileBase overload signature changed or removed FromBytes(BinaryReader, bool)
GameContent.EntityThrownItem removed (was an override) Initialize(EntityProperties, ICoreAPI, long)
GameContent.EntityThrownItem no longer declared here; inherited from GameContent.EntityProjectileBase (behaviour may differ) IsInteractable
GameContent.GaitMeta type changed: int to EnumDirection Direction
GameContent.IAttachableToEntity overload signature changed or removed GetAttachedShape(ItemStack, string)
GameContent.IAttachedInteractions parameter names changed OnReceivedClientPacket(ItemSlot, int, Entity, IServerPlayer, int, byte[], ref EnumHandling, Action)
GameContent.MapDB overload signature changed or removed CreateTablesIfNotExists(SqliteConnection)
GameContent.MapLayer overload signature changed or removed OnViewChangedServer(IServerPlayer, List<FastVec2i>, List<FastVec2i>)
GameContent.WaypointMapLayer overload signature changed or removed OnViewChangedServer(IServerPlayer, List<FastVec2i>, List<FastVec2i>)
ServerMods.BlockSchematicPartial overload signature changed or removed PlacePartial(IServerChunk[], IWorldGenBlockAccessor, IWorldAccessor, int, int, BlockPos, EnumReplaceMode, EnumStructurePlacement?, bool, bool, Dictionary<int, Dictionary<int, int>>, int[], Block, bool)
ServerMods.BlockSchematicStructure overload signature changed or removed PlaceReplacingBlocks(IBlockAccessor, IWorldAccessor, BlockPos, EnumReplaceMode, Dictionary<int, Dictionary<int, int>>, int?, bool), PlaceRespectingBlockLayers(IBlockAccessor, IWorldAccessor, BlockPos, int, int, int, int, Dictionary<int, Dictionary<int, int>>, int[], bool, bool, bool, bool)
ServerMods.EnumStructurePlacement type removed (the type itself)
ServerMods.EnumTreeGenMode removed BUSH, NORMAL
ServerMods.GenCreatures overload signature changed or removed CreateEntity(EntityProperties, Vec3d)
ServerMods.GenCreatures type changed: List to List spawnPositions
ServerMods.NoObf.BlockType parameter names changed GetCreativeTabs(AssetLocation, Dictionary<string, string[]>, OrderedDictionary<string, string>)
ServerMods.NoObf.EntityType type changed: BlockDropItemStack[] to EntityDropItemStack[] Drops
ServerMods.NoObf.RegistryObjectType removed solveByType(JToken, string, OrderedDictionary<string, string>)
ServerMods.NoObf.TreeGenTree removed mode
ServerMods.SpawnOppurtunity type removed (the type itself)
ServerMods.TryGenerateHandler overload signature changed or removed BeginInvoke(IBlockAccessor, IWorldAccessor, BlockPos, string, AsyncCallback, object), Invoke(IBlockAccessor, IWorldAccessor, BlockPos, string)
ServerMods.WorldGenAreaProvider type removed (the type itself)
ServerMods.WorldGenStructureBase type changed: ServerMods.EnumStructurePlacement to Vintagestory.Datastructures.EnumStructurePlacement Placement
ServerMods.WorldGenVillage overload signature changed or removed TryGenerate(IBlockAccessor, IWorldAccessor, BlockPos, int, int, int, int, DidGenerate, BlockPos)
Type Change Members
Common.EntityBehaviorPassivePhysicsMultiBox removed InitServer(ICoreServerAPI)
Common.EntityBehaviorPassivePhysicsMultiBox field became property mcollisionTester
GameContent.AiTaskComeToOwner removed (was an override) CanContinueExecute(), ContinueExecute(float)
GameContent.AiTaskFollowLeadHolder removed (was an override) OnGoalReached()
GameContent.AiTaskFollowLeadHolderConfig type removed (the type itself)
GameContent.AiTaskFollowLeadHolderR type removed (the type itself)
GameContent.AiTaskStayInRange no longer declared here; inherited from GameContent.AiTaskBaseTargetable (behaviour may differ) searchRange
GameContent.AlloyRecipe overload signature changed or removed FromBytes(BinaryReader, IWorldAccessor)
GameContent.AnvilWorkItemRenderer now private ModelMat, origin
GameContent.BarrelOutputStack overload signature changed or removed FromBytes(BinaryReader, IClassRegistryAPI)
GameContent.BarrelRecipe overload signature changed or removed FromBytes(BinaryReader, IWorldAccessor)
GameContent.BarrelRecipeIngredient overload signature changed or removed FromBytes(BinaryReader, IWorldAccessor)
GameContent.BEBehaviorContainedBagInventory parameter names changed OnReceivedClientPacket(IPlayer, int, byte[]), OnReceivedServerPacket(int, byte[])
GameContent.BEBehaviorDisplay adds IInteractableWithHelp, ILongInteractable (the type itself)
GameContent.BEBehaviorFruitingBush access protected to public getHarvestTimeMul(), getNutrientUseMul(), getRipeTimeMul(), getYieldMul()
GameContent.BEBehaviorFruitingBushMesh overload signature changed or removed ensureMeshExists()
GameContent.BEBehaviorMannequin adds IInteractableWithHelp (the type itself)
GameContent.BECheeseCurdsBundle overload signature changed or removed OnReceivedServerPacket(int, byte[])
GameContent.BETileConnector overload signature changed or removed OnReceivedClientPacket(IPlayer, int, byte[])
GameContent.BlockBed drops IClaimTraverseable (the type itself)
GameContent.BlockBed removed (was an override) OnEntityCollide(IWorldAccessor, Entity, BlockPos, BlockFacing, Vec3d, bool)
GameContent.BlockBellows removed (was an override) OnEntityCollide(IWorldAccessor, Entity, BlockPos, BlockFacing, Vec3d, bool)
GameContent.BlockChisel overload signature changed or removed GetAttachedShape(ItemStack, string)
GameContent.BlockCookedContainerBase overload signature changed or removed GetContainedInteractionHelp(BlockEntityContainer, ItemSlot, IPlayer, BlockSelection), OnContainedInteractStart(BlockEntityContainer, ItemSlot, IPlayer, BlockSelection)
GameContent.BlockCookedContainerBase removed OnContainedInteractStep(float, BlockEntityContainer, ItemSlot, IPlayer, BlockSelection), OnContainedInteractStop(float, BlockEntityContainer, ItemSlot, IPlayer, BlockSelection)
GameContent.BlockCookingContainer adds IContainedInteractable (the type itself)
GameContent.BlockCrate overload signature changed or removed GetAttachedShape(ItemStack, string)
GameContent.BlockCrock overload signature changed or removed GetContainedInteractionHelp(BlockEntityContainer, ItemSlot, IPlayer, BlockSelection), OnContainedInteractStart(BlockEntityContainer, ItemSlot, IPlayer, BlockSelection)
GameContent.BlockEntityAnvil overload signature changed or removed OnReceivedClientPacket(IPlayer, int, byte[])
GameContent.BlockEntityAnvilPart removed (was an override) FromTreeAttributes(ITreeAttribute, IWorldAccessor), ToTreeAttributes(ITreeAttribute)
GameContent.BlockEntityBarrel overload signature changed or removed OnReceivedClientPacket(IPlayer, int, byte[]), OnReceivedServerPacket(int, byte[])
GameContent.BlockEntityBlockRandomizer overload signature changed or removed OnReceivedClientPacket(IPlayer, int, byte[])
GameContent.BlockEntityChisel overload signature changed or removed OnReceivedClientPacket(IPlayer, int, byte[])
GameContent.BlockEntityClayForm overload signature changed or removed OnReceivedClientPacket(IPlayer, int, byte[]), OnReceivedServerPacket(int, byte[])
GameContent.BlockEntityContainedBagWorkspace parameter names changed OnReceivedClientPacket(IPlayer, int, byte[]), OnReceivedServerPacket(int, byte[])
GameContent.BlockEntityContainerOpen overload signature changed or removed FromBytes(byte[])
GameContent.BlockEntityFirepit removed (was an override) OnReceivedClientPacket(IPlayer, int, byte[])
GameContent.BlockEntityFirepit overload signature changed or removed OnReceivedServerPacket(int, byte[])
GameContent.BlockEntityFruitPress overload signature changed or removed OnReceivedClientPacket(IPlayer, int, byte[]), OnReceivedServerPacket(int, byte[])
GameContent.BlockEntityGenericTypedContainer access protected to public InitInventory(Block)
GameContent.BlockEntityGrindingWheel adds IRotatable (the type itself)
GameContent.BlockEntityGuiConfigurableCommands overload signature changed or removed OnReceivedClientPacket(IPlayer, int, byte[])
GameContent.BlockEntityGuiConfigurableCommands parameter names changed UpdateFromPacket(byte[])
GameContent.BlockEntityItemFlow removed (was an override) OnReceivedServerPacket(int, byte[])
GameContent.BlockEntityKnappingSurface overload signature changed or removed OnReceivedClientPacket(IPlayer, int, byte[]), OnReceivedServerPacket(int, byte[])
GameContent.BlockEntityLabeledChest overload signature changed or removed OnReceivedClientPacket(IPlayer, int, byte[]), OnReceivedServerPacket(int, byte[])
GameContent.BlockEntityLocustNest overload signature changed or removed OnReceivedClientPacket(IPlayer, int, byte[])
GameContent.BlockEntityMechPoweredBellows adds ILinkageConsumer, ILinkageEndpoint (the type itself)
GameContent.BlockEntityMechPoweredBellows parameter names changed OnTesselation(ITerrainMeshPool, ITesselatorAPI)
GameContent.BlockEntityMechPoweredBellows now private animUtil, capi
GameContent.BlockEntityMechPoweredBellows removed connected, mpc, renderer
GameContent.BlockEntityMicroBlock removed CreateDecalMesh(ICoreClientAPI, List<uint>, ITexPositionSource, uint[]), CreateDecalMesh(ITexPositionSource)
GameContent.BlockEntityOpenableContainer overload signature changed or removed OnReceivedClientPacket(IPlayer, int, byte[]), OnReceivedServerPacket(int, byte[])
GameContent.BlockEntityPie removed HasCrust
GameContent.BlockEntityQuern removed (was an override) OnReceivedClientPacket(IPlayer, int, byte[])
GameContent.BlockEntityQuern overload signature changed or removed OnReceivedServerPacket(int, byte[])
GameContent.BlockEntityShelf base class GameContent.BlockEntityDisplay to Common.BlockEntity (the type itself)
GameContent.BlockEntityShelf removed AttributeTransformCode, CanPlace(ItemStack, BlockSelection, out bool), CanUse(ItemStack, BlockSelection), GetSlotType(int), Inv_OnAcquireTransitionSpeed(EnumTransitionType, ItemStack, float), Inventory, InventoryClassName, OnInteract(IPlayer, BlockSelection), inv, slotCount
GameContent.BlockEntityShelf parameter names changed FromTreeAttributes(ITreeAttribute, IWorldAccessor)
GameContent.BlockEntityShelf removed (was an override) genTransformationMatrices()
GameContent.BlockEntitySign overload signature changed or removed OnReceivedClientPacket(IPlayer, int, byte[]), OnReceivedServerPacket(int, byte[])
GameContent.BlockEntitySignPost removed GetTextForDirection(Cardinal)
GameContent.BlockEntitySignPost overload signature changed or removed OnReceivedClientPacket(IPlayer, int, byte[]), OnReceivedServerPacket(int, byte[])
GameContent.BlockEntitySignPost access public to protected textByCardinalDirection
GameContent.BlockEntitySpawner overload signature changed or removed OnReceivedClientPacket(IPlayer, int, byte[]), OnReceivedServerPacket(int, byte[])
GameContent.BlockEntityTicker overload signature changed or removed OnReceivedClientPacket(IPlayer, int, byte[])
GameContent.BlockFigurehead overload signature changed or removed GetAttachedShape(ItemStack, string)
GameContent.BlockGenericTypedContainer overload signature changed or removed GetAttachedShape(ItemStack, string)
GameContent.BlockGrindingWheel base class GameContent.BlockMPConsumer to GameContent.Mechanics.BlockAxleAttachment (the type itself)
GameContent.BlockGrindingWheel removed (was an override) HasMechPowerConnectorAt(IWorldAccessor, BlockPos, BlockFacing, BlockMPBase), OnBlockInteractCancel(float, IWorldAccessor, IPlayer, BlockSelection, EnumItemUseCancelReason), OnBlockInteractStart(IWorldAccessor, IPlayer, BlockSelection), OnBlockInteractStep(float, IWorldAccessor, IPlayer, BlockSelection), OnBlockInteractStop(float, IWorldAccessor, IPlayer, BlockSelection), OnBlockPlaced(IWorldAccessor, BlockPos, ItemStack)
GameContent.BlockLantern adds IHandbookListGrouping (the type itself)
GameContent.BlockLantern removed GetContainedInteractionHelp(BlockEntityContainer, ItemSlot, IPlayer, BlockSelection), OnContainedInteractStep(float, BlockEntityContainer, ItemSlot, IPlayer, BlockSelection), OnContainedInteractStop(float, BlockEntityContainer, ItemSlot, IPlayer, BlockSelection)
GameContent.BlockLantern overload signature changed or removed OnContainedInteractStart(BlockEntityContainer, ItemSlot, IPlayer, BlockSelection)
GameContent.BlockLiquidContainerTopOpened overload signature changed or removed GetContainedInteractionHelp(BlockEntityContainer, ItemSlot, IPlayer, BlockSelection), OnContainedInteractStart(BlockEntityContainer, ItemSlot, IPlayer, BlockSelection)
GameContent.BlockLiquidContainerTopOpened removed OnContainedInteractStep(float, BlockEntityContainer, ItemSlot, IPlayer, BlockSelection), OnContainedInteractStop(float, BlockEntityContainer, ItemSlot, IPlayer, BlockSelection)
GameContent.BlockMeal overload signature changed or removed GetContainedInteractionHelp(BlockEntityContainer, ItemSlot, IPlayer, BlockSelection), OnContainedInteractStart(BlockEntityContainer, ItemSlot, IPlayer, BlockSelection), OnContainedInteractStep(float, BlockEntityContainer, ItemSlot, IPlayer, BlockSelection), OnContainedInteractStop(float, BlockEntityContainer, ItemSlot, IPlayer, BlockSelection)
GameContent.BlockPan adds IHandBookPageCodeProvider (the type itself)
GameContent.BlockPie removed FillingFoodCategory(ItemStack), GetOnShelfTransform(ItemStack), UnspoilContents(IWorldAccessor, ItemStack[]), canEat(ItemSlot)
GameContent.BlockPie removed (was an override) GetContentNutritionFacts(IWorldAccessor, ItemSlot, ItemStack[], EntityAgent, bool, float, float), OnHeldInteractStart(ItemSlot, EntityAgent, BlockSelection, EntitySelection, bool, ref EnumHandHandling), OnHeldInteractStep(float, ItemSlot, EntityAgent, BlockSelection, EntitySelection), OnHeldInteractStop(float, ItemSlot, EntityAgent, BlockSelection, EntitySelection), UpdateAndGetTransitionState(IWorldAccessor, ItemSlot, EnumTransitionType)
GameContent.BlockReinforcementOld type removed (the type itself)
GameContent.BlockShelf removed (was an override) GetPlacedBlockInteractionHelp(IWorldAccessor, BlockSelection, IPlayer), OnBlockInteractStart(IWorldAccessor, IPlayer, BlockSelection)
GameContent.BlockSmeltedContainer adds IHeldParticleEmitter (the type itself)
GameContent.BlockSmeltedContainer removed (was an override) OnBeforeRender(ICoreClientAPI, ItemStack, EnumItemRenderTarget, ref ItemRenderInfo), OnHeldIdle(ItemSlot, EntityAgent)
GameContent.BlockSnow adds ICustomSnowAccumBehavior (the type itself)
GameContent.BlockWateringCan adds IContainedCustomName (the type itself)
GameContent.CollectibleBehaviorGroundStoredHeldBag overload signature changed or removed GetContainedInteractionHelp(BlockEntityContainer, ItemSlot, IPlayer, BlockSelection), OnContainedInteractStart(BlockEntityContainer, ItemSlot, IPlayer, BlockSelection)
GameContent.CollectibleBehaviorGroundStoredHeldBag removed OnContainedInteractStep(float, BlockEntityContainer, ItemSlot, IPlayer, BlockSelection), OnContainedInteractStop(float, BlockEntityContainer, ItemSlot, IPlayer, BlockSelection)
GameContent.CollectibleBehaviorGroundStoredProcessable overload signature changed or removed GetContainedInteractionHelp(BlockEntityContainer, ItemSlot, IPlayer, BlockSelection), OnContainedInteractCancel(float, BlockEntityContainer, ItemSlot, IPlayer, BlockSelection, EnumItemUseCancelReason), OnContainedInteractStart(BlockEntityContainer, ItemSlot, IPlayer, BlockSelection), OnContainedInteractStep(float, BlockEntityContainer, ItemSlot, IPlayer, BlockSelection), OnContainedInteractStop(float, BlockEntityContainer, ItemSlot, IPlayer, BlockSelection)
GameContent.CollectibleBehaviorSqueezable removed SqueezedLiquid
GameContent.CollectibleBehaviorTypedTexture adds IContainedMeshSource (the type itself)
GameContent.CookingRecipe overload signature changed or removed FromBytes(BinaryReader, IWorldAccessor)
GameContent.CookingRecipeStack overload signature changed or removed FromBytes(BinaryReader, IClassRegistryAPI)
GameContent.EidolonAnimManager overload signature changed or removed constructor()
GameContent.ElkAnimationManager overload signature changed or removed constructor()
GameContent.EntityAnimalBot overload signature changed or removed FromBytes(BinaryReader, bool)
GameContent.EntityBehaviorAttachable parameter names changed OnReceivedClientPacket(IServerPlayer, int, byte[], ref EnumHandling)
GameContent.EntityBehaviorConversable static field became const BeginConvoPacketId, CloseConvoPacketId, SelectAnswerPacketId
GameContent.EntityBehaviorConversable overload signature changed or removed OnReceivedClientPacket(IServerPlayer, int, byte[], ref EnumHandling), OnReceivedServerPacket(int, byte[], ref EnumHandling)
GameContent.EntityBehaviorMilkable overload signature changed or removed OnReceivedServerPacket(int, byte[], ref EnumHandling)
GameContent.EntityBehaviorRideable adds IMountedHungerProvider (the type itself)
GameContent.EntityBehaviorRopeTieable adds IRopeRippedListener (the type itself)
GameContent.EntityBehaviorSeatable adds IDisposable, IRenderer (the type itself)
GameContent.EntityBehaviorWritingSurface overload signature changed or removed OnReceivedClientPacket(IServerPlayer, int, byte[], ref EnumHandling), OnReceivedServerPacket(int, byte[], ref EnumHandling)
GameContent.EntityBell overload signature changed or removed OnReceivedServerPacket(int, byte[])
GameContent.EntityBoat adds IKinematicColliderTransformProvider, IMountedHungerProvider (the type itself)
GameContent.EntityBoat no longer declared here; inherited from Common.Entities.Entity (behaviour may differ) IsCreature
GameContent.EntityBoatConstruction overload signature changed or removed FromBytes(BinaryReader, bool)
GameContent.EntityBobber overload signature changed or removed FromBytes(BinaryReader, bool)
GameContent.EntityBobber no longer declared here; inherited from Common.Entities.Entity (behaviour may differ) SwimmingOffsetY
GameContent.EntityBobber removed accum
GameContent.EntityElevator drops IMountableListener, ISeatInstSupplier (the type itself)
GameContent.EntityElevator removed CreateSeat(IMountable, string, SeatConfig), DidMount(EntityAgent), DidUnmount(EntityAgent), MountAnimations
GameContent.EntityElevator overload signature changed or removed FromBytes(BinaryReader, bool)
GameContent.EntityElevator no longer declared here; inherited from Common.Entities.Entity (behaviour may differ) IsCreature
GameContent.EntityElevatorSeat type removed (the type itself)
GameContent.EntityThrownBeenade overload signature changed or removed FromBytes(BinaryReader, bool)
GameContent.EntityThrownSnowball overload signature changed or removed FromBytes(BinaryReader, bool)
GameContent.EntityThrownStone overload signature changed or removed FromBytes(BinaryReader, bool)
GameContent.EntityTrader overload signature changed or removed FromBytes(BinaryReader, bool), OnReceivedServerPacket(int, byte[])
GameContent.EntityTradingHumanoid overload signature changed or removed FromBytes(BinaryReader, bool), OnReceivedClientPacket(IServerPlayer, int, byte[]), OnReceivedServerPacket(int, byte[])
GameContent.EntityVillager overload signature changed or removed FromBytes(BinaryReader, bool), OnReceivedClientPacket(IServerPlayer, int, byte[]), OnReceivedServerPacket(int, byte[])
GameContent.ErelAnimManager overload signature changed or removed constructor(), onReceivedServerAnimation(AnimationMetaData)
GameContent.ErelAnimManager removed (was an override) Init(ICoreAPI, Entity)
GameContent.FishingSupportModSystem now sealed (the type itself)
GameContent.FurnaceSection overload signature changed or removed OnReceivedClientPacket(IPlayer, int, byte[]), OnReceivedServerPacket(int, byte[])
GameContent.GuiDialogHandbook overload signature changed or removed onLeftClickListElement(int)
GameContent.GuiDialogHandbook removed pageNumberByPageCode, shownHandbookPages
GameContent.GuiHandbookGroupedItemstackPage type removed (the type itself)
GameContent.GuiHandbookPage removed PageNumber
GameContent.IContainedInteractable overload signature changed or removed GetContainedInteractionHelp(BlockEntityContainer, ItemSlot, IPlayer, BlockSelection), OnContainedInteractCancel(float, BlockEntityContainer, ItemSlot, IPlayer, BlockSelection, EnumItemUseCancelReason), OnContainedInteractStart(BlockEntityContainer, ItemSlot, IPlayer, BlockSelection), OnContainedInteractStep(float, BlockEntityContainer, ItemSlot, IPlayer, BlockSelection), OnContainedInteractStop(float, BlockEntityContainer, ItemSlot, IPlayer, BlockSelection)
GameContent.InitCustomPagesDelegate overload signature changed or removed BeginInvoke(List<GuiHandbookPage>, AsyncCallback, object), Invoke(List<GuiHandbookPage>)
GameContent.InPieProperties type changed: EnumFoodCategory? to EnumFoodCategory FoodCategory
GameContent.ItemAnchor overload signature changed or removed GetAttachedShape(ItemStack, string), OnReceivedClientPacket(ItemSlot, int, Entity, IServerPlayer, int, byte[], ref EnumHandling, Action)
GameContent.ItemCrowbar adds IHeldItemOnMouseWheel (the type itself)
GameContent.ItemCrowbar removed getBeh(BlockSelection)
GameContent.ItemFishingPole overload signature changed or removed GetContainedInteractionHelp(BlockEntityContainer, ItemSlot, IPlayer, BlockSelection), OnContainedInteractStart(BlockEntityContainer, ItemSlot, IPlayer, BlockSelection)
GameContent.ItemFishingPole became virtual HandbookPageCodeForStack(IWorldAccessor, ItemStack), LoadHeldItemModelMatrix(Matrixf, EntityAgent, ItemSlot, ICoreClientAPI, bool), StopFishing(ItemStack, EntityAgent)
GameContent.ItemFishingPole removed OnContainedInteractStep(float, BlockEntityContainer, ItemSlot, IPlayer, BlockSelection), OnContainedInteractStop(float, BlockEntityContainer, ItemSlot, IPlayer, BlockSelection), cm
GameContent.ItemKnife removed (was an override) OnLoaded(ICoreAPI)
GameContent.ItemKnife removed knifeHitBlockAnimation, knifeHitEntityAnimation
GameContent.ItemOre overload signature changed or removed GetContainedInteractionHelp(BlockEntityContainer, ItemSlot, IPlayer, BlockSelection), OnContainedInteractCancel(float, BlockEntityContainer, ItemSlot, IPlayer, BlockSelection, EnumItemUseCancelReason), OnContainedInteractStart(BlockEntityContainer, ItemSlot, IPlayer, BlockSelection), OnContainedInteractStep(float, BlockEntityContainer, ItemSlot, IPlayer, BlockSelection), OnContainedInteractStop(float, BlockEntityContainer, ItemSlot, IPlayer, BlockSelection)
GameContent.ItemRope removed (was an override) TryMergeStacks(ItemStackMergeOperation)
GameContent.ItemShieldFromAttributes adds IHandbookListGrouping (the type itself)
GameContent.MealMeshCache removed pieMixedCategoryFillingTextures
GameContent.MealMeshCache field became readonly pieMixingCodeFillingTextures
GameContent.Mechanics.BEBehaviorMPAngledGears adds IRotatable (the type itself)
GameContent.Mechanics.BEBehaviorMPAngledGears removed CheckLargeGearJoin(), LargeGearAngleRad(float)
GameContent.Mechanics.BEBehaviorMPAngledGears removed (was an override) OnTesselation(ITerrainMeshPool, ITesselatorAPI)
GameContent.Mechanics.BEBehaviorMPAxle adds IRotatable (the type itself)
GameContent.Mechanics.BEBehaviorMPBase type changed: float to double lastKnownAngleRad
GameContent.Mechanics.BEBehaviorMPConsumer no longer declared here; inherited from GameContent.Mechanics.BEBehaviorMPBase (behaviour may differ) AngleRad
GameContent.Mechanics.BEBehaviorMPSpurGear adds IRotatable (the type itself)
GameContent.Mechanics.BEBehaviorMPWaterWheel no longer declared here; inherited from GameContent.Mechanics.BEBehaviorMPRotor (behaviour may differ) AngleRad
GameContent.Mechanics.BEBehaviorMPWaterWheel removed dir
GameContent.Mechanics.BEBrake adds IRotatable (the type itself)
GameContent.Mechanics.BEBrake removed (was an override) Initialize(ICoreAPI)
GameContent.Mechanics.BEMPMultiblock adds IRotatable (the type itself)
GameContent.Mechanics.BEMPMultiblock removed (was an override) Initialize(ICoreAPI), OnBlockPlaced(ItemStack)
GameContent.Mechanics.BEPulverizer adds IRotatable (the type itself)
GameContent.Mechanics.BEPulverizer removed (was an override) ToTreeAttributes(ITreeAttribute)
GameContent.Mechanics.BEPulverizer removed hasAxle, hasLPounder, hasPounderCaps, hasRPounder
GameContent.Mechanics.BlockAngledGears removed getGearBlock(IWorldAccessor, bool, BlockFacing, BlockFacing)
GameContent.Mechanics.BlockArchimedesScrew removed (was an override) OnNeighbourBlockChange(IWorldAccessor, BlockPos, BlockPos)
GameContent.Mechanics.BlockBrake removed (was an override) OnNeighbourBlockChange(IWorldAccessor, BlockPos, BlockPos)
GameContent.Mechanics.BlockLargeGear3m removed (was an override) OnLoaded(ICoreAPI)
GameContent.Mechanics.BlockMPMultiblockGear base class Common.Block to GameContent.Mechanics.BlockMPMultiblockBase (the type itself)
GameContent.Mechanics.BlockMPMultiblockGear removed (was an override) GetParticleBreakBox(IBlockAccessor, BlockPos, BlockFacing), GetPlacedBlockName(IWorldAccessor, BlockPos), GetRandomColor(ICoreClientAPI, BlockPos, BlockFacing, int), OnBlockBroken(IWorldAccessor, BlockPos, IPlayer, float), OnBlockPlaced(IWorldAccessor, BlockPos, ItemStack), OnGettingBroken(IPlayer, BlockSelection, ItemSlot, float, float, int), OnPickBlock(IWorldAccessor, BlockPos)
GameContent.Mechanics.BlockMPMultiblockPulverizer base class Common.Block to GameContent.Mechanics.BlockMPMultiblockBase (the type itself)
GameContent.Mechanics.BlockMPMultiblockPulverizer removed (was an override) GetParticleBreakBox(IBlockAccessor, BlockPos, BlockFacing), GetPlacedBlockName(IWorldAccessor, BlockPos), GetRandomColor(ICoreClientAPI, BlockPos, BlockFacing, int), IsReplacableBy(Block), OnBlockBroken(IWorldAccessor, BlockPos, IPlayer, float), OnBlockPlaced(IWorldAccessor, BlockPos, ItemStack), OnGettingBroken(IPlayer, BlockSelection, ItemSlot, float, float, int), OnPickBlock(IWorldAccessor, BlockPos)
GameContent.Mechanics.BlockPulverizer removed (was an override) GetDrops(IWorldAccessor, BlockPos, IPlayer, float)
GameContent.Mechanics.BlockSpurGear removed Orientation
GameContent.Mechanics.BlockToggle removed (was an override) OnNeighbourBlockChange(IWorldAccessor, BlockPos, BlockPos)
GameContent.Mechanics.MechanicalNetwork type changed: float to double angle, serverSideAngle
GameContent.MetalAlloyIngredient overload signature changed or removed FromBytes(BinaryReader, IClassRegistryAPI)
GameContent.ModSystemBlockReinforcement removed SaveReinforcments(Dictionary<int, BlockReinforcement>, BlockPos), getOrCreateReinforcmentsAt(BlockPos), toLocalIndex(BlockPos), toLocalIndex(int, int, int)
GameContent.ModSystemSupportBeamPlacer removed GetAlignMatrix(IVec3, IVec3, BlockFacing)
GameContent.ModSystemSupportBeamPlacer overload signature changed or removed generateMesh(Vec3f, Vec3f, BlockFacing, MeshData[], float)
GameContent.OnCreatePagesDelegate type changed: List to List EndInvoke(IAsyncResult), Invoke()
GameContent.OreMapLayer overload signature changed or removed OnViewChangedServer(IServerPlayer, List<FastVec2i>, List<FastVec2i>)
GameContent.PersonalizedAnimationManager overload signature changed or removed constructor()
GameContent.RemapAnimationManager overload signature changed or removed constructor(), constructor(Dictionary<string, string>)
GameContent.WeightedHandbookPage type removed (the type itself)
ServerMods.DungeonPlaceTask adds IStructureLocation (the type itself)
ServerMods.DungeonPlaceTask overload signature changed or removed constructor(string, List<TilePlaceTask>, List<GeneratedStructure>, List<ConnectorMetaData>, ConnectorMetaData)
ServerMods.DungeonPlaceTask field became property Code
ServerMods.GenDungeons removed Dungeons

Appendix B. New abstract members on existing interfaces

Section titled “Appendix B. New abstract members on existing interfaces”

These only matter if your mod implements the interface (custom block accessors, wrappers, test doubles). Members with a default implementation are not listed.

Interface New abstract members
Common.IBlockAccessor GetBlock(FastBlockPos), GetBlock(FastBlockPos, int layer), GetBlockId(FastBlockPos), GetMostSolidBlock(FastBlockPos), GetBlockEntity(FastBlockPos), GetBlockEntity<T>(FastBlockPos), GetChunkAtBlockPos(FastBlockPos)
Common.IWorldAccessor GetCustomRegistry(string), CollisionScene
Common.IWorldChunk GetLocalBlockEntityAtBlockPos(FastBlockPos)
Common.ICoreAPICommon RegisterCustomRegistry<T>(string)
Common.ICoreAPI InDeveloperMode
Common.IPlayer IsInInteractionRangeOf(FastBlockPos, float slack = 0.25f)
Common.IPlayerInventoryManager GetHotbarSlotIndex(int slotId)
Common.IWearable GetRainProtectionPercentage(ItemSlot)
Common.Entities.IProjectile ApplyUnderwaterPenalty { get; set; }
Common.Entities.IProjectileJsonConfig bool? ApplyUnderwaterPenalty { get; }
Common.IGameCalendar GetSeason(double x, double z), GetSeasonRel(double x, double z), GetHemisphere(double x, double z)
Common.IInventoryNetworkUtil HandleClientPacket(IServerPlayer, int, SerializedData), SendInventoryRollback(IServerPlayer, int, SerializedData)
Common.IAssetManager WatchCategory(...), UnwatchCategory(...), Reload(IAsset)
Common.IAssetOrigin TryResolveAsset(string, out IAsset)
Common.IAsset FullFilePath { get; set; }
Common.IXPlatformInterface CreateOrOpenMemoryMappedFile(string, long)
Datastructures.ITreeAttribute Get2DByteArray(string, byte[,]), Set2DByteArray(string, byte[,])
Client.ICoreClientAPI PlatformUtils, DeltaTimeLimiter { get; set; }, setter on HideGuis
Client.IInputAPI GetPickingRayFromMousePosition(), GetPickingRayFromMousePosition(int, int), PreviousKeyboardKeyState
Client.IRenderAPI CreateAviWriter(float, string), GetAvailableCodecs(), GlClearDepthBuffer(), RenderWireframeSphere(...), MainCamera, AllowCameraControl
Client.IShaderProgram BindTexture2DArray(string, int, int)
Client.IStandardShaderProgram ApplyTexture { set; }
Client.ITesselatorManager GetAnimationCodes(ItemStack, int), GetAnimationModel(ItemStack, int, out MultiTextureMeshRef, out Shape)
Client.ITextureAtlasAPI InsertTextureOrAddReference (three overloads), ReleaseTextureReference(AssetLocation)
Server.ICoreServerAPI PlatformUtils
Server.IServerAPI InDeveloperMode
Server.IServerEventAPI TriggerEntityGroupSpawning(...), TriggerSchematicExport(...), TriggerSchematicImport(...), events OnEntityGroupSpawning, OnSchematicExport, OnSchematicImport
Server.IServerNetworkAPI BroadcastBlockEntityPacket(FastBlockPos, int, SerializedData), the overload with ReadOnlySpan<IServerPlayer>, BroadcastPacketInRange(FastBlockPos, byte[])
Server.IServerNetworkChannel BroadcastPacketInRange<T>(FastBlockPos, T)
Server.IServerPlayer Disconnect(string logMessage, string playerMessage), SendPlayerRedirect(string host, string name)
Server.IServerWorldAccessor SeedWorldgen, GetTotalUnpausedTimeMs(), GetTotalUptimeMs(), TriggerDidPlaceBlock(...), TriggerDidBreakBlock(...)
Server.IWorldManagerAPI SeedWorldgen
GameContent.IAttachableToEntity GetAttachedShape(ItemStack, Entity, string) (replaces the old two-parameter method)
GameContent.IContainedInteractable OnContainedInteractStart(BlockEntity, ...) (replaces the old signature; the other members now have defaults)