Skip to content

port(26.2): mechanical API updates (part 2)#145

Open
I-No-oNe wants to merge 2 commits into
clickcrystals-development:mainfrom
I-No-oNe:port/26.2
Open

port(26.2): mechanical API updates (part 2)#145
I-No-oNe wants to merge 2 commits into
clickcrystals-development:mainfrom
I-No-oNe:port/26.2

Conversation

@I-No-oNe

Copy link
Copy Markdown
Contributor

Type of change

  • Bug fix (build fix — port 26.1 → 26.2)
  • New feature

Description

Ports the codebase from MC 26.1 to 26.2 following the NeoForge 26.2 primer. This
covers the mechanical/one-to-one API breakages; the immediate-mode render helper
rewrite is still outstanding (see below).

Done (compiles clean):

  • DeathEffects, ConditionalBlockInFov, ConditionalBlockInRange — added
    missing imports (EntityTypes, VectorParser); the symbols still exist in 26.2,
    they just weren't imported.
  • MixinEntityTyperegister now takes ResourceKey instead of a String
    id; derive the vanilla path via key.identifier().getPath().
  • MixinLightmapCommandEncoder.clearColorTexture now takes a Vector4fc
    instead of an int ARGB; pass new Vector4f(1, 1, 1, 1).
  • RenderPipelinesRenderPipeline.Builder.withVertexFormat(fmt, Mode) was
    split into withVertexBinding(0, fmt) + withPrimitiveTopology(PrimitiveTopology.*)
    (VertexFormat.Modecom.mojang.blaze3d.PrimitiveTopology).

Not done yet — immediate-mode render rewrite:

  • RenderUtils.getBuffer / drawBuffer, RenderUtils3d, ElytraShadow.
    26.2 removed Tesselator and RenderType.draw(MeshData). The self-managed
    begin → build → draw path no longer exists; the replacement is
    PreparedRenderType.drawFromBuffer(...) over a RenderPipeline + GPU buffers,
    or drawing through a MultiBufferSource VertexConsumer. This is an
    architectural change whose visual output can only be verified against a running
    client, so it is intentionally left for a follow-up rather than shipped blind.

Two runtime-only caveats: MixinEntityType and MixinLightmap compile, but
their injections resolve at runtime — needs an in-game smoke test.

Related issues

Follow-up to the 26.2 port part 1 work already on main.

Checklist:

  • My code follows the style guidelines of ItziSpyder(ImproperIssues).
  • I have added comments to my code in more complex areas.
  • I have tested the code in both development and production environments. (fixed files compile; full build still blocked on the render-helper rewrite above; mixin injections need an in-game check)
  • I have joined the ClickCrystals Discord.

I-No-oNe added 2 commits July 14, 2026 21:21
…PrimitiveTopology, Vector4f)

- EntityTypes/VectorParser: add missing imports (symbols still exist in 26.2)
- MixinEntityType: register() now takes ResourceKey; derive id via key.identifier().getPath()
- MixinLightmap: clearColorTexture takes Vector4fc, pass new Vector4f(1,1,1,1)
- RenderPipelines: withVertexFormat(fmt, Mode) split into withVertexBinding(0, fmt) + withPrimitiveTopology(PrimitiveTopology.*)

Remaining: RenderUtils/RenderUtils3d/ElytraShadow immediate-mode draw
(Tesselator + RenderType.draw removed) — needs StagedVertexBuffer rewrite,
verifiable only against a running client.
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.

1 participant