2.28.0
MC 26.3ReleaseLatestWelcome to Kore 26.3!
Kore now targets Minecraft 26.3 Wilderness Bound, with its worldgen, loot data and compute changes. And what a cycle that was :') Ten snapshots, three pre-releases and three release candidates, sixteen Kore releases in total, and every new file type got its builder along the way.
The part I'm the proudest of is what Kore built on top of that. Provider maths is plain Kotlin now (rolls = 2 + score("kills", EntityTarget.THIS)), compute works from the data DSL and from scoreboard entities, and the helpers maths runs on it 3 to 24 times faster. helpers also gets NPCs with per-player conversations, particles share one model everywhere, and almost every provider field takes a plain number or a Kotlin range. Packs come out shorter too, and identical on the JVM and JS.
Heads up though, this cycle breaks a lot, probably the most since multiplatform. Most of it is mechanical renames to match the game, and the migration notes list every change from 2.16.0-26.2 with its before and after.
What's new?
The big stuff this cycle:
- Provider expressions and
compute:+,-,*,/,%,toFloat()andcoerceInbuild context provider trees and keep them small, and the same expressions feedcomputefrom thedataDSL,setTo { }on scoreboard entities andblockIdProvider(). - Faster
helpersmaths:sin,cos,sqrt,distanceSquared,parabolaand everyScoreVectorhelper run oncompute, 3 to 24 times faster in game, andEntity.distanceTogives the distance between two entities in three commands. - NPCs and conversations: clickable interactions, NPCs pairing a mannequin with a hitbox, and per-player conversations with timed lines, pauses and choices.
- One particle model: a single
ParticleOptionsserves/particle, enchantment effects, environment attributes and the VFX shapes, covering every particle with options and fixing the ones Kore wrote wrong. - Plain numbers and ranges:
rolls(1..3),maxUses(12),count(10)orblobFoliagePlacer(radius = 2, height = 3), no moreconstant(...)anduniform(...)everywhere. - Smaller, identical packs: SNBT string values the game reads back unquoted lose their quotes, inline resources in commands are written exactly like their file, and floats print the same on the JVM and JS.
- Hoisting passes: two opt-in passes move inline context providers and predicates repeated across functions into their own files.
- Interactive docs: a provider explorer sampling any provider with the game's formulas, a world height diagram, a mannequin builder with a 3D skin preview, a display transformation editor, a noise explorer and conversation mockups. Every doc page also has a Markdown copy for LLMs, and the install snippets always show the latest release.
Code examples
Provider expressions and compute
Score expressions
One compute command per expression, where scoreboard players operation needs a temporary holder per step.
Plain numbers and ranges
NPCs and conversations
Progress is stored per player, so ten players can talk to the same NPC at once, and a player with nothing pending costs no command per tick.
Particles
Block IDs
blockIdProvider() turns the block read by compute block into a number, so one command stores "which block is this" in a score instead of one execute if block per candidate.
Performance
helpers maths measured in game, ms per tick for 100,000 calls:
sin: 1745 → 235 ms,cos: 1098 → 123 mssqrt: 1254 → 200 ms, still exact on everyIntdistanceSquared: 1248 → 387 ms,parabola: 594 → 167 msScoreVector.dot: 702 → 173 ms,lengthSquared: 822 → 278 ms,cross: 1356 → 405 msScoreVector.length: 3778 → 159 ms,distanceTo: 3445 → 163 ms,normalize: 4611 → 659 msEntity.distanceToagainst twoScoreVector.setToPositionplusdistanceTo, on markers: 7320 → 1156 ms
Migration notes
What to change coming from 2.16.0-26.2, grouped by area.
Loot tables, predicates and item modifiers
Context providers
Number providers are split into int and float providers. An int field (rolls, counts, levels, maxUses, xp, entityScores ranges...) takes an int provider, constant(3) or uniform(1, 5), and a float field (bonusRolls, setDamage, randomChance...) a float provider, constant(3f) or uniform(1f, 5f). fromInt(...) and fromFloat(...) convert between them. The builders only resolve inside the blocks that take a provider (loot tables, pools, item modifiers, predicates, villager trades, trade sets): a provider built outside one uses its class or moves into the block.
| Before | After |
|---|---|
sum(...) |
add(...) |
scoreNumber |
score (int only) |
storageNumber |
intStorage, floatStorage |
environmentAttribute |
intEnvironmentAttribute, floatEnvironmentAttribute |
binomial(5f, 0.5f) |
binomial(5, 0.5f) |
valueCheck |
intValueCheck, floatValueCheck |
intRange(0f, 10f) |
intRange(0, 10) |
limitCount(64) |
limitCount(max = constant(64)) |
The classes follow the builders: ConstantNumberProvider is ConstantContextIntProvider or ConstantContextFloatProvider, and the same goes for UniformNumberProvider, ScoreNumberProvider (int only), StorageNumberProvider, EnvironmentAttributeNumberProvider and EnchantmentLevelNumberProvider (float only). BinomialNumberProvider is BinomialContextIntProvider, SumNumberProvider is AddContextIntProvider or AddContextFloatProvider, and IntOrNumberProvidersRange is ContextIntProviderBounds.
Predicate files hold one condition, named by type
The discriminator of a condition is type, and a predicate file holds one condition: several conditions declared in a predicate { } block become the terms of one all_of.
Every predicate field holds one condition
Loot tables, pools and entries, item functions, advancement triggers, dialogs and enchantment requirements take one condition, several conditions being wrapped in an all_of the same way. conditions { } is condition { }, and the loot table, pool and entry functions { } is modifier { }.
PredicateAsList is removed: AllOf and AnyOf take an inlinable list of conditions as terms, and EntityOrPredicates and LocationOrPredicates hold one condition, without legacyEntity and legacyLocation. The allOf { }, anyOf { }, entity { } and location { } builders are unchanged.
Item functions use type
An item function names its kind in type instead of function. A modifier holding one function is written as that object, several ones as a list, and ItemModifierAsList is InlinableItemModifier. An itemModifier(name) { } without any function, or a slotSource(name) { } without any source, throws when generated.
reference is a bare ID
The reference predicate, item modifier and slot source classes are removed: the builders write the bare ID string. The item modifier reference(name: String) is gone, it takes an ItemModifierArgument or ItemModifierTagArgument.
Loot table and tag entries
The tag entry writes items instead of name, and expand is optional and named. The loot_table entry value is a list, written bare when it holds one element.
Loot table types
LootTableType is a deprecated alias of the generated ContextKeySets, so the old code still compiles with a warning. The type is written as an ID ("type": "minecraft:chest"), and the archaeology context is ARCHAEOLOGY, written archaeology like the game.
blockStateProperty is matchBlock
Damage tags
tag(...) takes any number of damage types or tags, so expected is named.
Item function fields
The colors of setCustomModelData are CustomModelDataColor entries (a fixed color or a provider). setStewEffect takes Effects.*. explorationMap requires its destination, one or several structures or tags. modifyContents takes modifier { }, and setLootTable has no block entity type and takes a loot table ID.
potion_contents item predicate
The predicate is an object with potions and effects, so its block configures that object.
Advancements, villager trades, recipes and slots
Triggers
conditions { } of a trigger is condition { }, and entity and location fields also take the ID of a predicate file. channeledLightning victims are a list of predicates. beeNestDestroyed, enterBlock and slideDownBlock match a blocks list and a state instead of one block, brewedPotion matches a potion_contents predicate, the recipe triggers take recipes, and playerGeneratesContainerLoot takes lootTables.
Advancement backgrounds
Generating a root advancement (no parent) with a display but no background throws, and so does a child advancement with a background.
Villager trades
givenItemModifiers is givenItemModifier, which also takes an item modifier ID. wants and additionalWants are TradeCosts instead of ItemStacks, the wants(...) builders are unchanged.
Recipes
cookingTime is a required parameter of smelting, blasting, smoking and campfireCooking. RecipeTypes.CRAFTING_SPECIAL("book cloning") keeps working, but the CraftingSpecial object, CraftingSpecialEntry and RecipeTypes.values are removed. CraftingTransmute.result and CraftingSpecialMapExtending.result are TransmuteResults, their result(...) builders are unchanged.
Slot sources and slot ranges
Slot sources moved from features.loottables.entries.slotsource to features.slotsources. Every slot range is a slot written <name>.*, so ARMOR writes armor.*, and ARMOR[index] is gone since only numbered ranges like HOTBAR have indexed slots. InventoryManager.clear(slot) writes item fill ... with minecraft:air to empty every selected slot.
Worldgen
Configured features are Features
Configured features are written to worldgen/feature with their fields next to type. The builders don't change, but the generated ConfiguredFeatures and ConfiguredFeatureArgument are Features and FeatureArgument.
Surface rules are material rules
The old names stay as deprecated aliases, and rules and conditions can live in their own files, used by ID.
Configured carvers are carvers
The package features.worldgen.configuredcarver is features.worldgen.carver, and every name drops Configured. The generated Carvers used to list carver types: those are CarverTypes now, and Carvers lists the carvers themselves, so old code using Carvers keeps compiling with another meaning. Tags.Block.OVERWORLD_CARVER_REPLACEABLES and NETHER_CARVER_REPLACEABLES are gone.
| Before | After |
|---|---|
configuredCarvers { } |
carvers { } |
configuredCarver(...) |
carver(...) |
configuredCarverTag(...) |
carverTag(...) |
ConfiguredCarversScope |
CarversScope |
ConfiguredCarvers (generated) |
Carvers |
ConfiguredCarverArgument |
CarverArgument |
Carvers (generated carver types) |
CarverTypes |
lavaLevel, replaceable, debugSettings (with its airState, waterState, lavaState and barrierState) and netherCave are gone. The cave yScale is roomVerticalRadiusMultiplier, and the canyon one moves into shape.
Basalt and glowstone features
Removed features
coralMushroom, desertWell, kelp, netherForestVegetation, randomPatch, seaPickle, seagrass, twistingVines and weepingVines are removed, and sculkPatch loses catalystChance and extraRareGrowths (place the catalyst and shriekers with simple_block features in a sequence). coralClaw and coralTree require their placed feature.
Placement modifiers
randomOffset is offset, with one int provider per axis. count(), countOnEveryLayer(), rarityFilter() and heightRange() have no defaults anymore, since those placed nothing. environmentScan takes an Int maxSteps, and SearchDirection is VerticalDirection.
Feature fields typed like the game
hugeFungus:hatState,stemState,decorStateandvalidBaseBlockare block states,blockState(Blocks.DIRT)instead ofsimpleStateProvider(Blocks.DIRT).speleothemCluster:densityandwetnessare float providers,chanceOfSpeleothemAtMaxDistanceFromCenteraFloat.vegetationPatchandwaterloggedVegetationPatch:xzRadiusis an int provider.randomSelector:defaultand each entry'schanceare required.template,fossiland thesingle/legacySinglepool elements hold aProcessorListOrInline, andSequence.featuresandSimpleRandomSelector.featuresa list ofPlacedFeatureOrInline. The builders taking IDs are unchanged.
| Before | After |
|---|---|
DeltaFeature.content |
contents |
EnvironmentScan.directionOfSearchDirection |
directionOfSearch |
MangroveRootPlacer.canGrowTrough |
canGrowThrough |
UpwardsBranchingTrunkPlacer.canGrowthThrough |
canGrowThrough |
Block states and block state providers
Block states write id and properties, or a bare block ID without properties: BlockState.name is id, like BlockStateBuilder.id and the block parameter of blockState(...), simpleStateProvider and rotatedBlockProvider. The provider classes carry their full name: SimpleStateProvider, RandomBlockProvider, RotatedBlockProvider, NoiseProvider, DualNoiseProvider, NoiseThresholdProvider, RandomizedIntStateProvider, RuleBasedStateProvider (and its Rule) and WeightedStateProvider (and its Entry) are SimpleBlockStateProvider, RandomBlockStateProvider, RotatedBlockStateProvider, NoiseBlockStateProvider, DualNoiseBlockStateProvider, NoiseThresholdBlockStateProvider, RandomizedIntBlockStateProvider, RuleBasedBlockStateProvider and WeightedBlockStateProvider, and the rotated provider's state is a block state provider. Only calls with named arguments or reading these properties change.
Density functions
Fields follow the game: single-input nodes write input, two-input nodes left and right, constant writes a Double value, and the shift nodes write noise.
| Before | After |
|---|---|
invert(...) |
reciprocal(...) |
Add(argument1 = a, argument2 = b) |
Add(left = a, right = b) |
yClampedGradient { fromY; toY } |
gradient { axis = Axis.Y; fromCoordinate; toCoordinate } |
endIslands(...) |
endOuterIslands(...), without the central island |
shiftedNoise(...) |
noise(...) { shiftX(...) } |
interpolated(name, input) |
interpolated(name, input, cellSizeXz, cellSizeY) |
cacheOnce(...) |
cache(...) |
cache2D, cacheAllInCell, flatCache |
removed |
Noises and noise settings
firstOctaveandamplitudesarebaseOctaveandamplitudeModifiers, in noise files and in the noise-based block state providers, whoseNoiseclass isNoiseParameters.aquifersEnabledisaquifers { }, andoreVeinsEnabledis theoreVein(...)material rule. TheNoiseRouterfieldsbarrier,fluidLevelFloodedness,fluidLevelSpread,lava,veinToggle,veinRidgedandveinGapare removed, andpreliminarySurfaceLevelischunkSurfaceLevel.noiseOptions(minY, height, sizeHorizontal, sizeVertical)isnoiseOptions(minY, height).spawnTargetis built withspawnTargetPoint { }, each density function mapped to a value or a range.
Biome spawns are environment attributes
spawners, spawnCosts and creatureSpawnProbability are removed from Biome, and Spawn has one count int provider. The spawner(type, weight, minCount, maxCount) builder is unchanged.
Environment attribute builders
ambientParticles takes particle(options, probability) entries in its block, written under particle. ambientSounds and backgroundMusic are configured in their block only. In bedRule, explodes is destroyOnUse, next to the new destroyOnLeave, so a positional third argument now sets destroyOnLeave, and the overloads taking an instance are removed.
Particles, components and entities
Particles
particles { } and its builders (dragonBreath, flash, fallingDust...) are gone, as are ParticleData, the enchantment particleType(...), dustParticleType(...) and the other *ParticleType builders and classes: pass a ParticleOptions from the factories in io.github.ayfri.kore.data.particle. particle(Particles.X, ...) still works for particles without options. The VFX particle field takes a ParticleOptions. ColorAsDoubleArraySerializer, RGB.fromDoubleArray and the normalizedArray getters are removed, since particles write packed ints.
Components
swingAnimationandSwingAnimationComponentareattackAnimation/AttackAnimationComponentandinteractAnimation/InteractAnimationComponent, andSwingAnimationTypemoves toio.github.ayfri.kore.arguments.enums.mapColor(...)andMapColorComponentare removed.- Trim materials take a palette from
Textures.Palettes.Trim(wasTextures.Trims.ColorPalettes), andoverrideArmorAsset(s),overrideArmorMaterial(s)and theArmorMaterialenum are gone. - Entity variant components are written under their real IDs,
axolotl/variantinstead ofaxolotl_variant. The output changes, the builders don't. - The
texture,capeandelytraof a profile take aPlayerSkinTextureArgument,CapeTextureArgumentandElytraTextureArgument.textureProfile("namespace:path")still takes a string.
Entity summon data and display entities
ItemEntitySummonData.displayName,displayNameVisibleanddisplayName(text)are the sharedcustomName,customNameVisibleandcustomName(text, color), andcustomNameis aChatComponents.motionis aList<Double>androtationaList<Float>, themotion(dx, dy, dz)androtation(yaw, pitch)builders are unchanged.posis removed, sincesummontakes the position, andairis aShort.itemEntitySummonData { }is removed, configure the entity initemStack(...).summon { }.- Display entities:
width,heightandviewRangeareFloats, andTextDisplay.textis aChatComponents.
Helpers maths
distanceSquared,parabolaand theScoreVectordot,crossandlengthSquaredstore0when the result doesn't fit anInt, instead of wrapping.- They throw when building the pack if a score belongs to a selector that can match several entities: use
limitToOne. HelpersConstants.mathDisplayUuidis removed. A world that ran an older version keeps itstext_displaymath entity until it is killed.
Generated code and SNBT
Root entries of generated trees are SCREAMING_CASE
Generated lists with folders (Recipes, TemplatePools, Noises, DensityFunctions, Structures, MaterialRules, SoundEvents, EnchantmentProviders) name their root entries like enum entries.
SNBT keys
encodeToSnbt writes the properties of any @Serializable class in snake_case, like the data pack JSON, and decodeFromSnbt reads them back, @JsonSerialName setting a different key. Inline resources in commands are written like their data pack file, so default values appear and string values lose the quotes the game doesn't need, which the game reads the same way.
Changelog
Documentation
docs(helpers): Open the mannequin page on summoning one with a player skin, fix the display transformation snippets and pivots, and show the real UUID handle selectors of mannequins and display entities.d8009505d21d84docs(itemmodifiers, references): Describeexploration_mapas adding map data to the item it applies to, and note that lists mix IDs and inline values and that a tag can only replace the whole list.bfc940fd572c5be098464docs(loot-tables): Document that number providers compute 32-bit floats, so score providers andentity_scoresranges lose precision past 2^24 (MC-254370).fd09e41docs(worldgen): Document every configured feature, tree placer and tree decorator with its in-game effect, vanilla uses, ranges and defaults, and explain how to tune carver, provider, feature, noise and biome parameters with vanilla reference values and links to misode's generators.348f8de2b616b40fdb14ee547598docs(worldgen): Note thatfinal_densityno longer adds the beardifier and that density functions are evaluated in single precision.0e91635f2faf25feat(website): Add the provider explorer, world height diagram, mannequin builder with a 3D skin preview, display transformation editor, noise explorer, chat and dialog choice mockups, conversation player and NPC hitbox visuals to the doc pages.9a536e1510512230e10b1c2cba3b6075657cf0b7a6feat(website): Serve a clean Markdown copy of every doc page, rebuildllms.txtandllms-full.txtfrom them, and fill the docs' install snippets from the latest releases at build time.537c1191a3575efix(website): Let inline code wrap anywhere, and tokenize SNBT compounds, selectors and bracketed components in mcfunction highlighting.27fdb82df38b74
New Features
feat(advancements): Take one inline predicate or predicate ID in trigger entity and location fields and a predicate list inchanneled_lightningvictims, matchbrewed_potionwith apotion_contentspredicate, accept recipe lists in the recipe triggers and loot table lists and tags inplayer_generates_container_lootand thelootreward, and replace theblockofbee_nest_destroyed,enter_blockandslide_down_blockwith ablockslist andstate, with tests and docs.7e6697a5945201f74f3c718db3101024dbbfeat(advancements): Require a displaybackgroundon root advancements and forbid it on children, with tests and docs.dfc420efeat(blocktransformers, components): Add theblock_transformerresource and theblock_transformeritem component referencing it, with rules taking any block state provider andupdate_from_neighbors, with tests and docs.069c231705efb96e97bd6feat(commands): Accept an inline configured feature in/place feature, with tests and docs.0f1ad17feat(commands): Add thecomputecommand andcomputesources in thedataDSL, with tests and docs.80b26f991b74fffeat(commands): Add theposteffectcommand and the generatedPostEffectslist, with tests and docs.c84051afeat(commands): Add the animation and duration arguments toswing,noneand a 0 duration included, with tests and docs.186effe7481782feat(commands): Take slot sources in/itemand/execute if items, add/item fill,/item overrideand/execute if slots, and make slot sources data-driven infeatures.slotsourceswith thecontainerorigin, with tests and docs.868096afeat(components, providers): Split number providers into thecontext_int_providerandcontext_float_providerfamilies with their files, references, ranges, value checks andcomputemodes, add theconditional,number_dispatcher,weighted_list,avg,max,minandmulproviders withaddreplacingsum, scope their builders toNumberProviderScope, and add thecompostableitem component, with tests and docs.c72dd5bedd58bf664bd84e82eaada42dc3f09c4cd75e3d65edb97975feat(components): Accept texture, cape, elytra and model overrides on player profiles, typed with the generatedPlayerSkinTextureArgument,ElytraTextureArgumentandCapeTextureArgument, with tests and docs.a8eff1bb303a36feat(components): AdddirectionalParticlesto theteleport_randomlyconsume effect, with tests and docs.5372e42feat(components): Add thecooking_fuel,brewing_fuel,sign_text_front,sign_text_back,mob_visibility,villager_food,waxedandcushion/colorcomponents, the fuels taking plain numbers or provider IDs, with tests and docs.5511726dc9051cdf6e5cdaf32dbefeat(components): Match potion effects in thepotion_contentscomponent predicate, its potions moving underpotions, with tests and docs.66c9380feat(decorated-pots): Writepot_decorationsas named item stacks and add theprovides_pottery_patterncomponent and the data-drivendecorated_pot_pattern, with tests and docs.594d462feat(environmentattributes): Addnatural_mob_spawnswith theoverlaymodifier,creature_world_gen_spawn_probabilityand theappendmodifier ofambient_particles, and write spawn entries with a singlecountprovider, with tests and docs.f6e6257feat(gametest): Add the test instancedimension, with tests and docs.1a8a447feat(generators): AddGenerator.generateJsonElement, the generated content as aJsonElement, and build the Fabric load conditions on it, with tests and docs.1091e41feat(helpers): Add a generated block ID context int provider summing bit block tags, with tests and docs.a4f41cffeat(helpers): Add equipment, custom name, rotation, tags and the other entity fields to mannequins, and accept any text component in text displays, with tests and docs.6921c69e116726feat(helpers): Add interaction entities with right and left click callbacks, and NPCs pairing a mannequin with a clickable interaction, with tests and docs.f00004251d27a2feat(helpers): Add per-player conversations with timed lines, click pauses and dialog and chat choices, with tests and docs.133ad0efeat(helpers): TakeParticleOptionsin the VFX shapes, for colored particles, with tests and docs.450fd49feat(instruments): Add the instrumentdurability_damage, with tests.99c8f0bfeat(itemmodifiers, loottables): Accept plain numbers and ranges for pool rolls,scoreand storage fallbacks,enchant_with_levelslevels, stew effect durations,set_enchantmentslevels and custom model data floats and colors, drawing uniformly from anIntRangeor float range on provider fields, likerolls(1..3), with tests and docs.cadc1866c96820ad97bcffeat(itemmodifiers, predicates, providers, slotsources): Accept predicate, item modifier, number provider and slot source IDs and tags in place of inline values, and remove thereferencepredicate, item modifier and slot source, with tests and docs.f5c697dcf153464a473b13f0e72cfeat(itemmodifiers): Accept providers in theset_ominous_bottle_amplifieramplifier and theset_custom_model_datacolors, make theexploration_mapdestination a required structure list, accept item modifier IDs inmodify_contents, and giveset_loot_tablea loot table ID without a block entitytype, with tests and docs.33352fc93df8656176f76feat(loottables): Accept loot table IDs, lists and tags withexpandin theloot_tableentry, item IDs, lists and tags in thetagentryitems, and add the missing loot context types,command_compute_*included, with tests and docs.045123b37f29f6feat(loottables): Type the loot tabletypewith the generatedContextKeySetsregistry, written as an ID, deprecatingLootTableType, with tests and docs.8b35ca7feat(nbt): Write SNBT string values unquoted when the game reads them back as strings, with tests and docs.4d74314feat(oop): AddEntity.distanceTowriting the distance between two entities into a score in three commands, through theirPosand onecompute, with tests and docs.30c099efeat(oop): AddsetTo { }expressions and float factors on scoreboard entities throughcompute, with tests and docs.c1b9c4cfeat(oop): Make entity summon data the shared base of mannequins, display entities, interactions and item entities, with team, custom data, passengers, frozen ticks andinvulnerableTimebuilders and thefall_distanceandAirkeys fixed, with tests and docs.d0dfcfd22b05c936973e5feat(optimization): Add opt-in passes hoisting repeated inline context providers and predicates into files, with tests and docs.135114cb313143feat(predicates): Accept damage type lists in damage tags, with tests and docs.0b1cda3feat(predicates): Replaceblock_state_propertywithmatch_blockand write the block predicatenbtas a JSON object, which failed to encode, with tests and docs.3951a1dfeat(providers): Add Kotlin operators building context int and float provider trees, with tests and docs.d608cb6feat(recipes): Add thebrewingrecipe type,TransmuteResultwith an optionalidforcrafting_transmuteandcrafting_special_mapextending, and makecookingtimerequired on the cooking recipes, with tests and docs.e8a5667c88b49a4c5b2e6feat(trims): Replace the trim materialasset_nameandoverride_armor_assetswithpalette_id, typing the palettes moved totextures/palettes/trim, with tests and docs.87f48acfeat(villagertrades): AddmaxUses,xpandreputationDiscountsetters taking providers or plain numbers,TradeSet.amounttaking a provider, and writewantsandadditional_wantsas trade costs with an int providercount, with tests and docs.86144d3626ee90feat(worldgen): Add int and float provider setters taking plain numbers to features, placement modifiers, dimension types, biome spawns, enchantment providers, block state providers, tree placers, carvers andplay_sound, height provider setters taking a vertical anchor, thevery_biased_to_bottomint provider and therelative_to_sea_levelvertical anchor, with tests and docs.3f1bbb7e468c70ff102463e9e0680a293ddfeat(worldgen): Add thecuboid,random_chanceandrandomly_selectedplacement modifiers, replacerandom_offsetwith a per-axisoffset, and require the value ofcount,count_on_every_layer,rarity_filter,height_rangeand theenvironment_scanmax_steps, with tests and docs.31aa6a35bb759f7e77229d38f9a6feat(worldgen): Add thedimension_originstructure placement, with tests and docs.aa27894feat(worldgen): Add theheight_rangeandvolume_matchblock predicates and theall_of,any_of,height_matchandnotrule tests, with tests and docs.b16f179c05ed20ce65aaf1811343feat(worldgen): Add theoverlay,projected_random_patchy_squareandfallen_treefeatures and inline placed features in theoverlay,sequenceandsimple_random_selectorlists, with tests and docs.e3077c7ddff76cbca0a33feat(worldgen): Add theroot_placerof trees, thepale_moss,creaking_heart,place_on_ground,attached_to_logsandshelf_mushroomtree decorators, thepoplar_trunk_placerandpoplar_foliage_placer, and theend_podiumfeature, with tests and docs.697fb08491ce1f27c2c4cfeat(worldgen): Add thesub,div,negate,lerp,floor,round,ceil,truncate,distance_to_point,log,pow,sign,sliceandsqrtdensity functions, inline noise parameters andshiftX,shiftYandshiftZonnoisereplacingshifted_noise, renamecache_oncetocachewithout the other caches, and require theinterpolatedcell sizes, with tests and docs.3a6c631f364122c0cc84763828bb76f6d46b19be8e2d2082dfeat(worldgen): Add thecopy_properties_providerandrandom_block_providerblock state providers, wrap any provider inrotated_block_providerwith an optional direction, rename the provider types to their game names, and add block state provider files and references, with tests and docs.84d9cdfb79eb176568024e5ce86ffeat(worldgen): Rename configured carvers to carvers written toworldgen/carver, flatten their config, and replacelava_level,replaceable,debug_settings,y_scaleandnether_cavewith the 26.3 cave fields and canyonshape.y_scale, with tests and docs.1707e79feat(worldgen): Rename surface rules to material rules, writematerial_rulein noise settings and add the data-drivenmaterial_ruleandmaterial_conditionfiles usable by reference, with tests and docs.7831c956ff693bfeat(worldgen): Replacebasalt_columns,basalt_pillarandglowstone_blobwith the configurablestepped_column_cluster,single_block_pillarandrandom_neighbor_spreadfeatures, with tests and docs.2a533b921da214feat(worldgen): Replace the bed rule'sexplodeswithdestroy_on_useanddestroy_on_leave, and addstraw_bed_rule, with tests and docs.50c9fd9feat(worldgen): Replace the noise settings aquifer and ore vein toggles withaquifersand theore_veinmaterial rule, makespawn_targeta list of points built withspawnTargetPoint { }, adddebugFunctions, renamepreliminarySurfaceLeveltochunkSurfaceLeveland remove the noise options'sizeHorizontalandsizeVertical, with tests and docs.f2f255bee01b3024dd27d1649ce0bc2212d7b397cefeat(worldgen): Require the placedfeatureofcoral_clawandcoral_tree, and remove thecoral_mushroom,kelp,sea_pickleandseagrassfeatures, with tests and docs.80573cbfeat(worldgen): Write configured features toworldgen/featurewith their fields next totypeinstead of inconfig, generatingFeaturesandFeatureArgumentin place ofConfiguredFeaturesandConfiguredFeatureArgument.4672068feat(worldgen): Accept inline processor lists in thetemplateandfossilfeatures and single pool elements, with tests and docs.3f26c7e
Bug Fixes
fix(commands): Write inline configured features, dialogs, loot tables, item modifiers, predicates and slot sources in their data pack shape, and the inline item modifier of/item modifyand/item replace ... fromas the function itself instead of amodifierswrapper, with tests and docs.97fe2538816668fix(components): Type thepotion_contentscomponent matcher withPotionOrTagArgument, since it matches potion IDs and not mob effects.ea8dfc4fix(components): Write entity variant components under their real IDs likesheep/colorinstead ofsheep_color, keep the namespace of custom component types, and write profile UUIDs as int arrays, with tests.0314b442093399fix(environmentattributes): Write theambient_particlesentry particle asparticlelike the game instead ofoptions, with tests.51a84fffix(helpers): FixsetToLookDirection,lookAlongandatan2being off by half a block from centered integer coordinates, without moving the marker out of its chunk, with tests and docs.82f97e8fix(helpers): Type display width, height and view range as floats and addteleportDuration, write display transformations decomposed without mutating them, start the scale and translation builders from the current values, and writeglow_color_overrideand text displaybackgroundas RGB and ARGB ints, which the game read as nothing before, with tests and docs.72fb22dad7e30fcfa5c46562f5f3fix(itemmodifiers, slotsources): Write item modifier and slot source files as one object, wrapping several entries or a lone reference in asequenceor agroup, with tests and docs.383388db3af444fix(itemmodifiers): Type theset_stew_effecteffect as a mob effect instead of a potion, with tests and docs.aad68bbfix(kore): Skip unset elements when encoding NBT, so classes inheriting serializable properties from another module serialize on JS.b483717fix(loottables): Write the archaeology loot context asarchaeologylike the game instead ofarcheology, with tests and docs.77d3f4bfix(nbt, serialization): Write whole floats and doubles with a decimal point on every platform in JSON and SNBT, and keep the numbers and strings of a mixed SNBT list, with tests.2c2e08179f7dbdfix(publish): Declare the GPL-3.0 license of the LICENSE file in published POMs instead of MIT.f2161a3fix(tradesets): Makeamount(min, max)draw likeamount(range), writing a constant for equal bounds and rejecting inverted ones, with tests.dddcc8cfix(worldgen): Make the end spikecrystal_beam_targetoptional, write the pillarcenterXandcenterZkeys vanilla reads and add thespike { }builder, with tests.0af0f84fix(worldgen): Write the keys vanilla reads: the delta featurecontents,can_grow_throughof the upwards branching trunk placer and mangrove root placer, the root placerabove_root_placement, theenvironment_scandirection_of_searchand the weighted random selectordata, with tests.22bf17b6f364cd52e141202b1f2990a855efix(worldgen): Write the types vanilla reads: the geodecrack_point_offsetas an int, the huge fungus block states as plain block states, the speleothem cluster density, wetness and chance as float providers, the vegetation patchesxz_radiusas an int provider and multi-noise ranges as[min, max]arrays, and raise the root system and patch defaults to the schema minimum, with tests.90b819ea5b1f19794312c34cdaadcc0293769b4931
Performance improvements
perf(helpers): Computesin,cos,sqrt,distanceSquared,parabolaand theScoreVectordot, cross, length, distance and normalize withcomputecommands, fixingnormalize, with tests and docs.0363c5ddfe37e303b1a0b1c891b4e9398b11ff4df7
Refactors
refactor(arguments): Make every slot range a slot written<name>.*, soARMORwritesarmor.*instead of the invalidarmor, and keep indexing to the numbered ranges.4b94da0refactor(blocks, worldgen): RenameBlockState.nameand the block parameter ofsimpleStateProvider,rotatedBlockProviderand theblockmaterial rule toid, and write block states with theidandpropertieskeys, as a bare block ID when no property is set, reading both forms, with tests and docs.06efef969d393brefactor(colors, particles): Share oneParticleOptionsmodel between/particle, enchantment effects and environment attributes, with namespaced IDs, packed int colors and every particle's options, and removeColorAsDoubleArraySerializer,RGB.fromDoubleArrayand thenormalizedArraygetters.cb9bf868ccc89fe694fe3refactor(components): Remove themap_colorcomponent and replaceswing_animationwithattack_animationandinteract_animation, movingSwingAnimationTypetoarguments.enums, with tests and docs.fa1e9953b8044arefactor(environmentattributes): Build ambient particles, ambient sounds, background music and bed rules only through builders, without hand-built entry instances.3917261refactor(generation): Name the root entries of generated path trees in SCREAMING_CASE like enum entries,Recipes.STONEnext toRecipes.Brewing,TemplatePools.EMPTYandNoises.CALCITE.e0250e9refactor(itemmodifiers, loottables, predicates): Write the item function and predicate discriminators astype, with several predicate conditions merged into anall_of, and replace the loot table, pool, entry and item functionconditionsandfunctionswith a singleconditionandmodifier, with tests and docs.39f07aafcc41e22699b78refactor(recipes): Build special crafting types withRecipeTypes.CRAFTING_SPECIAL(group)instead of theCraftingSpecialobject, drop the unusedRecipeTypes.valueslist and giveSmithingTrimthesmithing_trimtype.f3a1d2crefactor(serializers): Read and write SNBT element names in snake_case like the data pack JSON, honoringJsonSerialName.4b1af714974c52refactor(villagertrades): RenamegivenItemModifierstogivenItemModifier, which also takes an item modifier ID, with tests and docs.08e3dc9refactor(worldgen): Remove thedesert_well,random_patch,nether_forest_vegetation,twisting_vinesandweeping_vinesfeatures and thesculk_patchcatalyst_chanceandextra_rare_growthsfields, with tests and docs.0886237fb4c0a84129ce0830bee4refactor(worldgen): Remove the biome spawn fields moved to thenatural_mob_spawnsandcreature_world_gen_spawn_probabilityenvironment attributes, with tests and docs.fdfa128refactor(worldgen): Rename the density function fields toinput,left/right,valueandnoise,inverttoreciprocalandend_islandstoend_outer_islands, and replacey_clamped_gradientwithgradientalong any axis with a tiling mode, with tests and docs.d87344d4ef59afaa3845crefactor(worldgen): Require the random selector default and chances.9c44ce3refactor(worldgen): Reshape noise parameters intobase_octave,base_amplitude,octave_count,normalizeandamplitude_modifiers, sharing oneNoiseParametersclass between block state providers and writingoctave_countfrom the amplitude modifiers when unset, with tests and docs.64cc613785f40e
Full changelog: https://github.com/Ayfri/Kore/compare/v2.16.0-26.2..v2.28.0-26.3
