Starchasers / OCGlasses

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

[Bug] Auto Translate needs 3 arguments to update #99

Open djpadbit opened 3 years ago

djpadbit commented 3 years ago

Describe the bug When updating the Auto Translate modifier, it needs 3 arguments despite it only using 2. I think it's just a copy and paste leftover here : https://github.com/Starchasers/OCGlasses/blob/e6c50935bc6de1184cb7806a81a70d502cb69e3c/src/main/java/com/bymarcin/openglasses/lua/luafunction/modifiers/ModifierAutoTranslate.java#L26-L29

In which environment did the Bug appear? Singleplayer, Forge server

To Reproduce Steps to reproduce the behavior:

  1. In the lua interpreter, type in the code snippet below

Expected behavior It should update the modifier with 2 arguments.

Screenshots / Code Snippet

g = component.glasses
g.removeAll()
t = g.addText2D()
t.addAutoTranslation(10,10)
t.updateModifier(1,20,20) -- This works
m = t.modifiers()[1]
m.set(20,20) -- This should work but doesn't
m.set(20,20,0) -- This does work

Minecraft:

Additional context

ben-mkiv commented 3 years ago

Thank you, indeed some copypasta issue here...

I'll leave the bug open until i published a official version on CurseForge