OpenMods / OpenPeripheral-Addons

An addon for OpenPeripheral, adding physical blocks and items to the game
MIT License
11 stars 10 forks source link

Item icons makes everything gray #74

Closed applejag closed 8 years ago

applejag commented 8 years ago

I encountered a very confusing and odd bug with the terminal glasses...

If you add an icon, and that icon renders as a 2D image (ex: flower, clock, even torch and fire) then all objects added after that icon stop functioning to a certain degree.

Everything I've noticed:

And by "stops working" I mean they don't behave as they should. Color shows as #666666 (took a screenshot and looked at the color value) and alpha/opacity shows as 1.

What I mean by that is that it renders as #666666 and alpha 1, but if I were to do obj.getOpacity() on a bugged object I would not get 1 but instead the value I specified (as it should).

So it seems like it's a rendering bug of some sort, but it only happens to the objects created after an item... Peak at the following example:

local b = peripheral.wrap("top")
b.clear()

-- create normal box
local b1 = b.addBox(20,20,40,20,0xFF0000,0.5)

-- create an item
local i1 = b.addIcon(20,40,"minecraft:feather")

-- create a new box, but this one will be bugged
local b2 = b.addBox(20,60,40,20,0xFF0000,0.5)

b.sync()

-- wait for command
os.pullEvent("glasses_chat_command")

-- remove item
i1.delete()
b.sync()

When runned it looks like so image Then if I enter a command ($$) it then looks like so, notice how the second box now looks as it should. image

applejag commented 8 years ago

Temporary workaround is to always add the icons last, and if there already are icons there then remove them, add everything else I want, then re-add them

applejag commented 8 years ago

Closed???

applejag commented 8 years ago

Oh didnt see the reference to the fix. Nvm me. When will this fix be available (what version?)

boq commented 8 years ago

No idea, I'm terrible with estimates. But if you are in hurry, there are always snapshots.