Stope 2.10.0 for Fabric (1.20-1.20.1)
Curse Maven Snippet
What's new
New API for mod developers: inventory tools (container screen buttons, keys, and slot marks; key mappings; slot regions; click plans); recipe viewer categories for a mod's recipe types and screen zones the viewers keep clear; settings files and block entity data sent to clients, modules a setting turns off with their recipes, mimic and data models, fake players, energy, item, and fluid transfer, menus with extra data, their screens, and their values past 16 bits, events a mod defines, client events for a held stack used up and a held tool worn, screenshot steps for dev runs, items in vanilla creative tabs, writing a tree's or a feature's blocks with vanilla's flags, stronghold ring positions, placing a block as an item would, breaking one with its drops, and checks for a block's top, a waterlogged block's water tick and fluid state, tag tests for entity types and biomes, configured and placed feature keys, a loot pool that rolls another table, item traits, item drops at an entity, the entities a level ticks, who threw an item, an entity's scoreboard tags, the item entity a forced equipment drop spawns, reaction cooldowns that hold a whole trigger, a settings screen's translation keys and note rows, foliage colors and the client's time of day for color providers, oak's fire and compost values for other blocks, a fall speed for falling leaves, and two reads of a level (the mob griefing rule, rain at a spot). Nothing changes in game. Mods built for 2.0 through 2.9.0 run on 2.10.0 unchanged.
Every settings file a mod keeps through Stope now lists each setting's default in a
"$defaults" section after the settings. Files from earlier versions keep their values and
gain the section the first time they load with nothing wrong in them but missing settings.
Editing the section changes nothing; the game writes it afresh.
API
- Added
ClickPlanner,MenuSnapshot,ClickPlanRoute,ClickPlan,Click,ClickAction,PlanStack,SlotRules, andReplayLimits(experimental): the clicks that turn a menu's layout into a target, and a route on a mod's channel whose server half replays them through vanilla's click handling, with limits per player. - Added
InventoryTransportandTransportResult(experimental, client): run a click plan as one packet when the server has the route, or as simulated clicks a few per tick when not. - Added
ItemDepletedCallbackandToolWearCallback(experimental, client): the server's update emptying the selected hotbar slot or the offhand, and wearing a held tool. - Added
GroupDefinition.Builder#cooldownPerTriggerandGroupDefinition#cooldownPerTrigger(experimental): a group whose bindings' cooldowns each hold every binding on the same trigger, where by default a cooldown holds only its own binding. - Added
Strongholds#ringChunks(experimental): the chunks where a level's strongholds generate, from the seed, readable while the world generates. - Added
ModulesandModule(experimental): a mod's parts a boolean setting turns off, with the recipes that name them (thestope:modulecondition, andstope:mod_loadedfor a loaded mod, one recipe file on both loaders) and their items in creative tabs and recipe viewers. - Added
ContainerScreens,ContainerScreenInitCallback,ScreenWidgets,ContainerClickCallback,ContainerKeyCallback, andSlotOverlayCallback(experimental, client): a container screen's image geometry and hovered slot, widgets laid out beside it, clicks and keys taken before vanilla, and marks drawn on its slots. - Added
KeyMappings,MappedKey,KeyContext, andKeyDefault(experimental, client): a mod's key mappings, rebindable in Controls, read in game and on screens. - Added
SlotRegions,MenuRegions,SlotRegion,ContainerProfiles, andContainerProfile(experimental): a menu's slots sorted into the player's inventory, crafting grids, results, and container storage, with profiles from mods and resource packs (assets/<namespace>/stope/container_profiles/). - Added
ShotStepsandShotStep(experimental, client): a mod's own steps in the screenshot scripts a client runs when it starts with-Dstope.shots, as dev runs do, for checking a mod's looks from images. A step that throws fails the run, so a script can check game state too. The built-inworldstep takes a preset (flatordefault) and a seed. - Added
RecipeViewerZones,ZoneProvider, andZoneSink(experimental, client): screen areas beside a container screen's image that JEI, EMI, and REI keep their overlays out of. - Added
RecipeViewers#categoryandCategoryLayout(experimental): a mod's recipe type shown as a category of its own in JEI, EMI, and REI, with its workstations, input slots, output slot, and arrow, from one description; andRecipeViewers#craftingExamples, example crafting recipes for a recipe the viewers cannot list. - Added
BlockEntitySync#changedandSyncedBlockEntity(experimental): a block entity's data for its clients, written and read by the mod and sent through vanilla's block entity update when it changes and when a player starts seeing its chunk. - Added
MimicModelsandMimicSource(experimental, client): a block that draws another block's state, chosen per position, with that state's quads, render layer, and tint, through the Fabric Renderer API on Fabric and model data on Forge. - Added
DataModelsandDataModel(experimental, client): a block drawn from a value its block entity keeps, with the chunk and no block entity renderer, and extra models baked for it. - Added
Transfer,EnergyAccess,ItemAccess,FluidAccess,EnergyBuffer,ItemSlots,FluidTank, andFluidAmount(experimental): energy, items, and fluid found on a block face or in a stack and moved between them, and a mod's own storages exposed to Forge's capabilities and Fabric's transfer lookups, and Team Reborn Energy's when it is installed, with fluid in whole millibuckets on both loaders;EnergyBuffer.ItemSpecandFluidTank.ItemSpecfor an item's own energy or fluid, andTransfer#BUCKET_MB. - Added
ConfigFile#syncToClients(experimental): a server's settings file sent to each client that joins, whoseConfigFile#getreturns the server's values until it leaves. - Added
LevelReads(experimental):mobGriefing, whether a mob may change the world, by the game rule and on Forge the event that can overrule it for one mob, andisRainingAt, whether rain falls on a position. - Added
GameTestPlayers#mock(experimental, GameTests): vanilla's mock player, aPlayerthat is not aServerPlayerand joins nothing. - Added
LeafFalland aParticleProviders#fallingLeavesoverload that takes one (experimental, client): a falling leaf's tint and its fall speed as a factor of a cherry leaf's. The existing overloads draw as before. - Added
BlockBehaviors#flammableAsOakLog,flammableAsOakPlanks,flammableAsOakLeaves, andcompostableAsOakLeaves(experimental): oak's fire and compost values for a block or item outside aWoodSet. - Added
FoliageColorsandClientWorldClock(experimental, client): the biome-blended and default foliage colors for a leaf block's color providers, and the client world's time of day, readable from chunk-building threads. - Added
SettingsScreen.Builder#note(experimental, client): a line of gray text among a settings screen's rows, wrapped to their width. - Added
SettingsKeys(experimental):title,label, andtooltip, the translation keys aSettingsScreenreads, for a mod's datagen and lang tests. - Changed
ReactionStartedCallback's Javadoc: it says what the event guarantees (once per started step, nothing for astartthat throws) and its one limit on listeners. - Changed
ConfigFile(experimental): the file it writes documents every key's default in a top-level"$defaults"object, which a load never reads as a setting;loadrewrites a file whose only problems are missing keys or an absent or out-of-date"$defaults". A mod that reads its settings file as text, or tests that a complete file is left untouched, sees the section and that one rewrite. - Added
FakePlayers(experimental):get, a machine's fake player on either loader;isFake; andbreakBlockanduseItemOn, which fire the loaders' player break and use events, and on Forge the place event, so claim mods can refuse them. - Added
WorldGenBlocks(experimental):placeTreeBlock, a tree's block set as vanilla's tree feature does, so leaves keep their distance and schedule no tick;place, a feature's block set with clients told and no neighbor updates; andwaterlogged, a state's waterlogged form. - Added
Registrar#menuType,MenuFactory,Menus, andMenuScreenBindings(experimental): a menu type whose client menu reads extra data the server sends;Menus#opento open it, withMenus#MAX_EXTRA_BYTES(32,597) of extra data at most and nothing for a fake player; andMenuScreenBindings#bind, with itsMenuScreenBindings.ScreenFactory, for its screen. - Added
MenuValues,IntValue, andLongValue(experimental):MenuValues#of, a menu's values, andaddIntandaddLong, int and long values it shows its client whole, past vanilla's 16-bit data slots, sent to the player with it open when they change. - Added
CreativeTabs#addAfter(experimental): a mod's items in a vanilla creative tab, after a given item. - Added
Event#create,ModEvent, andEventResult(experimental): an event a mod declares and fires itself, cancelable, safe to fire from any thread. - Added
BlockPlacement(experimental):sturdyTop, whether a block's top face is sturdy enough to stand on;stateForandplace, the state an item's block takes at a spot where it survives and setting it as a player's placement does;breakWithDrops, a block broken as the level breaks one with no tool, its loot dropped; andcollisionTop, how high a block's collision shape reaches. - Added
Waterlogging(experimental):scheduleWaterTick, the water tick a waterlogged block owes when a neighbor changes, andfluidState, the fluid a state holds by itswaterloggedproperty. - Added
ItemTraits(experimental):hasVanishingCurse,isFood, andisPlant, whether a stack has Curse of Vanishing, is food, or plants as a crop. - Added
ItemDrops(experimental):dropAt, a stack dropped at an entity, anddropFromInventory, the matching stacks of a mob's own inventory dropped. - Added
LevelEntities(experimental):entitiesTick, whether a level ticks its entities by its loader's rule, andforEachTicking, a walk over the entities of one class at entity-ticking positions. - Added
ItemEntities#thrower(experimental): the player or mob that threw an item entity. - Added
ScoreboardTags(experimental):add, a scoreboard tag (the kind/tagedits) added to an entity, andhas, whether an entity has one. - Added
MobEquipmentDropsCallback.Drops#forceDropwith a consumer (experimental, server): the item entity a forced slot drops, handed to the mod that forced it. - Added
RegistryLookups#configuredFeatureKeyandRegistryLookups#placedFeatureKey(experimental): a configured or placed feature's key from its ID. - Added
RegistryLookups#isInTagfor an entity type and for a biome (experimental): whether a tag holds one, with no allocation. - Added
LootAdditions#addTableRoll(experimental): a pool of one roll from another loot table, behind a switch.

