This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
Kashin's profile picture

[MC 1.6.4] [CC 1.58] Item Scanner (Find IDs, Meta and more - Build advanced sorting)

Started by Kashin, 07 February 2014 - 02:12 PM
Kashin #1
Posted 07 February 2014 - 03:12 PM
Hi all! B)/>

Welcome to my very first mod / peripheral - The Item Scanner.

Item scanner is a peripheral that allows you to retrieve information about whatever blocks/items you place in the scanners inventory.

Download: https://www.dropbox....mScanner1.0.zip

Item Scanner


The item scanner can retrieve ID and name of whatever is in it's inventory,it is unable to know the difference between meta items, and as such will always return the main block it recognises. Example: trying to scan "Red Wool" will read as ID: 35 and name: "Wool".

The Item Scanner enables the following calls:
  • getId()
  • getName()
  • getAll()
The Item Scanner will also throw an event when an item enters it inventory; 'itemscanner_scan', having ID and Name as parameters. When it's inventory is emptied, it will throw the event 'itemscanner_empty'.

Recipe
SpoilerNote: default recipe is hardmode!

Easy-mode recipe:


Hard-mode recipe:

But wait! There's more!

Advanced Item Scanner


The Advanced Item Scanner is able to retrieve the following:
  • ID
  • Meta ID
  • MaxDamage (being as many uses a tool can survive)
  • Name
The Advanced Item Scanner enables the following calls:
  • getId()
  • getMeta()
  • getMaxDamage()
  • getName()
  • getAll()
Like the normal scanner, the advanced scanner fires two events, the 'itemscanner_empty' is still without parameters, but 'itemscanner_scan' now has a few more parameters:
  • ID
  • Meta
  • MaxDamage
  • Name
Recipe
SpoilerAdvanced Item Scanner

Known bugs
SpoilerOn multiplayer servers, blocks and items from mods will return unLocalized names. Fx. the Item Scanner will return "tile.itemScanner.name".
I've been unable to figure out a solution to this problem yet, as I fear it's due to the server not holding the Localized names and only the client, if you have any information or suggestions towards this, please let me know!

I'll try and get and get and example video up if people request it.

Any feedback is greatly appreciated

Please let me know of bugs/suggestions - I would love to see what you're building and using these for if you decide to do so!
Edited on 11 February 2014 - 03:41 PM
awsmazinggenius #2
Posted 07 February 2014 - 03:41 PM
Nice mod, though the peripherals are a bit expensive. Also, you might want to note in your thread the license - basically how people can use and redistribute the code. I mention this mainly for the purpose of people wanting to include this in their modpacks.
Kashin #3
Posted 07 February 2014 - 03:53 PM
Nice mod, though the peripherals are a bit expensive. Also, you might want to note in your thread the license - basically how people can use and redistribute the code. I mention this mainly for the purpose of people wanting to include this in their modpacks.

I'm open to reworking the recipes, though I feel they need to be semi expensive considering the options these peripherals enable. Regarding the license, I'll have to look into that in a few :P/>
awsmazinggenius #4
Posted 07 February 2014 - 04:17 PM
There is the MIT license, which permits almost anything with credit provided, the GPL, saying that if you use it it has to be free software, and others. http://choosealicense.org/
nexfwall #5
Posted 21 February 2014 - 05:21 AM
Can i add this as an upgrade to my turtle, and use it as an inbuild peripheral to determine ID's of items in turtle's inventory?
Kashin #6
Posted 21 February 2014 - 06:28 PM
Can i add this as an upgrade to my turtle, and use it as an inbuild peripheral to determine ID's of items in turtle's inventory?

That's currently not supported, since that would be incredibly overpowered, in my oppinion. Might add it later with the ability to be toggled in the config.

Is this something there's a general wish for?
gollark8 #7
Posted 22 February 2014 - 02:30 AM
Can i add this as an upgrade to my turtle, and use it as an inbuild peripheral to determine ID's of items in turtle's inventory?

That's currently not supported, since that would be incredibly overpowered, in my oppinion. Might add it later with the ability to be toggled in the config.

Is this something there's a general wish for?
I'd like that as an optional feature.
Kashin #8
Posted 23 February 2014 - 11:47 AM
I'll see what I can do when I have some spare time :)/>