Skip to content

Fixed ambience lightning using the segment index as an x coordinate - #6633

Open
dekrom wants to merge 1 commit into
MeteorDevelopment:masterfrom
dekrom:fix/lightning-colour-vertices
Open

Fixed ambience lightning using the segment index as an x coordinate#6633
dekrom wants to merge 1 commit into
MeteorDevelopment:masterfrom
dekrom:fix/lightning-colour-vertices

Conversation

@dekrom

@dekrom dekrom commented Aug 30, 2026

Copy link
Copy Markdown

Type of change

  • Bug fix
  • New feature

Description

The recoloured lightning quad in LightningBoltRendererMixin uses h where the x offset
belongs:

buffer.addVertex(pose, h + (px1 ? rr1 : -rr1), (float) ((h + 1) * 16), zo1 + (pz1 ? rr1 : -rr1))

h is the segment index, it is already being used for the y coordinate as h * 16. The top two
vertices take zo1 for z, so they should take xo1 for x, and xo1 is otherwise never read in
the method. The top of every segment ends up pinned near x = 0..7 instead of following the bolt,
so with Ambience's lightning colour on the bolts are visibly skewed compared to vanilla ones.

Related issues

None that I found.

How Has This Been Tested?

Not compared side by side in game yet. xo1 being unused while h appears in an x slot is
clear enough from the method on its own. Builds clean against current master.

Checklist:

  • My code follows the style guidelines of this project.
  • I have added comments to my code in more complex areas.
  • I have tested the code in both development and production environments.

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.

3 participants