Skip to content

Ver/26.2 - #582

Draft
icedmoca wants to merge 15 commits into
CardboardPowered:ver/26.2from
icedmoca:ver/26.2
Draft

Ver/26.2#582
icedmoca wants to merge 15 commits into
CardboardPowered:ver/26.2from
icedmoca:ver/26.2

Conversation

@icedmoca

@icedmoca icedmoca commented Aug 7, 2026

Copy link
Copy Markdown

tested & all

Kyle Drake added 10 commits August 7, 2026 09:34
- minecraft 26.2, loader 0.19.3, fabric-api 0.156.0+26.2
- paper-api 26.2.build.110-stable
- Adventure 4.25.0 -> 5.2.0. Paper 26.2 already resolved Adventure 5
  transitively, so the old 4.25.0 pin was being silently overridden.
- Libraries.java ships its own runtime dependency list with pinned SHA1s;
  it was still fetching Adventure 4.25.0 and paper-api 26.1.2 at boot,
  which no compile could catch. Updated with hashes from Maven Central.
- settings.gradle: auto-provision the JDK 25 toolchain the build pins
- gradlew: restore the executable bit
Minecraft 26.2 moved constant holders out of the type classes:
  EntityType.X       -> EntityTypes.X       (158 constants)
  BlockEntityType.X  -> BlockEntityTypes.X

Both singular classes still exist and keep the generic machinery
(EntityType<T>, CODEC, STREAM_CODEC), so only constant accesses move.
Bukkit has its own org.bukkit.entity.EntityType with identical constant
names, so only fully-qualified Minecraft references were rewritten.

Entity classes also moved into deeper packages:
  monster.Slime/MagmaCube -> monster.cubemob.*
  world.entity.animal.Bucketable -> world.entity.Bucketable
  block.state.properties.DripstoneThickness -> SpeleothemThickness

MagmaCube no longer extends Slime; both now extend AbstractCubeMob,
which carries getSize/setSize. CraftSlime retargets onto AbstractCubeMob
so Bukkit's MagmaCube-extends-Slime hierarchy still holds.
Adventure 5:
- ClickEvent.Action is no longer an enum but a generic interface with
  singleton instances, so the dispatch switch becomes identity checks
  with an explicit throw on unknown actions.
- PlainComponentSerializer and MessageType were removed.
- BookMetaBuilder is gone; Adventure 5 introduces BookLike#asBook(),
  implemented on CraftMetaBook, CraftMetaBookSigned and the two
  Paper book-content records.
- NBTComponent lost a type parameter.
- LegacyHoverEventSerializer moved from ...serializer.gson to .json.

Minecraft 26.2 stripped all colour metadata from ChatFormatting
(getColor/isFormat/getByName are gone); it now carries only the
formatting code. Colour data lives on the new world.scores.TeamColor,
which PaperAdventure and CraftChatMessage now resolve through.
PlayerTeam#getColor/setColor use Optional<TeamColor>.
Paper 26.2 added abstract methods across the API. Two cascaded into
every concrete Craft* entity class: Entity#setRotation(Angle,Angle)
(relative-aware) and Entity#soundSource(), the latter because Paper's
Entity now extends Adventure's Sound.Source.Provider.

Paper also split UnsafeValues: the Adventure-facing accessors moved to
InternalAPIBridge. Those implementations still live on CraftMagicNumbers,
so PaperServerInternalAPIBridge delegates rather than duplicating them.

Implemented against real Minecraft state rather than stubbed:
- sound category/source, hurt sound, sound volume and voice pitch
- removal reason and remove-event cause
- CombatTracker#getLastDamageTime
- damage context retained on the builder and carried onto the source
- trim pattern/material via the existing Conversions builder path
- advancement loading delegating to Cardboard's existing loader
- CraftBed registered per bed Material, since 26.2 removed the bed
  BlockEntity and block.getState() would otherwise not cast to Bed

spawnCreaking, spreadResin and resetFlyingTicks are Paper server
patches with no vanilla equivalent; they now say so explicitly instead
of returning null.
Mixins that compile but fail at apply time against real 26.2 bytecode:
- SlimeMixin shadowed getSize(), which moved to AbstractCubeMob
- AbstractFurnaceMenuMixin injected into a constructor that lost its
  RecipeType parameter
- BoatDispenseItemBehaviorMixin: PostSpawnProcessor#accept -> #apply

Access widener (949 -> 956 entries):
- LivingEntity#blockedByItem gained a DamageSource/float signature
- BedBlockEntity was removed outright
- ChatFormatting#name is now #toString
- newly widened: LivingEntity#getSoundVolume/#getHurtSound,
  CreakingHeartBlockEntity#creakingInfo, CombatTracker#lastDamageTime

SULFUR_CUBE_CONTENT is a new 26.2 data component. Leaving it
unimplemented crashed Paper's DataComponentTypes static initialiser at
bootstrap, so PaperSulfurCubeContent implements it for real.

