Difference between revisions of "OpenCCSensors"
(Created the page + some basic info + some sensordata + some examples (for Mikee)) |
Magiczocker (Talk | contribs) |
||
(49 intermediate revisions by 4 users not shown) | |||
Line 1: | Line 1: | ||
− | |||
[http://www.computercraft.info/forums2/index.php?/topic/5996-144-cc-147-openccsensors/ OpenCCSensors] is a new, open-source, up to date replacement for [[CcSensors|CcSensors (outdated)]], allowing monitoring and gathering information from the Minecraft environment - including players, entities, proximity, world info, IndustrialCraft 2, BuildCraft 2, liquids, inventories - and more! | [http://www.computercraft.info/forums2/index.php?/topic/5996-144-cc-147-openccsensors/ OpenCCSensors] is a new, open-source, up to date replacement for [[CcSensors|CcSensors (outdated)]], allowing monitoring and gathering information from the Minecraft environment - including players, entities, proximity, world info, IndustrialCraft 2, BuildCraft 2, liquids, inventories - and more! | ||
+ | |||
+ | |||
+ | OpenCCSensors comes with its own API, and automatically installs a new program for you at /ocs/programs/sensorview. sensorview is a handy program for very quickly looking at the information gathered from your sensors. | ||
+ | |||
+ | |||
+ | Forum thread and download: [http://www.computercraft.info/forums2/index.php?/topic/5996-144-cc-147-openccsensors/ OpenCCSensors] | ||
+ | |||
+ | http://www.youtube.com/watch?v=i8Bv7uKkIOM&feature=youtu.be | ||
<table style="width: 100%; border: solid 1px black; margin: 2px; border-spacing: 0px;"> | <table style="width: 100%; border: solid 1px black; margin: 2px; border-spacing: 0px;"> | ||
<tr><td colspan="2" style="font-weight: bold; font-size: large; padding-bottom: .3em; border-bottom: solid #C9C9C9 1px; background: #D3FFC2; line-height:28px;"> | <tr><td colspan="2" style="font-weight: bold; font-size: large; padding-bottom: .3em; border-bottom: solid #C9C9C9 1px; background: #D3FFC2; line-height:28px;"> | ||
[[File:Grid_disk.png|24px]] | [[File:Grid_disk.png|24px]] | ||
− | OpenCCSensors | + | OpenCCSensors Peripherals |
</td></tr> | </td></tr> | ||
− | <tr><td style="width: 350px; background: #E0E0E0; padding: .4em; font-weight:bold;"> | + | <tr><td style="width: 350px; background: #E0E0E0; padding: .4em; font-weight:bold;">Name</td><td style="background: #E0E0E0; padding: .4em; font-weight:bold;">Description</td></tr> |
− | <tr style="background-color: #FFFFFF;"><td style="border-top: solid #C9C9C9 1px; padding: .4em;"> | + | <tr style="background-color: #FFFFFF;"><td style="border-top: solid #C9C9C9 1px; padding: .4em;">Sensor Peripheral</td> |
− | <td style="border-top: solid #C9C9C9 1px; padding: .4em;" | + | <td style="border-top: solid #C9C9C9 1px; padding: .4em;"> |
− | + | The Sensor Peripheral needs to be placed next to a computer and it has a single slot to insert a Sensor Card | |
− | + | ||
− | <tr style="background-color: #FFFFFF;"><td style="border-top: solid #C9C9C9 1px; padding: .4em;">mySensor.getTargetDetails(key)</td> | + | {{Crafting |
− | <td style="border-top: solid #C9C9C9 1px; padding: .4em;">Returns a table of full details for that particular target from the sensor mySensor - where the the "key" is the key returned from getTargets()</td></tr> | + | |A1=Obsidian |B1=Obsidian |C1=Obsidian |
+ | |A2=Redstone |B2=Obsidian |C2=Redstone | ||
+ | |A3=Stone |B3=Stone |C3=Stone | ||
+ | |Output=Sensor Peripheral | ||
+ | |Output-link=OpenCCSensors | ||
+ | }} | ||
+ | <table style="width: 100%; border-spacing: 0px;"> | ||
+ | |||
+ | <tr style="background-color: #E8E8E8;"><td style="border-top: solid #C9C9C9 1px; padding: .4em;">os.loadAPI("ocs/apis/sensor")</td> | ||
+ | <td style="border-top: solid #C9C9C9 1px; padding: .4em;">Load the sensor API</td></tr> | ||
+ | |||
+ | <tr style="background-color: #FFFFFF;"><td style="border-top: solid #C9C9C9 1px; padding: .4em;">mySensor = sensor.wrap(side)</td> | ||
+ | <td style="border-top: solid #C9C9C9 1px; padding: .4em;">Returns the wrapped sensor on the side specified.</td></tr> | ||
+ | |||
+ | <tr style="background-color: #E8E8E8;"><td style="border-top: solid #C9C9C9 1px; padding: .4em;">mySensor.getTargets()</td> | ||
+ | <td style="border-top: solid #C9C9C9 1px; padding: .4em;">Returns a a table of all the targets for mySensor, where the keys are usually strings (either an entity name or a relative coordinate for blocks), and the values are each a table of basic details.</td></tr> | ||
+ | |||
+ | |||
+ | <tr style="background-color: #FFFFFF;"><td style="border-top: solid #C9C9C9 1px; padding: .4em;">mySensor.getTargetDetails(key)</td> | ||
+ | <td style="border-top: solid #C9C9C9 1px; padding: .4em;">Returns a table of full details for that particular target from the sensor mySensor - where the the "key" is the key returned from getTargets()</td></tr> | ||
+ | |||
+ | </table> | ||
+ | </td></tr> | ||
+ | |||
+ | <tr style="background-color: #FFFFFF;"><td style="border-top: solid #C9C9C9 1px; padding: .4em;">Gauge Peripheral</td> | ||
+ | <td style="border-top: solid #C9C9C9 1px; padding: .4em;"> | ||
+ | |||
+ | The Gauge Peripheral can be placed onto the side of certain machines to get instant readings from them. Right now this only supports Batboxes, MFE's, MFSU, Mass fabricators and Nuclear reactors. We hope to expand this in the future as well as offer an API to re-program the gauge from a computer. | ||
+ | |||
+ | {{Crafting | ||
+ | |A1=glass_pane |B1=Redstone |C1=Monitor | ||
+ | |Output=Gauge Peripheral | ||
+ | |Output-link=OpenCCSensors | ||
+ | }} | ||
+ | |||
+ | |||
+ | </td></tr> | ||
</table> | </table> | ||
Line 24: | Line 66: | ||
<tr><td colspan="2" style="font-weight: bold; font-size: large; padding-bottom: .3em; border-bottom: solid #C9C9C9 1px; background: #D3FFC2; line-height:28px;"> | <tr><td colspan="2" style="font-weight: bold; font-size: large; padding-bottom: .3em; border-bottom: solid #C9C9C9 1px; background: #D3FFC2; line-height:28px;"> | ||
[[File:Grid_disk.png|24px]] | [[File:Grid_disk.png|24px]] | ||
− | OpenCCSensors | + | OpenCCSensors Blocks |
</td></tr> | </td></tr> | ||
<tr><td style="width: 350px; background: #E0E0E0; padding: .4em; font-weight:bold;">Name</td><td style="background: #E0E0E0; padding: .4em; font-weight:bold;">Description</td></tr> | <tr><td style="width: 350px; background: #E0E0E0; padding: .4em; font-weight:bold;">Name</td><td style="background: #E0E0E0; padding: .4em; font-weight:bold;">Description</td></tr> | ||
− | <tr style="background-color: #FFFFFF;"><td style="border-top: solid #C9C9C9 1px; padding: .4em;"> | + | <tr style="background-color: #FFFFFF;"><td style="border-top: solid #C9C9C9 1px; padding: .4em;">Proximity Sensor Block</td> |
− | <td style="border-top: solid #C9C9C9 1px; padding: .4em;" | + | <td style="border-top: solid #C9C9C9 1px; padding: .4em;"> |
− | + | This block outputs a redstone signal if players/mobs are within 16 blocks. The strength of the signal depends on how close the entity is to the block. | |
− | + | ||
− | + | This block has 3 different modes: "Any Living Entity", "Any Player" or "Owner Only". To switch between modes, the owner of the block must right click on the block. | |
− | + | ||
− | + | {{Crafting | |
− | <td style="border- | + | |A2=Comparator |B2=Proximity Sensor Card MKIV |C2=Comparator |
+ | |A3=Redstone |B3=Block of Iron |C3=Redstone | ||
+ | |Output=Proximity Sensor Block | ||
+ | |Output-link=OpenCCSensors | ||
+ | |B2-link=OpenCCSensors | ||
+ | }} | ||
+ | </td></tr> | ||
+ | </table> | ||
+ | <br /> | ||
+ | <table style="width: 100%; border: solid 1px black; margin: 2px; border-spacing: 0px;"> | ||
+ | <tr><td colspan="2" style="font-weight: bold; font-size: large; padding-bottom: .3em; border-bottom: solid #C9C9C9 1px; background: #D3FFC2; line-height:28px;"> | ||
+ | [[File:Grid_disk.png|24px]] | ||
+ | OpenCCSensors Sensor Cards | ||
+ | </td></tr> | ||
− | <tr | + | <tr><td style="width: 350px; background: #E0E0E0; padding: .4em; font-weight:bold;">Name</td><td style="background: #E0E0E0; padding: .4em; font-weight:bold;">Description</td></tr> |
− | <td style=" | + | |
− | <tr style="background-color: # | + | <tr style="background-color: #FFFFFF;"><td style="border-top: solid #C9C9C9 1px; padding: .4em;">Inventory Sensor Card</td> |
− | <td style="border-top: solid #C9C9C9 1px; padding: .4em;">The | + | <td style="border-top: solid #C9C9C9 1px; padding: .4em;">The Inventory Sensor Card is capable of reading inventories of any chests or machines around the sensor. It gives full information about what item is in each slot. |
− | <tr style="background-color: #FFFFFF;"><td style="border-top: solid #C9C9C9 1px; padding: .4em;">Dropped Item | + | {{Crafting |
− | <td style="border-top: solid #C9C9C9 1px; padding: .4em;">The Dropped Item | + | |A1=Redstone |B1=chest |C1=Redstone |
+ | |A2=Redstone |B2=Redstone |C2=Redstone | ||
+ | |A3=paper |B3=paper |C3=paper | ||
+ | |Output=Inventory Sensor Card | ||
+ | |Output-link=OpenCCSensors | ||
+ | }} | ||
+ | </td></tr> | ||
+ | |||
+ | <tr style="background-color: #E8E8E8;"><td style="border-top: solid #C9C9C9 1px; padding: .4em;">Proximity Sensor Card</td> | ||
+ | <td style="border-top: solid #C9C9C9 1px; padding: .4em;">The Proximity Sensor Card is capable of detecting players and entities within it's range. | ||
+ | |||
+ | {{Crafting | ||
+ | |A1=Redstone |B1=pressure_plate |C1=Redstone | ||
+ | |A2=Redstone |B2=Redstone |C2=Redstone | ||
+ | |A3=paper |B3=paper |C3=paper | ||
+ | |Output=Proximity Sensor Card | ||
+ | |Output-link=OpenCCSensors | ||
+ | }} | ||
+ | </td></tr> | ||
+ | |||
+ | |||
+ | |||
+ | <tr style="background-color: #FFFFFF;"><td style="border-top: solid #C9C9C9 1px; padding: .4em;">Machine Sensor Card</td> | ||
+ | <td style="border-top: solid #C9C9C9 1px; padding: .4em;">The Machine Sensor Card can read information from IC2 devices. | ||
+ | |||
+ | {{Crafting | ||
+ | |A1=Redstone |B1=Redstone |C1=Redstone | ||
+ | |A2=Redstone |B2=Redstone |C2=Redstone | ||
+ | |A3=paper |B3=paper |C3=paper | ||
+ | |Output=Buildcraft Sensor Card | ||
+ | |Output-link=OpenCCSensors | ||
+ | }} | ||
+ | </td></tr> | ||
+ | |||
+ | <tr style="background-color: #E8E8E8;"><td style="border-top: solid #C9C9C9 1px; padding: .4em;">Power Sensor Card</td> | ||
+ | <td style="border-top: solid #C9C9C9 1px; padding: .4em;">The Power Sensor Card can read power information from IC2 and Applied Energistics devices. | ||
+ | |||
+ | {{Crafting | ||
+ | |A1=Redstone |B1=Coal |C1=Redstone | ||
+ | |A2=Redstone |B2=Redstone |C2=Redstone | ||
+ | |A3=paper |B3=paper |C3=paper | ||
+ | |Output=Power Sensor Card | ||
+ | |Output-link=OpenCCSensors | ||
+ | }} | ||
+ | </td></tr> | ||
+ | |||
+ | <tr style="background-color: #FFFFFF;"><td style="border-top: solid #C9C9C9 1px; padding: .4em;">Tank Sensor Card</td> | ||
+ | <td style="border-top: solid #C9C9C9 1px; padding: .4em;">The Tank sensor card is far more powerful than it first seems. This card not only reads actual tanks, but reads internal tanks within a variety of different machines, such as: | ||
+ | |||
+ | Railcraft: Iron Tanks, Buildcraft: Tanks, Thermal Expansion: Aqueous Accumulator, Thermal Expansion: Igneous Extruder, Thermal Expansion: Glacial Precipitator, Thermal Expansion: Liquid Transposer, Thermal Expansion: Magma Crucible, Thermal Expansion: Magmatic Engine, Thermal Expansion: Steam Engine, Industrial Craft: Geothermal Generator, Thaumcraft: Crucible, Buildcraft: Tank, Buildcraft: Combustion Engine, Buildcraft: Pump, Buildcraft: Refinery, Forestry: Biogas Engine, Forestry: Fermenter, Forestry: Still, Forestry: Bottler, Forestry: Raintank, Forestry: Bio Generator, Forestry: Carpenter, Forestry: Moistener, Forestry: Squeezer, Forestry: Thermonic Fabricator, Extra Bees: Analyser, Extra Bees: Purifier, Extra Bees: Synthesizer, Extra Bees: Genepool, Extra Bees: Splicer, Railcraft: Hobbyist's Steam Engine, Railcraft: Commercial Steam Engine, Railcraft: Industrial Steam Engine, GregTech: Quantum Tank, GregTech: Thermal Generator | ||
+ | |||
+ | {{Crafting | ||
+ | |A1=Redstone |B1=Bucket |C1=Redstone | ||
+ | |A2=Redstone |B2=Redstone |C2=Redstone | ||
+ | |A3=paper |B3=paper |C3=paper | ||
+ | |Output=Liquid Sensor Card | ||
+ | |Output-link=OpenCCSensors | ||
+ | }} | ||
+ | </td></tr> | ||
+ | |||
+ | <tr style="background-color: #E8E8E8;"><td style="border-top: solid #C9C9C9 1px; padding: .4em;">World Sensor Card</td> | ||
+ | <td style="border-top: solid #C9C9C9 1px; padding: .4em;">The World Sensor Card is able to tell the time, weather, and more about the world. | ||
+ | |||
+ | {{Crafting | ||
+ | |A1=Redstone |B1=ender_pearl |C1=Redstone | ||
+ | |A2=Redstone |B2=Redstone |C2=Redstone | ||
+ | |A3=paper |B3=paper |C3=paper | ||
+ | |Output=World Sensor Card | ||
+ | |Output-link=OpenCCSensors | ||
+ | }} | ||
+ | </td></tr> | ||
+ | |||
+ | <tr style="background-color: #FFFFFF;"><td style="border-top: solid #C9C9C9 1px; padding: .4em;">Dropped Item Sensor Card</td> | ||
+ | <td style="border-top: solid #C9C9C9 1px; padding: .4em;">The Dropped Item Sensor Card is able to locate and identify dropped items. | ||
+ | |||
+ | {{Crafting | ||
+ | |A1=Redstone |B1=slime_ball |C1=Redstone | ||
+ | |A2=Redstone |B2=Redstone |C2=Redstone | ||
+ | |A3=paper |B3=paper |C3=paper | ||
+ | |Output=Dropped Item Sensor Card | ||
+ | |Output-link=OpenCCSensors | ||
+ | }} | ||
+ | </td></tr> | ||
+ | |||
+ | <tr style="background-color: #E8E8E8;"><td style="border-top: solid #C9C9C9 1px; padding: .4em;">Sign Sensor Card</td> | ||
+ | <td style="border-top: solid #C9C9C9 1px; padding: .4em;">The Sign Sensor Card is capable of reading signs within it's range. | ||
+ | |||
+ | {{Crafting | ||
+ | |A1=Redstone |B1=sign|C1=Redstone | ||
+ | |A2=Redstone |B2=Redstone |C2=Redstone | ||
+ | |A3=paper |B3=paper |C3=paper | ||
+ | |Output=Sign Sensor Card | ||
+ | |Output-link=OpenCCSensors | ||
+ | }} | ||
+ | </td></tr> | ||
+ | |||
+ | <tr style="background-color: #FFFFFF;"><td style="border-top: solid #C9C9C9 1px; padding: .4em;">Minecart Sensor Card</td> | ||
+ | <td style="border-top: solid #C9C9C9 1px; padding: .4em;">The Minecart Sensor Card can detect minecarts in the area and give basic information about them | ||
+ | |||
+ | {{Crafting | ||
+ | |A1=Redstone |B1=Minecart|C1=Redstone | ||
+ | |A2=Redstone |B2=Redstone |C2=Redstone | ||
+ | |A3=paper |B3=paper |C3=paper | ||
+ | |Output=Minecart Sensor Card | ||
+ | |Output-link=OpenCCSensors | ||
+ | }} | ||
+ | </td></tr> | ||
+ | |||
+ | <tr style="background-color: #E8E8E8;"><td style="border-top: solid #C9C9C9 1px; padding: .4em;">Sonic Sensor Card</td> | ||
+ | <td style="border-top: solid #C9C9C9 1px; padding: .4em;">The Sonic Sensor Card can detect blocks in the area and report if they're solid or liquid. | ||
+ | |||
+ | {{Crafting | ||
+ | |A1=Redstone |B1=Jukebox|C1=Redstone | ||
+ | |A2=Redstone |B2=Redstone |C2=Redstone | ||
+ | |A3=paper |B3=paper |C3=paper | ||
+ | |Output=Sonic Sensor Card | ||
+ | |Output-link=OpenCCSensors | ||
+ | }} | ||
+ | </td></tr> | ||
+ | |||
+ | |||
+ | |||
+ | <tr style="background-color: #E8E8E8;"><td style="border-top: solid #C9C9C9 1px; padding: .4em;">Crop Sensor Card</td> | ||
+ | <td style="border-top: solid #C9C9C9 1px; padding: .4em;">The crop sensor card can detect the growth status of crops within range. IndustrialCraft2 crops are also supported (+extra!) | ||
+ | |||
+ | {{Crafting | ||
+ | |A1=Redstone |B1=Wheat|C1=Redstone | ||
+ | |A2=Redstone |B2=Redstone |C2=Redstone | ||
+ | |A3=paper |B3=paper |C3=paper | ||
+ | |Output=Crop Sensor Card | ||
+ | |Output-link=OpenCCSensors | ||
+ | }} | ||
+ | </td></tr> | ||
− | |||
− | |||
</table> | </table> | ||
+ | |||
+ | |||
+ | |||
+ | <table style="width: 100%; border: solid 1px black; margin: 2px; border-spacing: 0px;"> | ||
+ | <tr><td colspan="2" style="font-weight: bold; font-size: large; padding-bottom: .3em; border-bottom: solid #C9C9C9 1px; background: #D3FFC2; line-height:28px;"> | ||
+ | [[File:Grid_disk.png|24px]] | ||
+ | OpenCCSensors Sensor Card Upgrades | ||
+ | </td></tr> | ||
+ | |||
+ | <tr><td style="width: 350px; background: #E0E0E0; padding: .4em; font-weight:bold;">Name</td><td style="background: #E0E0E0; padding: .4em; font-weight:bold;">Description</td></tr> | ||
+ | |||
+ | <tr style="background-color: #FFFFFF;"><td style="border-top: solid #C9C9C9 1px; padding: .4em;">Range Extension Antenna</td> | ||
+ | <td style="border-top: solid #C9C9C9 1px; padding: .4em;">The Range Extension Antenna is used to upgrade sensor cards to Mk1, Mk2, and Mk3. | ||
+ | |||
+ | {{Crafting | ||
+ | |B1=redstone_torch | ||
+ | |A2=stone |B2=Redstone |C2=stone | ||
+ | |A3=stone |B3=iron_ingot |C3=stone | ||
+ | |Output=Range Extension Antenna | ||
+ | |Output-link=OpenCCSensors | ||
+ | }} | ||
+ | </td></tr> | ||
+ | |||
+ | <tr style="background-color: #E8E8E8;"><td style="border-top: solid #C9C9C9 1px; padding: .4em;">Signal Amplifier</td> | ||
+ | <td style="border-top: solid #C9C9C9 1px; padding: .4em;">The Signal Amplifier is used to upgrade sensor cards to Mk3 and Mk4. | ||
+ | |||
+ | {{Crafting | ||
+ | |A1=stone |B1=Gold_Ingot|C1=stone | ||
+ | |A2=Redstone |B2=Redstone |C2=Redstone | ||
+ | |A3=stone |B3=Gold_Ingot |C3=stone | ||
+ | |Output=Signal Amplifier | ||
+ | |Output-link=OpenCCSensors | ||
+ | }} | ||
+ | </td></tr> | ||
+ | |||
+ | <tr style="background-color: #FFFFFF;"><td style="border-top: solid #C9C9C9 1px; padding: .4em;">Advanced Amplifier</td> | ||
+ | <td style="border-top: solid #C9C9C9 1px; padding: .4em;">The Advanced Amplifier is used to upgrade sensor cards to Mk4. | ||
+ | |||
+ | {{Crafting | ||
+ | |A1=iron_ingot |B1=Gold_Ingot|C1=iron_ingot | ||
+ | |A2=Redstone |B2=Diamond |C2=Redstone | ||
+ | |A3=iron_ingot |B3=Gold_Ingot |C3=iron_ingot | ||
+ | |Output=Advanced Amplifier | ||
+ | |Output-link=OpenCCSensors | ||
+ | }} | ||
+ | </td></tr> | ||
+ | |||
+ | </table> | ||
+ | |||
+ | |||
+ | |||
+ | <table style="width: 100%; border: solid 1px black; margin: 2px; border-spacing: 0px;"> | ||
+ | <tr><td colspan="2" style="font-weight: bold; font-size: large; padding-bottom: .3em; border-bottom: solid #C9C9C9 1px; background: #D3FFC2; line-height:28px;"> | ||
+ | [[File:Grid_disk.png|24px]] | ||
+ | Sensor Tiers | ||
+ | </td></tr> | ||
+ | |||
+ | <tr><td style="width: 350px; background: #E0E0E0; padding: .4em; font-weight:bold;">Name</td><td style="background: #E0E0E0; padding: .4em; font-weight:bold;">Description</td></tr> | ||
+ | |||
+ | <tr style="background-color: #FFFFFF;"><td style="border-top: solid #C9C9C9 1px; padding: .4em;">'''Mk 1'''</td> | ||
+ | <td style="border-top: solid #C9C9C9 1px; padding: .4em;">The recipes for Mk 1 sensors are all different. (See above sensor card lists) | ||
+ | Special-type sensor cards (Currently only the World Sensor Card) only exist as Mk 1, as they do not have a range. | ||
+ | |||
+ | '''Ranges:''' | ||
+ | |||
+ | <table> | ||
+ | <tr><td>Type</td><td>Range</td><td>Sensor types</td></tr> | ||
+ | <tr><td>Block<td>'''1''' block away (3x3x3)</td><td> | ||
+ | [[File:Grid_Inventory_Sensor_Card.png|24px|Inventory Sensor]] | ||
+ | [[File:Grid_Industrial_Craft_2_Sensor_Card.png|24px|Industrial Craft 2 Sensor]] | ||
+ | [[File:Grid_Buildcraft_Sensor_Card.png|24px|Buildcraft Sensor]] | ||
+ | [[File:Grid_Liquid_Sensor_Card.png|24px|Liquid Sensor]] | ||
+ | [[File:Grid_Sign_Sensor_Card.png|24px|Sign Sensor]] | ||
+ | [[File:Grid_Thaumcraft_Sensor_Card.png|24px|Thaumcraft Sensor]] | ||
+ | [[File:Grid_Sonic_Sensor_Card.png|24px|Sonic Sensor]] | ||
+ | [[File:Grid_Crop_Sensor_Card.png|24px|Crop Sensor]] | ||
+ | </td></tr> | ||
+ | <tr><td>Entity<td>'''4''' block-radius sphere</td><td> | ||
+ | [[File:Grid_Proximity_Sensor_Card.png|24px|Proximity Sensor]] | ||
+ | [[File:Grid_Dropped_Item_Sensor_Card.png|24px|Dropped Item Sensor]] | ||
+ | [[File:Grid_Minecart_Sensor_Card.png|24px|Minecart Sensor]] | ||
+ | </td></tr> | ||
+ | <tr><td>Special</td><td>N/A</td><td> | ||
+ | [[File:Grid_World_Sensor_Card.png|24px|World Sensor]] | ||
+ | </td></tr> | ||
+ | </table> | ||
+ | |||
+ | </td></tr> | ||
+ | |||
+ | <tr style="background-color: #E8E8E8;"><td style="border-top: solid #C9C9C9 1px; padding: .4em;">'''Mk 2'''</td> | ||
+ | <td style="border-top: solid #C9C9C9 1px; padding: .4em;">Mk 2 is the first upgrade to sensor cards. Simply combine a Range Extension Antenna with a Mk 1 sensor card (The recipe is shapeless) | ||
+ | |||
+ | {{Crafting | ||
+ | |A1=Inventory Sensor Card |B1=Range Extension Antenna | ||
+ | |Output=Inventory Sensor Card Mk2 | ||
+ | |Output-link=OpenCCSensors | ||
+ | |A1-link=OpenCCSensors | ||
+ | |B1-link=OpenCCSensors | ||
+ | }} | ||
+ | |||
+ | |||
+ | '''Ranges:''' | ||
+ | <table> | ||
+ | <tr><td>Type</td><td>Range</td><td>Sensor types</td></tr> | ||
+ | <tr><td>Block<td>'''3''' blocks away (7x7x7)</td><td> | ||
+ | [[File:Grid_Inventory_Sensor_Card.png|24px|Inventory Sensor]] | ||
+ | [[File:Grid_Industrial_Craft_2_Sensor_Card.png|24px|Industrial Craft 2 Sensor]] | ||
+ | [[File:Grid_Buildcraft_Sensor_Card.png|24px|Buildcraft Sensor]] | ||
+ | [[File:Grid_Liquid_Sensor_Card.png|24px|Liquid Sensor]] | ||
+ | [[File:Grid_Sign_Sensor_Card.png|24px|Sign Sensor]] | ||
+ | [[File:Grid_Thaumcraft_Sensor_Card.png|24px|Thaumcraft Sensor]] | ||
+ | [[File:Grid_Sonic_Sensor_Card.png|24px|Sonic Sensor]] | ||
+ | [[File:Grid_Crop_Sensor_Card.png|24px|Crop Sensor]] | ||
+ | </td></tr> | ||
+ | <tr><td>Entity<td>'''12''' block-radius sphere</td><td> | ||
+ | [[File:Grid_Proximity_Sensor_Card.png|24px|Proximity Sensor]] | ||
+ | [[File:Grid_Dropped_Item_Sensor_Card.png|24px|Dropped Item Sensor]] | ||
+ | [[File:Grid_Minecart_Sensor_Card.png|24px|Minecart Sensor]] | ||
+ | </td></tr> | ||
+ | </table> | ||
+ | |||
+ | </td></tr> | ||
+ | |||
+ | <tr style="background-color: #FFFFFF;"><td style="border-top: solid #C9C9C9 1px; padding: .4em;">'''Mk 3'''</td> | ||
+ | <td style="border-top: solid #C9C9C9 1px; padding: .4em;">Mk 3 is the second upgrade to sensor cards. Note that the recipe is no longer shapeless. | ||
+ | |||
+ | {{Crafting | ||
+ | |A1=Range Extension Antenna |B1=Inventory Sensor Card Mk2|C1=Range Extension Antenna | ||
+ | |B2=Signal Amplifier | ||
+ | |Output=Inventory Sensor Card Mk3 | ||
+ | |Output-link=OpenCCSensors | ||
+ | |A1-link=OpenCCSensors | ||
+ | |B1-link=OpenCCSensors | ||
+ | |B2-link=OpenCCSensors | ||
+ | |C1-link=OpenCCSensors | ||
+ | }} | ||
+ | |||
+ | |||
+ | '''Ranges:''' | ||
+ | <table> | ||
+ | <tr><td>Type</td><td>Range</td><td>Sensor types</td></tr> | ||
+ | <tr><td>Block<td>'''5''' blocks away (11x11x11)</td><td> | ||
+ | [[File:Grid_Inventory_Sensor_Card.png|24px|Inventory Sensor]] | ||
+ | [[File:Grid_Industrial_Craft_2_Sensor_Card.png|24px|Industrial Craft 2 Sensor]] | ||
+ | [[File:Grid_Buildcraft_Sensor_Card.png|24px|Buildcraft Sensor]] | ||
+ | [[File:Grid_Liquid_Sensor_Card.png|24px|Liquid Sensor]] | ||
+ | [[File:Grid_Sign_Sensor_Card.png|24px|Sign Sensor]] | ||
+ | [[File:Grid_Thaumcraft_Sensor_Card.png|24px|Thaumcraft Sensor]] | ||
+ | [[File:Grid_Sonic_Sensor_Card.png|24px|Sonic Sensor]] | ||
+ | [[File:Grid_Crop_Sensor_Card.png|24px|Crop Sensor]] | ||
+ | </td></tr> | ||
+ | <tr><td>Entity<td>'''20''' block-radius sphere</td><td> | ||
+ | [[File:Grid_Proximity_Sensor_Card.png|24px|Proximity Sensor]] | ||
+ | [[File:Grid_Dropped_Item_Sensor_Card.png|24px|Dropped Item Sensor]] | ||
+ | [[File:Grid_Minecart_Sensor_Card.png|24px|Minecart Sensor]] | ||
+ | </td></tr> | ||
+ | </table> | ||
+ | |||
+ | </td></tr> | ||
+ | |||
+ | <tr style="background-color: #E8E8E8;"><td style="border-top: solid #C9C9C9 1px; padding: .4em;">'''Mk 4'''</td> | ||
+ | <td style="border-top: solid #C9C9C9 1px; padding: .4em;">Mk 4 is the highest tier of sensor card upgrades | ||
+ | |||
+ | {{Crafting | ||
+ | |B1=Range Extension Antenna | ||
+ | |A2=Range Extension Antenna |B2=Inventory Sensor Card Mk3|C2=Range Extension Antenna | ||
+ | |A3=Signal Amplifier|B3=Advanced Amplifier|C3=Signal Amplifier | ||
+ | |Output=Inventory Sensor Card Mk4 | ||
+ | |Output-link=OpenCCSensors | ||
+ | |B1-link=OpenCCSensors | ||
+ | |A2-link=OpenCCSensors | ||
+ | |B2-link=OpenCCSensors | ||
+ | |C2-link=OpenCCSensors | ||
+ | |A3-link=OpenCCSensors | ||
+ | |B3-link=OpenCCSensors | ||
+ | |C3-link=OpenCCSensors | ||
+ | }} | ||
+ | |||
+ | |||
+ | '''Ranges:''' | ||
+ | <table> | ||
+ | <tr><td>Type</td><td>Range</td><td>Sensor types</td></tr> | ||
+ | <tr><td>Block<td>'''7''' blocks away (15x15x15)</td><td> | ||
+ | [[File:Grid_Inventory_Sensor_Card.png|24px|Inventory Sensor]] | ||
+ | [[File:Grid_Industrial_Craft_2_Sensor_Card.png|24px|Industrial Craft 2 Sensor]] | ||
+ | [[File:Grid_Buildcraft_Sensor_Card.png|24px|Buildcraft Sensor]] | ||
+ | [[File:Grid_Liquid_Sensor_Card.png|24px|Liquid Sensor]] | ||
+ | [[File:Grid_Sign_Sensor_Card.png|24px|Sign Sensor]] | ||
+ | [[File:Grid_Thaumcraft_Sensor_Card.png|24px|Thaumcraft Sensor]] | ||
+ | [[File:Grid_Sonic_Sensor_Card.png|24px|Sonic Sensor]] | ||
+ | [[File:Grid_Crop_Sensor_Card.png|24px|Crop Sensor]] | ||
+ | </td></tr> | ||
+ | <tr><td>Entity<td>'''28''' block-radius sphere</td><td> | ||
+ | [[File:Grid_Proximity_Sensor_Card.png|24px|Proximity Sensor]] | ||
+ | [[File:Grid_Dropped_Item_Sensor_Card.png|24px|Dropped Item Sensor]] | ||
+ | [[File:Grid_Minecart_Sensor_Card.png|24px|Minecart Sensor]] | ||
+ | </td></tr> | ||
+ | </table> | ||
+ | |||
+ | </td></tr> | ||
+ | |||
+ | |||
+ | </table> | ||
+ | |||
+ | |||
= Usage Examples = | = Usage Examples = | ||
{{Example | {{Example | ||
|desc=List all available targets on a Proximity Sensor on the left of the Computer. | |desc=List all available targets on a Proximity Sensor on the left of the Computer. | ||
− | |code=local prox = sensor.wrap("left") | + | |code=os.loadAPI("ocs/apis/sensor") |
+ | local prox = sensor.wrap("left") | ||
print(textutils.serialize(prox.getTargets())) | print(textutils.serialize(prox.getTargets())) | ||
|output=A huge blob of text with all nearby available targets to the sensor, and some basic details. | |output=A huge blob of text with all nearby available targets to the sensor, and some basic details. | ||
}} | }} | ||
+ | {{Example | ||
+ | |desc=Turn on a Redstone lamp when a player is within a certain distance from it. The sensor is placed to the left of the computer and the lamp is placed on top of the computer. | ||
+ | |code= | ||
+ | os.loadAPI("ocs/apis/sensor") | ||
+ | |||
+ | -- the location of the redstone lamp relative to the sensor | ||
+ | local offset = { | ||
+ | X = 1, | ||
+ | Y = 1, | ||
+ | Z = 0 | ||
+ | } | ||
+ | |||
+ | -- how close a player has to be to activate the lamp | ||
+ | local radius = 5 | ||
+ | |||
+ | -- find the distance from the player position to the offset | ||
+ | function distance(pos) | ||
+ | local xd = pos.X - offset.X | ||
+ | local yd = pos.Y - offset.Y | ||
+ | local zd = pos.Z - offset.Z | ||
+ | return math.sqrt(xd*xd + yd*yd + zd*zd) | ||
+ | end | ||
+ | |||
+ | |||
+ | local proximity = sensor.wrap("left") | ||
+ | while true do | ||
+ | local signal = false | ||
+ | local targets = proximity.getTargets() | ||
+ | for k, v in pairs(targets) do | ||
+ | if distance(v.Position) < radius then | ||
+ | signal = true | ||
+ | end | ||
+ | end | ||
+ | rs.setOutput("top", signal) | ||
+ | end | ||
+ | }} | ||
+ | |||
+ | [[Category:User_Created_Peripherals]][[Category:Unofficial_APIs]] |
Latest revision as of 06:16, 4 August 2020
OpenCCSensors is a new, open-source, up to date replacement for CcSensors (outdated), allowing monitoring and gathering information from the Minecraft environment - including players, entities, proximity, world info, IndustrialCraft 2, BuildCraft 2, liquids, inventories - and more!
OpenCCSensors comes with its own API, and automatically installs a new program for you at /ocs/programs/sensorview. sensorview is a handy program for very quickly looking at the information gathered from your sensors.
Forum thread and download: OpenCCSensors
http://www.youtube.com/watch?v=i8Bv7uKkIOM&feature=youtu.be
Name | Description | ||||||||
Sensor Peripheral |
The Sensor Peripheral needs to be placed next to a computer and it has a single slot to insert a Sensor Card
| ||||||||
Gauge Peripheral |
The Gauge Peripheral can be placed onto the side of certain machines to get instant readings from them. Right now this only supports Batboxes, MFE's, MFSU, Mass fabricators and Nuclear reactors. We hope to expand this in the future as well as offer an API to re-program the gauge from a computer.
|
Name | Description |
Proximity Sensor Block |
This block outputs a redstone signal if players/mobs are within 16 blocks. The strength of the signal depends on how close the entity is to the block. This block has 3 different modes: "Any Living Entity", "Any Player" or "Owner Only". To switch between modes, the owner of the block must right click on the block. |
Name | Description |
Inventory Sensor Card | The Inventory Sensor Card is capable of reading inventories of any chests or machines around the sensor. It gives full information about what item is in each slot. |
Proximity Sensor Card | The Proximity Sensor Card is capable of detecting players and entities within it's range. |
Machine Sensor Card | The Machine Sensor Card can read information from IC2 devices. |
Power Sensor Card | The Power Sensor Card can read power information from IC2 and Applied Energistics devices. |
Tank Sensor Card | The Tank sensor card is far more powerful than it first seems. This card not only reads actual tanks, but reads internal tanks within a variety of different machines, such as:
Railcraft: Iron Tanks, Buildcraft: Tanks, Thermal Expansion: Aqueous Accumulator, Thermal Expansion: Igneous Extruder, Thermal Expansion: Glacial Precipitator, Thermal Expansion: Liquid Transposer, Thermal Expansion: Magma Crucible, Thermal Expansion: Magmatic Engine, Thermal Expansion: Steam Engine, Industrial Craft: Geothermal Generator, Thaumcraft: Crucible, Buildcraft: Tank, Buildcraft: Combustion Engine, Buildcraft: Pump, Buildcraft: Refinery, Forestry: Biogas Engine, Forestry: Fermenter, Forestry: Still, Forestry: Bottler, Forestry: Raintank, Forestry: Bio Generator, Forestry: Carpenter, Forestry: Moistener, Forestry: Squeezer, Forestry: Thermonic Fabricator, Extra Bees: Analyser, Extra Bees: Purifier, Extra Bees: Synthesizer, Extra Bees: Genepool, Extra Bees: Splicer, Railcraft: Hobbyist's Steam Engine, Railcraft: Commercial Steam Engine, Railcraft: Industrial Steam Engine, GregTech: Quantum Tank, GregTech: Thermal Generator |
World Sensor Card | The World Sensor Card is able to tell the time, weather, and more about the world. |
Dropped Item Sensor Card | The Dropped Item Sensor Card is able to locate and identify dropped items. |
Sign Sensor Card | The Sign Sensor Card is capable of reading signs within it's range. |
Minecart Sensor Card | The Minecart Sensor Card can detect minecarts in the area and give basic information about them |
Sonic Sensor Card | The Sonic Sensor Card can detect blocks in the area and report if they're solid or liquid. |
Crop Sensor Card | The crop sensor card can detect the growth status of crops within range. IndustrialCraft2 crops are also supported (+extra!) |
Name | Description |
Range Extension Antenna | The Range Extension Antenna is used to upgrade sensor cards to Mk1, Mk2, and Mk3. |
Signal Amplifier | The Signal Amplifier is used to upgrade sensor cards to Mk3 and Mk4. |
Advanced Amplifier | The Advanced Amplifier is used to upgrade sensor cards to Mk4. |
Name | Description | ||||||||||||
Mk 1 | The recipes for Mk 1 sensors are all different. (See above sensor card lists)
Special-type sensor cards (Currently only the World Sensor Card) only exist as Mk 1, as they do not have a range. Ranges:
| ||||||||||||
Mk 2 | Mk 2 is the first upgrade to sensor cards. Simply combine a Range Extension Antenna with a Mk 1 sensor card (The recipe is shapeless)
| ||||||||||||
Mk 3 | Mk 3 is the second upgrade to sensor cards. Note that the recipe is no longer shapeless.
| ||||||||||||
Mk 4 | Mk 4 is the highest tier of sensor card upgrades
|
Usage Examples