CodeChickenCore

CodeChickenCore

31M Downloads

ColourMultiplier setting hasColour flag even if colour is -1

MrTJP opened this issue ยท 3 comments

commented

https://github.com/Chicken-Bones/CodeChickenLib/blob/master/src/codechicken/lib/render/ColourMultiplier.java#L24

If the Colour Multiplier is -1, it sets the colour as -1, but using that method also sets the hasColour flag in the render state. If load() is returning false, shouldn't it not do anything to the render state?

commented

yes, you are correct, test it out for side-effects and submit a PR?

commented

Sure, give me a few days..

commented

The contract isn't necessarily that if load returns false the render state must not be altered, but that the render state be configured in such a way that the operation is now redundant. I think that was my initial intention when writing this, however it shouldn't actually do anything (unless you have useColour set to false, and still have a ColourMultiplier in the pipeline).

Continue discussion on pull request