Edition layers: generic game logic, per-edition adapters, per-version wire
Status: accepted direction, started 2026-11-25. Slices land as stacked pull requests, one each.
Progress:
- Slice 1, the player layer: merged in #3737.
- Slice 2, the edition folders: merged in #3738. The handler contexts went to
player/context/rather than an edition, since the intent handlers use them, andBlockTargetandcontentUseOnBlocktoinput/handlers/.applyClientMovementandreplaceOtherLogins, which both editions call, came out of their Bedrock handlers intoplayer/. - Slice 3.1, movement: merged in #3754. A move, a jump, a sprint, a sneak, a flight, a bed and the held buttons are intents. Bedrock's
PlayerAuthInputandPlayerActiondecode into them, and so do Java's move packets,Player CommandandPlayer Input. Java sends no jump, so a Java move that leaves the ground going up is one, as vanilla'shandleMovePlayerdecides. Bedrock's input mode stays Bedrock's, since only Bedrock has touch, mouse and gamepad modes. - Slice 3.2, blocks: merged in #3837. Mining was already the
mineBlockintent, so what was left is a block pick, an entity pick and a lectern page turn. Each is an intent, decoded from Bedrock'sBlockPickRequest,ActorPickRequestandLecternUpdateand from Java'sPick Item From BlockandPick Item From Entity. Java turns a lectern's page with a container button, which waits for the screens slice. Picking still only logs, as it did. A sign edit arrives as Bedrock'sBlockActorData, which no handler reads yet, and Java'ssign_update(#3775), so it is a feature to build rather than a handler to move. - Slice 3.3, item use: merged in #3845.
InventoryTransaction's bodies are intents: a use on a block, a use at nothing, a hit, a use on an actor and a release, beside the client-timed break that ismineBlock'sfinish. Java decodesUse Item,Attack,InteractandPlayer Action's release into the same ones. The Bedrock handler keeps what only Bedrock has: checking the transaction against the docs, the hand slot it names, the mismatch report and the legacy two-action drop.ItemStackRequest, which moves stacks between Bedrock's windows, is not in this slice: Java moves them withContainer Click, by slot and button, so the two need a shared model of a stack move before either decodes into it, and that is a slice of its own after the screens. - Slice 3.4, screens: merged in #3851. An anvil's wear, a crafter's slot toggle, a lab table action and a recipe book's settings are intents. Bedrock's
AnvilDamage,PlayerToggleCrafterSlotRequest,LabTable,SetPlayerFurnaceOptionsandSetPlayerInventoryOptionsdecode into them, and Java'sChange Recipe Book Settingsinto the recipe book's. Java toggles a crafter's slot, turns a lectern's page and picks a villager's trade by container id, inside a screen the server has opened. The server opens no screen for a Java client yet, so those wait until one does, withContainer Click. The trade and workstation rules,tradeScreenandworkstation, are game logic that onlyItemStackRequestuses, so they move with it. - Slice 3.5, forms, books and commands: merged in #3854. A form's answer, a book edit and a command block's or a command block minecart's edit are intents. Bedrock's
BookEditandCommandBlockUpdatedecode into them, andModalFormResponsehands its answer toanswerFormonce it has checked the answer is JSON, which disconnects a client when it is not, as BDS does. Java'sEdit Book,Set Command BlockandSet Command Minecartdecode into the same intents. A Java screen sends no command block name or tick delay, so an edit that leaves a field out keeps the block's own.CommandRequestdecodes intorunCommandtoo, carrying the request its reply echoes, and the presenter'sshowCommandOutcomesends the reply. The data-driven screens are Bedrock's own UI, kept in the Bedrock session's screen state, and stay too. Structure blocks move with what remains, slice 3.6. Thenetwork/aliases are gone. - Slice 3.6, what remains: merged in #3870. A structure block's settings and its save, load, scan or query are intents, which Bedrock's
StructureBlockUpdateandStructureTemplateDataRequestand Java'sSet Structure Blockdecode into. What is left ineditions/bedrock/handler/is Bedrock's own, and stays:- The connection and the join: login, the handshake, network settings, the packs, the client cache, sub-chunks, the loading screen, latency, disconnects and violation warnings.
- Packets only a Bedrock client sends about itself or its own features: the skin, the emote list, client options, diagnostics, aim assist, the old
MovePlayer, and a player location a client has no business sending. - Education Edition and Marketplace features: multiplayer settings, photos, receipts, NPCs and world templates (
SimpleEvent). - Requests a Java client makes some other way or not at all, which wait for the feature behind them: map data and locked copies (Java is sent a map's data unasked), riding links, the lodestone database and a difficulty change from the settings menu.
- The handlers that wrap Bedrock's protocol around an intent:
PlayerAuthInput,InventoryTransactionandModalFormResponse, andItemStackRequest, which waits for its own slice beside Java'sContainer Click. PlayerActionbecame a decoder later, andPlayerAuthInputdecodes its block actions through the same function.
- Slice 4.1, the player's own state: merged in #3871.
showAttributes,showMotion,showActorData,showRespawnedandshowGameRulesare presenter calls, andshowDeathcarries where the player comes back, so Bedrock's presenter sends the death screen'sRespawnandDeathInfoitself. Two ofPlayerSession's six edition checks are gone, the attributes' and the death screen's. - Slice 4.2, the player's own inventory: merged in #3875.
showInventoryandshowOwnSlotareBedrockPresenter's to send now, read from the session's inventory with the stack ids Bedrock names stacks by, andopenOwnInventoryopens the player's inventory screen under a window the session records.ShownContainernames the cursor too, which Java does not show. Two more ofPlayerSession's edition checks are gone, the inventory's and the slot's, and itssendHandItemandsendArmorForwith them. - Slice 4.3, block containers and trades: merged in #3876.
openContainer,showTradeOffers,showContainerDataandshowContainerSlotsare presenter calls. The session keeps the window table, the open container and which of its properties the client already has, and the presenter sends the packets.sendContainerSlot, which only Bedrock's handlers call, iseditions/bedrock/containerSlot.tsnow. A Java client is opened no screen yet (#3769). - Slice 4.4, in three parts. The world change and the respawn exchange: merged in #3897.
showWorldChangesends the change and returns the loading screen the session waits on, which Java has none of, andshowRespawnPointsends Bedrock'sRespawnstates. The session asksplacesItselfOnRespawnwhere it checked the edition. Against thechange-dimensioncaptures, a Bedrock change no longer sendsStopSoundorPlayStatus(#3882). The chunk path: merged in #3899.BedrockChunkWiresends a Bedrock client's publisher updates, chunks, radius, sub chunks and cache blobs, and the session sends both editions' chunks through one path. The creative menu and the recipes: merged in #3902.sendCreativeContentsandsendCraftingDataare functions ofeditions/bedrock/joinContent, which only the join burst calls. - The last of slice 4, the packets
PlayerSessionstill built itself: merged in #3906. The join's spawn status, the End's credits andAvailableCommandsareshowSpawned,showCreditsandshowCommands, and the session still decides which commands a player is offered. The login handler writes its ownPlayStatus. The session's move batching had no caller left, since the replicator batches every actor's moves, and is gone. The session builds no Bedrock packet now. A Java client is rolled the credits byGame Event4, and itsClient Command0 decodes into their finish while they are pending (#3903). Its command tree went out with #3773. - Slice 5, screens and stack moves, part 1: merged in #3932. A Java client is opened a storage block's screen:
Open Screenwith vanilla's menu and title, and the block's slots above its own inventory. Chests, barrels, ender chests, shulker boxes, hoppers, dispensers and droppers open; furnaces, brewing stands, workstations and trades do not yet.Close Containerdecodes intocloseContainer. AClick Containeris answered with the window as the server holds it, so the client puts back what it predicted, until clicks decode into stack moves (#3769). - Slice 5.2, the stack move model: merged in #3933.
inventory/stackMoves.tsmoves a count of a stack between two slots, swaps two and takes a count off one, generic over how a caller names its slots, with the rulesItemStackRequestHandlerhad: when two stacks merge, when they trade places, which keeps the stack's network id, and that a furnace's result takes nothing. Bedrock's take, place, swap, drop and destroy run through it, unchanged. Java's clicks decode into it next. - Slice 5.3, Java's clicks, part 1: merged in #3939.
Click Containerdecodes into theclickContainerintent, whichcontainerClickscarries out as vanilla's menu does, over the moves ofstackMoves: a left or right click picks up, puts down, splits, merges or trades a stack, a click outside the window throws, a shift-click moves to the other part of the window, a number key swaps with a hotbar slot or the off hand, Q throws, a double-click gathers and a creative middle click copies. It applies in the player's own inventory window, and an armor slot takes only its own piece. A block's window, a drag and the crafting grid apply nothing yet, and every click is shown back as the server holds the window, withSet Cursor Item. - Slice 5.3, Java's clicks, part 2: merged in #3943. A click in a storage block's screen, a chest's, a barrel's, an ender chest's, a shulker box's, a hopper's, a dispenser's or a dropper's, applies over
storageWindow, which numbers the block's slots above the player's own as vanilla's menus do, shift-clicks between the two, and keeps a shulker box out of a shulker box. What it moves in the block is kept there, and every other player with the block open is shown the slots that changed through their own presenter.otherViewersOffinds them for Bedrock'sItemStackRequesttoo. - Slice 5.4, screens of their own, part 1: merged in #3947. A furnace, a blast furnace and a smoker open for a Java client under their menus and titles, and
Set Container Propertyshows the fuel's burn and the cook under the Java menu's ids, with the cook's total, which the station does not report: vanilla's default for the station, as a Bedrock client assumes it. A click in their screens moves nothing yet, since taking a smelt's result pays its experience out. - Slice 5.4, part 2: merged in #3950. A click in a cooking station's screen applies over
furnaceWindow, numbered as vanilla's furnace menu: a shift-click puts what the station cooks in its input and what burns in its fuel, the fuel slot takes only fuel and an empty bucket, and the result takes nothing. Taking from the result pays out the experience of what it cooked, as Bedrock'sItemStackRequestdoes. - Slice 5.4, part 3: merged in #3957. A Java player crafts in the inventory's 2x2 grid. A click on the grid moves stacks in the player's crafting input, the inventory window shows the grid and the stack it makes, and taking that stack crafts it as vanilla's result slot does: onto the cursor, into the inventory with a shift-click while a whole result fits, into the world with Q, or into an empty hotbar slot with a number key.
gridCraftmatches the grid and spends a craft, over the result stacks Bedrock'sItemStackRequestbuilds (craftedStacks). - Slice 5.4, part 4: merged in #3961. A crafting table opens for a Java client under the crafting menu, its window numbered as vanilla's: the result, the 3x3 grid and then the player's own slots. A click on the grid moves stacks in the player's crafting input, a shift-click puts a stack in the grid first, the result and the grid are shown back after each click, and taking the result crafts as in the inventory, with the craft event naming the table.
- Slice 5.3, Java's clicks, part 3: merged in #3963. A drag across slots applies as vanilla's
quickCraftdoes: its start names whether the stack spreads evenly, one item each or, for a player with infinite materials, a full stack each, each slot it passes is kept while the stack has an item for it, and its end spreads the stack over them. A drag over one slot is a click on it, and any other click while one is under way only ends it.ClickContainerHandlerkeeps each player's drag between clicks, per window. - Slice 5.5, the brewing stand: merged in #3964. A brewing stand brews for both editions (
world/brewing.ts): blaze powder burns for the brews itsminecraft:brewing_fuelgives, a brew counts down 400 ticks, and its last tick turns every bottle the ingredient brews and uses one ingredient up. A Java client opens it underminecraft:brewing_standandcontainer.brewing,Set Container Propertyshows the brew and the fuel under the Java menu's ids, and a click applies overbrewingWindow, numbered as vanilla's brewing stand menu: a bottle slot takes one brewing input, the ingredient slot a reagent and the fuel slot a brewing fuel. A shift-click repeats while it moves the same item, as vanilla's does, which fills the three bottle slots in one click. A Bedrock client is shown the same progress under the ids the pinned servers send, which theopen-brewing-standexchange captured; the order they arrive in differs from BDS's (#3958). An ingredient leaves no crafting remainder yet (#3960). - Slice 5.6, pick block: under review. A block pick puts the block's item in the hand for both editions, as vanilla's
tryPickItemdoes: a stack of it in the hotbar is selected, one elsewhere in the inventory trades places with a suitable hotbar slot's, and a player in creative is given one there.item/blockItems.tsnames the item a block is picked as, which is the block's own for most blocks and the standing one's for a torch, a sign, a banner, a head or a coral fan on a wall.showHeldSlottells the client its hand, withSet Held SlotorPlayerHotbar. A pick in creative that asks for the block's data copies a container's slots onto the stack; the rest of the block entity's data, such as a sign's text, is not copied yet (#4037). - Slice 5.7, the enchanting table: merged in #3973. A Java client opens it under
minecraft:enchantmentandcontainer.enchant, and a click applies overenchantingWindow, numbered as vanilla's enchantment menu: the item slot holds one item, the lapis slot only lapis, and a shift-click puts lapis in its slot and one item in an empty item slot. The three rows go through the presenter'sshowEnchantOffers, which a Java client is sent as the menu's ten container properties and a Bedrock client asPlayerEnchantOptions. A row's button, decoded fromClick Container Buttoninto thepressContainerButtonintent, enchants the item and spends its lapis and levels as vanilla'sclickMenuButtondoes. The table plays no sound for a Java client yet (#3972). - Slice 5.8, the anvil: merged in #3981. A Java client opens it under
minecraft:anvilandcontainer.repair, and a click applies overanvilWindow, numbered as vanilla's anvil menu: either input takes any stack, and a shift-click moves a player's stack into the inputs.Rename Itemdecodes into therenameItemintent, which keeps the typed name on the window. After each click and each name, the result and its cost go through the presenter'sshowAnvilResult, and taking the result spends the inputs and the levels as vanilla'sonTakedoes. The anvil does not wear down yet (#3980). - Slice 5.9, trading: under review. A Java client opens a trader's screen under
minecraft:merchantand the trader's Java title, and is sentMerchant Offers: each offer at its base price, with a special price that brings the price the client works out to the one the player pays now, and the trader's level and experience.Select Tradedecodes into theselectTradeintent, which moves the payment for the picked offer in from the inventory as vanilla'stryMoveItemsdoes, and a click applies overmerchantWindow, numbered as vanilla's merchant menu. Taking the result trades throughtakeMerchantOffer, which Bedrock'sItemStackRequesttakes through too. - Slice 5.10, the grindstone and the loom: under review. Both open for a Java client, the grindstone under
minecraft:grindstoneandcontainer.grindstone_titleand the loom underminecraft:loomandcontainer.loom, and a click applies overgrindstoneWindowandloomWindow, numbered as vanilla's menus. Their rules areenchantment/grindstone.tsandcrafting/loom.ts, which Bedrock'sItemStackRequesttakes itsCraftRepairAndDisenchantandCraftLoomactions through too. A Java client picks a loom pattern withClick Container Button, which decodes intopressContainerButton, and a Bedrock client names it by its short code. The result slot is shown throughshowContainerSlots, and a Java slot carries a banner'sminecraft:banner_patterns. - Slice 5.11, the crafter: in progress. A Java client opens a crafter under
minecraft:crafter_3x3andcontainer.crafter, andChange Container Slot Statedecodes into thetoggleCrafterSlotintent Bedrock'sPlayerToggleCrafterSlotRequestalready did. Its handler turns an empty slot off or on in the crafter's record, which keeps it under Bedrock'sdisabled_slotsshort, so every Bedrock client holding the chunk is sent the crafter'sBlockActorData, as the pinned servers send it in thetoggle-crafter-slotexchange. Every player with the crafter open is shown the slot as the screen's property of that slot, which a Java client is sent asSet Container Propertyand a Bedrock client is not. A click applies overcrafterWindow, numbered as vanilla's crafter menu, and a slot that is off takes nothing from a Java click. A BedrockItemStackRequestmay put a stack in it, as the pinned servers take one in thecrafter-disabled-slotexchange. A crafter does not craft yet, so its result slot stays empty (#4079). A screen that closes and puts its stacks back into the inventory names each slot they went into through the presenter'sshowPutBack, which a Java client is sent asSet Player Inventory Slot. - Bundles, the pick: under review.
Bundle Item Selecteddecodes into theselectBundleItemintent, which puts the picked place in the bundle's contents on the bundle's stack in the open window, as vanilla'stoggleSelectedItemdoes.item/bundleContents.tsreads a bundle's contents off itsminecraft:bundle_contentscomponent and names the stack a right click takes out: the picked one, or the newest. The pick lasts on a stack in the player's own slots and in a screen's inputs; a block's slots are read from its record each time, so a pick there is lost. Bedrock has no packet for a pick. - Bundles, clicks and contents: under review. A left or right click with a bundle on a stack, or with a stack on a bundle, moves stacks in or out of the bundle as vanilla's
BundleItemoverrides do (inventory/bundleClicks.ts), by the weightsBundleEditkeeps, and plays the bundle's sounds. A Java slot carries a bundle's stacks asminecraft:bundle_contents, both ways. Still missing (#4013): holding use with a bundle in the air to drop what it holds, which needs an item use that ticks; and a Bedrock client's bundle, which keeps its stacks in a dynamic container named by the bundle's id. The server sends no such container, andItemStackRequestHandlerrefuses a move that names one. - The beacon: under review. A Java client opens it under
minecraft:beaconandcontainer.beacon, and a click applies overbeaconWindow, numbered as vanilla's beacon menu: the payment slot holds one item ofminecraft:beacon_payment_items. The screen's levels and effects go throughshowContainerData, which a Java client is sent as the menu's three data slots.Set Beacondecodes into thesetBeaconEffectsintent, and Bedrock'sBEACON_PAYMENTrequest action pays through the same rules inworld/beacon.ts, inside the request so its answer names the spent payment: the pyramid has to offer the choice, as vanilla'svalidateEffectsasks, one payment item is spent and the block entity keeps the effects as Bedrock ids. Every 80 ticks an active beacon gives its effects to the players in its reach. The beacon plays no activation or deactivation sound and raises noconstruct_beaconadvancement yet (#4081). - Slice 5.12, stack requests: in progress. Bedrock's
ItemStackRequestdecodes into themoveStacksintent, one per packet, which carries each request's moves in order (inventory/stackRequest.ts): take, place, swap, drop, destroy, a creative pick, a craft and the slots it consumes, an enchanting row, a trade, an anvil's, a grindstone's or a loom's result and a beacon's choice. Each move names its slots in the server's stores (the player's containers, the crafting grid, a workstation's inputs or the block's slots) with the container and slot the client used, which the answer repeats.MoveStacksHandlerapplies each request all or nothing overstackMoves, the workstation takes andtakeMerchantOffer, and the presenter'sanswerStackRequestsanswers with oneItemStackResponse. The Bedrock handler keeps what is Bedrock's: the request ids a client makes up, the container names, the creative and recipe net ids it was sent, a trade's and an enchanting row's net id and the beacon's effect ids; Bedrock's presenter keeps the stack ids. An action it cannot read becomes a refusal at the point it stands, so the moves before it are rolled back as they were. The workstation takes moved toinventory/workstationTakes.tsand Bedrock's names for those slots toeditions/bedrock/workstationContainers.ts;tradeScreenis gone. Other players at the same block are shown what a request changed through their own presenter, as a Java click's viewers are, so a Java player sees a Bedrock player's moves in a chest. Thebeacon-paymentexchange showed that the pinned servers take a beacon's payment only when the same request destroys it, and refuse a choice that spends nothing withITEM_NOT_CONSUMEDand one that consumes it withACTION_REQUEST_NOT_ALLOWED; the server had spent the payment itself, as Dragonfly does, and now answers as the captures do. Which items a slot takes is shared withcontainerClicks(#4082):MoveStacksHandlerasks the windows a Java click is carried out in, throughslotCapacityininventory/screenWindows.ts, and refuses a move that would put more in a slot than its window lets a click put there withCANNOT_PLACE_ITEM, as the pinned servers answer in the slot exchanges: a furnace's fuel slot, a beacon's payment slot, an enchanting table's two slots, a brewing stand's bottle and fuel slots, an armor slot and a shulker box in a shulker box. A request that names more than the slot holds, such as two iron ingots for a beacon's payment, is refused whole, where a Java click puts in what fits. The pinned servers take some moves a Java window refuses, and a Bedrock request is taken there too: a stack in a cooking station's result slot, anything in a brewing stand's ingredient slot and a stack in a crafter's slot that is off. They refuse a glass bottle in a brewing stand's bottle slot, which a Java click puts there, and so does a Bedrock request. The same exchanges showed that a Bedrock client numbers a brewing stand's ingredient 0 and its bottles 1 to 3, and names a crafter's slots underLEVEL_ENTITY_CONTAINER, whichcontainerSlotsnow follows. A Bedrock craft still matches the recipe its client names by net id, where a Java click matches the grid throughgridCraft. - Slice 5.13, the workstations: in progress. A Java client opens a stonecutter under
minecraft:stonecutterandcontainer.stonecutter, and a smithing table underminecraft:smithingandcontainer.upgrade. Each window is numbered as vanilla's menu numbers it, from one table of layouts (inventory/workstationWindow.ts): the inputs, the result, then the player's slots. A click on an input applies over the window's own rules (stonecutterWindow,smithingWindow), and a click on the result takes it as vanilla's result slot does, through the takes ininventory/workstationTakes.ts: the stonecutter cuts one input by the picked recipe and the smithing table spends one of each input. Both editions match the two stations' slots as one recipe input (crafting/stationCrafts.ts), so a Bedrock client'sItemStackRequestcrafts from the same input.Click Container Buttonat a stonecutter picks a recipe by its place in the input's list, which is the orderUpdate Recipessends the stonecutter recipes in, and the pick goes out as the menu's data slot. A cartography table opens underminecraft:cartography_tableandcontainer.cartography_tableovercartographyWindow, and its take clones a map onto an empty map, zooms one out with paper or locks one with a glass pane, as vanilla'ssetupResultSlotandMapItem.onCraftedPostProcessdo. Bedrock's request at a cartography table is still refused: its shape is not known from a capture of the pinned servers (#3698). - Sign edits: under review. Bedrock's
BlockActorDatais a decoder now, and Java'sUpdate Signdecodes into the sameeditSignintent. A Java client sends the one face it edited, so a face the intent leaves out keeps its text, and its lines lose their formatting codes as vanilla'shandleSignUpdatestrips them. A Java client is not yet opened the sign editor (#3775). - The difficulty: under review. Bedrock's
SetDifficultyis a decoder now, and Java'sChange Difficultydecodes into the samesetDifficultyintent. Its handler sets the difficulty for everyone when the player may run/difficulty, as Java'shandleChangeDifficultyasks for the game master permission, and shows anyone else the server's own back. A Java client's lock on the difficulty is not read yet, since the world keeps no lock (#3813).
Problem
packages/prismarine/src/network/ holds the transport and the wire, and also most of what a player is and does: the session, which chunks a client has, which entities it sees, keep-alives, admission, boss bars, trades, maps. About 50 Bedrock packet handlers under network/handler/ run game logic themselves rather than handing it on. A behavior written there exists for Bedrock only, and the Java Edition support (the Java plan) has to write it again or go without.
ADR 0027 started the split for inputs: an edition decodes a packet into an intent, and one intent handler runs it for both. Outbound, ADR 0026's SessionPresenter is the contract both editions implement. This plan finishes the split and moves the code to match.
The three layers
- Generic. What a player asks for is an intent, run by one handler for both editions (
input/). What a player is shown is aSessionPresentercall. The session, its chunks, its entities, its keep-alive, admission and arrival are game logic with no edition in them (player/). - Per edition. An edition decodes its packets into intents, implements the presenter, and owns its join exchange (
editions/bedrock/,editions/java/). An edition's code holds no game rule: when it decides something about the world, the decision moves to the generic layer. - Per version. Inside an edition, a version is a wire concern: Bedrock's per-protocol codecs and wire gates (ADR 0003), Java's per-release packet tables and handler lookup. A decoder or a presenter that differs by version asks the version's table or gate; it is never copied per version.
network/ keeps what is network: transports, codecs, the dispatcher, the connection, batching, compression, encryption and packet traces.
Target layout
| Now | Moves to |
|---|---|
PlayerSession, ChunkView, ChunkSender, EntityTracker, KeepAlive, playerAdmission, playerArrival, BossBar, carriedMaps, sessionPlayers, createConnectedPlayer | player/ |
presenter/SessionPresenter and the shown* shapes | player/presenter/ |
InputQueue | input/ |
decoder/, the Bedrock packet handlers in handler/, BedrockPresenter, the join burst, startGameData, contentPayloads, joinPacketCache and the other Bedrock packet builders | editions/bedrock/ |
network/java/ | editions/java/ |
| Game logic inside a Bedrock handler | an intent and its handler, input/ |
A moved or replaced module's old public subpath is removed, not kept as a deprecated alias or a shim, and its changeset names the replacement. Removing a subpath that a release published is a breaking change, with the bump the versioning policy gives it. Slice 3.5 removed the network/ aliases slices 1 and 2 had left.
Slices
- Player layer. Move the edition-neutral modules in the first row of the table, and their tests, to
player/, andInputQueuetoinput/. Mechanical: no behavior changes. - Edition folders. Move
network/java/toeditions/java/, and the Bedrock decoders, presenter, join burst and packet builders toeditions/bedrock/. Mechanical. - Bedrock handlers into intents, one area per slice. Java decodes into the same intents where it has the packet.
- Movement:
PlayerAuthInput,MovePlayer. - Blocks:
PlayerAction,BlockPickRequest, block entity updates. - Inventory:
InventoryTransaction,ItemStackRequest,MobEquipment. - Screens: anvil, lab table, crafter, furnace options, trading.
- Forms, books and commands:
ModalFormResponse,BookEdit,CommandRequest, command and structure blocks. - What remains in
handler/.
- Movement:
- Outbound.
PlayerSessionstill sends Bedrock packets itself in many places, which a Java connection drops. Each becomes aSessionPresentercall, so the session holds no edition.BedrockPresenteris built with a smallBedrockSessionState, the session state Bedrock's packets carry beside what the contract hands it, so the shown types stay plain.- The player's own state: attributes, motion, actor data, the death screen, coming back alive and game rules.
- The player's own inventory: its contents, one of its slots, the held item and the armor, and the screen the player opens on it. Bedrock names every stack by a network id it assigns on the inventory, which
BedrockSessionStategrows to reach. - Block containers and trades: the screen a block or a trader opens, its offers, its properties and its slots.
- The world change, the respawn exchange and Bedrock's chunk path, which becomes a
ChunkWirebeside Java's, and the creative inventory and the crafting data, which only Bedrock's join sends and which move with the join burst.
- Screens and stack moves. Java's screens open as Bedrock's do, and a stack move is one model that Bedrock's
ItemStackRequestand Java'sClick Containerboth decode into: Bedrock names each move, and Java names a slot and a button, which the server works out the moves of as vanilla'sAbstractContainerMenu.doClickdoes.- Storage screens open for a Java client, and its clicks are answered with the window as the server holds it.
- The stack move model, with Bedrock's take, place, swap, drop and destroy decoding into it.
- Java's clicks decode into it: pick up, quick move, swap, throw, drag and pick up all.
- The screens with properties and slots of their own: furnaces, brewing stands, workstations and trades.
Where new code goes
- A rule of the game:
player/,world/,entity/orinput/handlers/, never an edition folder. - Something a client sends: a decoder in its edition that produces an intent.
- Something a client is shown: a
SessionPresentermethod, implemented by each edition. - Something only one version of one edition has: a gate or a version table entry in that edition's wire, never a branch in game logic.