Starchasers / OCGlasses

mod for minecraft and addon for Open Computers
zlib License
31 stars 17 forks source link

crash when trying to animate color changing #97

Closed CreativeeBlackWolf closed 2 years ago

CreativeeBlackWolf commented 3 years ago

Describe the bug Game crush while easing animation for text.

In which environment did the Bug appear? Singleplayer (LAN Game)

To Reproduce With glasses on, try to setEasing() for any color from 0.8 to 1, for example.

Expected behavior Text color changed successfully.

Screenshots / Code Snippet

component = require "component"
glasses = component.glasses
local text = glasses.addText2D()
text.addScale(2, 2, 1)
text.setText("go away bugs!")
color = text.addColor(0, 1, 0, 0)

text.setEasing(color, "LINEAR", "IN", 1000, "green", 1, 0.8, "default") -- crash here

Minecraft: OpenGlasses-MC1.12.2-2.2-53 Minecraft 1.12.2 Forge 14.23.5.2854

crash-2020-12-23_22.33.54-client.txt

ben-mkiv commented 3 years ago

here's a commons version which avoids the crash (unzip it before you place it in your mods directory. It will showup as renderToolkit if you use a mod manager like MultiMC)

Commons0815-1.12.2-1.3.9.jar.zip

However im quite not sure if its possible to have the start value larger than the min value, at least for me when doing quick tests the result wasn't what i would expect from that ;)

i'll leave this bug open until i uploaded a official update to curseForge

ben-mkiv commented 2 years ago

forgot to close this, 1.4.0 is on CF for a while now...