Skip to content

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

Description

@djpadbit

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 :

@Callback(doc = "function(Double:x, Double:y, Double:z):boolean -- sets new values", direct = true)
public Object[] set(Context context, Arguments args){
if(!args.isDouble(0) || !args.isDouble(1) || !args.isDouble(2))
return new Object[]{ false, "3 values(Double) required! x,y,z" };

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:

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

Additional context

  • OpenComputers Version: 1.7.5.192

Metadata

Metadata

Assignees

No one assigned

    Labels

    fixed in devbugs that got fixed, but aren't in a public (curseforge) release yet

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions