Jump to content


Whitecatblack's Content

There have been 3 items by Whitecatblack (Search limited from 10-February 22)


By content type

See this member's

Sort by                Order  

#250255 [OpenPeripherals] Terminal Glasses addIcon Question

Posted by Whitecatblack on 14 April 2016 - 10:56 PM in Ask a Pro

View PostStekeblad, on 14 April 2016 - 06:40 AM, said:

Close all GUIs and press F3+ H and then open your inventory, if you hover over an item it will now have some more information in the tool tip. It is safe to press F3 to hide the coordinates and stuff without the extra information disappearing. To remove it, press F3 + H again.

Thanks Stekeblad, exactly what I was looking for.



#250187 [OpenPeripherals] Terminal Glasses addIcon Question

Posted by Whitecatblack on 14 April 2016 - 05:24 AM in Ask a Pro

View PostBomb Bloke, on 14 April 2016 - 02:12 AM, said:

The only mod I'm aware of that helps with this is an older version of MoarPeripherals, which offered an Item Dictionary block for exactly this sort of thing ... though I'm not sure the Dictionary ever worked under the latter...

Yeah it seems to be broken for me. Do you have any advice on something else to figure out the string ids? I figured out a way to configure WAILA to show both the string id and number id, but that doesn't really help for items that you can't place or items that you don't have nearby...



#250166 [OpenPeripherals] Terminal Glasses addIcon Question

Posted by Whitecatblack on 14 April 2016 - 01:43 AM in Ask a Pro

So I've been fooling around with the terminal glasses, specifically the addIcon method. The method itself requires an x position and a y position where the icon will be placed on the screen, a string of the item id to be placed on the screen, and an optional metadata {addIcon(x, y, id, metadata)}.

So, I know the id parameter requires a string, but I've seen some older code around that would call addIcon with a number id instead of a string (ie. 1 instead of "minecraft:stone"). I'm assuming this was just before minecraft changed its naming system, yet I can still call addIcon with a number id, kinda.

If I do some code like this:
glass = peripheral.wrap("right") --to a terminal bridge
icon = glass.addIcon(15, 15, 1)
glass.sync()

the code won't throw an error. But it also won't show any icons on the screen. It will, however, still create the object, because I can still change it and create a visible icon:
icon.setItemId("minecraft:diamond")
glass.sync()
This changes the icon to a diamond and it will now show up on my screen in the expected place.

So my question is this: why is the icon object still created with the number id? Also, is there a way I can use the method with a number id, considering that even the vanilla /give command can use both item id strings and item id numbers? And finally, is there an easy way to see the different item id strings in game (through nei or something else)? Because, although it's easy enough to remember the vanilla items, I don't really have much hope knowing mod item string ids.

Thanks,
Whitecatblack