port(26.2): mechanical API updates (part 2)#145
Open
I-No-oNe wants to merge 2 commits into
Open
Conversation
…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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Type of change
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— addedmissing imports (
EntityTypes,VectorParser); the symbols still exist in 26.2,they just weren't imported.
MixinEntityType—registernow takesResourceKeyinstead of aStringid; derive the vanilla path via
key.identifier().getPath().MixinLightmap—CommandEncoder.clearColorTexturenow takes aVector4fcinstead of an
intARGB; passnew Vector4f(1, 1, 1, 1).RenderPipelines—RenderPipeline.Builder.withVertexFormat(fmt, Mode)wassplit into
withVertexBinding(0, fmt)+withPrimitiveTopology(PrimitiveTopology.*)(
VertexFormat.Mode→com.mojang.blaze3d.PrimitiveTopology).Not done yet — immediate-mode render rewrite:
RenderUtils.getBuffer/drawBuffer,RenderUtils3d,ElytraShadow.26.2 removed
TesselatorandRenderType.draw(MeshData). The self-managedbegin → build → draw path no longer exists; the replacement is
PreparedRenderType.drawFromBuffer(...)over aRenderPipeline+ GPU buffers,or drawing through a
MultiBufferSourceVertexConsumer. This is anarchitectural 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:
MixinEntityTypeandMixinLightmapcompile, buttheir injections resolve at runtime — needs an in-game smoke test.
Related issues
Follow-up to the
26.2 port part 1work already onmain.Checklist: