Quark Oddities

Quark Oddities

22M Downloads

Stained glass no longer correctly colors beacon beams

FritoKAL opened this issue ยท 1 comments

commented

Version Quark-r2.4-316.jar

Stained glass no longer correctly blends colors for beacon beams. Regardless of # of stained glass, the color the beam becomes is the same as 1 piece of stained glass. Colors also no longer blend, for example placing a red stained glass block on top of a blue stained glass block produces a red beam, not a purple beam.

commented

I was working on a PR for this but im having computer trouble. Its an easy fix.

The problem is here:

float[] mixedColor = new float[]{(currColor[0] + targetColor[0]) / 2.0F, (currColor[1] + targetColor[1]) / 2.0F, (currColor[2] + targetColor[2]) / 2.0F};
if(!setColor) {
mixedColor = targetColor;
setColor = true;
}
currColor = mixedColor;
currSegment = new ExtendedBeamSegment(currSegment.dir, currPos.subtract(beaconPos), mixedColor);

This code is not ran in a loop so setColor is always false. the game does compute the correctly blended color but always overwrites it before using it.

setColor (and check) are unused and can be removed in a PR.

The remaining difference between quark and vanilla beacon rendering is that Quark's beams render 0.5 blocks higher, so the color changes in the middle of the glass block. This is a lot harder to fix lol