Stope 2.11.0 for Forge (1.20-1.20.1)
Curse Maven Snippet
What's new
New API for mod developers:
- Inventory tools: container regions a mod finds for each menu as it is sorted, a menu slot's place in the player's inventory, a region's row length, whether a key event on a container screen is a held key repeating, whether a text field has the keyboard, and refill plans that do not silence the next refill.
- Items: an item's ID, tags, kind, and place in registry order; a stack's name, enchantments, armor, damage, tool tier, stack size, and stored data apart from wear; and the creative tabs' order of items.
- Client events: each client tick, an item added to the player's inventory, and a held stack replaced by what its use leaves.
- Client helpers: a chat line, a hotbar line, and an interface sound from a client mod; one call that lists a mod's 32x resource pack; and handlers for the client's resource loads that read every pack's copy of a file.
- Settings: screen rows for a choice of several values and for text, and settings files that keep the entries their mod does not define when saved.
- Testing: a GameTest call that replays a click plan through its route.
Two fixes change what a player sees, on Forge only. A mod's screen key bound with no modifier now also works while Ctrl, Shift, or Alt is held, as it does on Fabric. And the multiplayer list no longer marks a server incompatible because it has no Stope or another version of it; joining was never affected. Mods built for 2.0 through 2.10.0 run on 2.11.0; one that relied on such a key staying silent under a modifier on Forge now reads the modifiers itself, and an automated check that typed more into a settings field than the field takes now gets an exception.
Developers: releases are now in the Maven repository at https://maven.someguy.us, and no
sources jar is attached on CurseForge.
API
- Changed: releases are in the Maven repository at
https://maven.someguy.us, with a sources jar that carries all of Stope's source; no api-sources jar is attached on CurseForge. - Changed:
PlayerGuide's Javadoc names its example fileRULES.md. - Added
ClientTickCallback(experimental, client): the end of every client tick, the place to pollMappedKey#consumeClickfor a key pressed with no screen open. - Added
ItemGainedCallback(experimental, client): the server's update adding an item to the player's main inventory or hotbar that no click put there, such as a pickup or a/give. A container screen or a click plan silences it while open or running and for a second after, but for a plan sent as one packet that stays within the player's own inventory. - Added
ItemReplacedCallback(experimental, client): the server's update replacing the last item of a held stack with another, as a potion's bottle or a stew's bowl does. - Added
InventoryTransport#executeRefill(experimental, client): a click plan that brings a stack into the hand without keepingItemDepletedCallbackandItemReplacedCallbacksilent for the second after it. - Changed
InventoryTransport#execute: while a plan that goes as one packet and stays within the player's own inventory runs with no container screen open,ItemDepletedCallbackandToolWearCallbackread only what the server sends, where every running plan had the client's own slots taken as confirmed each tick. A plan still keeps an emptying silent while it runs and for a second after. - Added
ClientReloadersandPackFile(experimental, client): handlers that run at each client resource load, with the resource manager or with every resource pack's copy of the JSON files in one assets directory, lowest pack first. - Added
SettingsScreen.Builder#choiceand#textField(experimental, client), each for a setting of the builder's file, withSettingsScreen#setChoicefor automated checks andSettingsKeys#choicefor the key of a value's text. - Changed
SettingsScreen#setFieldText: it also types into a text field, and refuses text longer than the field takes (16 characters for a number field), which the field cut on screen while passing the whole of it on. - Added
ProfileRegionFinderandContainerProfiles#registerRegions(experimental): a mod's rule that names one menu type's container regions for each menu as it is sorted, for menus whose slot counts differ from one opening to the next. - Added
MenuRegions#laidOut: whether a finder or a profile's regions named the menu's container regions, for a tool that sorts only regions a mod vouches for. - Added
BuiltinPacks#register32x,#folder32x, and#titleKey32x(experimental, client): one call that lists a mod'sresourcepacks/<mod id>_32x/pack under a gold title, and that pack's folder name and title key, which are plain strings on either side. - Added
SlotRegions#inventorySlotandMenuRegions#columnsAt(experimental): a menu slot's index in the player's inventory, read with no allocation, and how many slots a region draws in its first row. - Added
RegistryLookups#item,#itemId,#itemTagExists, and#itemTagIds(experimental): an item by its ID, an item's ID, whether an item tag exists, and the tags an item is in. - Added
ItemTraits#hasBindingCurse,#customName,#enchantmentCount,#protectionLevels,#wornSlot,#armorStats,#damage,#maxDamage, and#toolTier, andArmorStats(experimental): what a stack is named, how it is enchanted, the armor slot it is worn in and what it adds there, how worn it is, and its tool's material level. - Added
ItemKindandItemTraits#isKind(experimental): whether a stack's item is a sword, a potion, a block item, or another of the kinds vanilla gives a class of their own, and whether it is worn on the head for show. - Added
ItemTraits#dataKey,#maxStackSize, and#isEatenOrDrunk, andRegistryLookups#itemIndex(experimental): a stack's stored data as a text that leaves wear out, how many of it one slot holds, whether using it eats or drinks it, and an item's place in registry order. - Added
ClientNotices(experimental, client): a line in the player's chat, a line over the hotbar, and a sound played as the interface plays its own. - Added
CreativeTabOrder(experimental, client): the creative inventory's items in the order its tabs list them. - Added
ContainerScreens#isKeyRepeatandContainerScreens#isTyping(experimental, client): inside aContainerKeyCallback, whether the event is a held key repeating; and whether a text field on the screen has the keyboard, the recipe book's search box and the search boxes of JEI, EMI, and REI included. - Added
GameTestClickPlans(experimental): hands a click plan to a route's server half in a GameTest, as the route's packet would, and says whether it was done or refused. - Changed
MappedKey#isHeld,#matchesKey, and#matchesMouseon Forge: a mapping bound with no key modifier is held and matches whatever modifier keys are down, as on Fabric and asisHeld's Javadoc said. Before, a screen-only mapping read as not held and matched nothing while Ctrl, Shift, or Alt was down, so one bound to Alt itself never worked. - Added
ConfigSpec.Builder#keepUnknownKeys(experimental):ConfigFile#savewrites back the entries of the file that such a spec does not define. Every other spec's file saves as before, with the spec's keys alone.
This mod has no additional files