Client brand: Paper reads it from a patched connection field that does
not exist in vanilla. ServerCommonPacketListenerImplMixin_Brand captures
it from the vanilla minecraft:brand custom payload instead.
CraftServer#bukkitVersion and CardboardAbstractServer#API_VERSION still
advertised 26.1.2, which plugins read via Bukkit#getBukkitVersion for
compatibility checks. VersionUtil also gains a 26.2 entry so the version
is recognised as supported rather than unknown.

Verified in-game: /version now reports
  Cardboard version git-... (MC: 26.2) (Implementing API version 26.2)
PlayerListMixin_ChatEvent#broadcastChatMessage called getPlayer_0(sender)
unconditionally, which dereferences sender. Console and system broadcasts
have no sending player, so /say threw before reaching any recipient.

AsyncPlayerChatEvent requires a non-null player, so a null sender now
delivers the message directly to all recipients instead of fabricating a
player-chat event.

Pre-existing on ver/26.1; not introduced by the 26.2 port.
permissionMessage() returned the literal string "todo: permissionMessage",
which players saw whenever a command was denied. getPermissionMessage()
separately returned a hardcoded "No Permission".

Both now resolve settings.permissions-message from bukkit.yml, defaulting
to Bukkit's stock wording, and permissionMessage() renders it through the
legacy section serializer so colour codes work.

Pre-existing since the Paper API 1.19.2 update; not related to the 26.2 port.
CraftServer#dispatchCommand built the Brigadier source with
createCommandSourceStackForNameResolution, which exists to resolve names
and discards all command output. Commands run by a player still had their
side effects (/difficulty, /gamemode, /give worked) but any command whose
result is text produced nothing at all - /list, /help and /pl appeared
dead with no error and no log entry.

Players now get ServerPlayer#createCommandSourceStack, which routes
success and failure back to the sender. Non-player entities keep the
name-resolution source.

Also suppress repeated "Unknown target reason" warnings; the generic
Mob#setTarget path logged a full stack trace on every mob retarget.
26.2 introduces SulfurCube, a new cube mob. CraftEntityTypes had no
registration for it, so CraftEntity#getEntity hit its AssertionError and
took the server down whenever one was spawned, ticked or untracked -
emptying a sulfur cube bucket was enough.

Audited all 158 NMS EntityTypes constants against CraftEntityTypes:
SULFUR_CUBE was the only one missing.

Bukkit models it as AbstractCubeMob + Shearable + Bucketable + Ageable
(not a Slime, unlike MagmaCube), so CraftSulfurCube extends CraftAgeable
and implements each contract against real NMS calls. setFuse is private
in NMS and is now access-widened. canWander/setWander stay inert to match
the existing CraftSlime behaviour.

Verified: spawn, tick, kill and save with no AssertionError.
@icedmoca
icedmoca marked this pull request as draft August 7, 2026 17:46
POTENT_SULFUR is a new 26.2 block entity with no registration in
CraftBlockStates, so block.getState() on one fell through to the default
factory, which asserts the block entity is null. Same failure class as the
missing SulfurCube entity mapping.

Found by auditing all 49 NMS BlockEntityTypes constants against the
CraftBlockStates registrations; POTENT_SULFUR was the only gap.

org.bukkit.block.PotentSulfur adds no members beyond TileState, so
CraftPotentSulfur is a plain CraftBlockEntityState wrapper.

Verified: placing minecraft:potent_sulfur no longer errors.
Kyle Drake added 4 commits August 7, 2026 10:56
- add ver/26.2 to the version chart and demote 26.1 to low
- document building and the runtime layout
- summarise the 26.2 API changes this branch targets
- note the repository's derivation from CardboardPowered/cardboard
Replaces the bundled iCommon-Fabric-26.1.2.jar with a jar built from the
new iCommon-Fabric-26.2 module (minenite/iCommonLib).

The 26.1.2 jar did load on 26.2, but it was compiled against the old
Level#dimensionTypeRegistration() signature; on 26.2 that comparison
silently evaluated false, so end-dimension checks were wrong rather than
loudly broken. The 26.2 build fixes that and declares minecraft >=26.2.
processResources only expanded ${version} in fabric.mod.json when
BUILD_NUMBER was set, so every local build shipped the literal string
"${version}" and Fabric Loader warned that the version was unparseable
on each start. It now always expands, falling back to project.mod_version.

The Modrinth block also hardcoded "26.1-" for versionNumber, which would
have published 26.2 builds labelled 26.1; it now derives from
project.mod_version.

Also refreshes libs/iCommon-Fabric-26.2.jar with the matching semver fix.

Verified: boot log now reports "cardboard 26.2" and "icommon 0.0.0+26.2"
with no loader version warnings.
fabric.mod.json still declared minecraft >=26.1. This branch targets the
26.2 registry layout (EntityTypes/BlockEntityTypes) and Adventure 5, so it
cannot run on 26.1 - loading it there would fail confusingly rather than
being refused up front.
@pisaiah

pisaiah commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

Amazing work!

@pisaiah
pisaiah changed the base branch from ver/26.1 to ver/26.2 August 14, 2026 02:22
@icedmoca

Copy link
Copy Markdown
Author

Fyi, still a lot of stubs i need to address.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants