Difference between revisions of "OpenCCSensors"

From ComputerCraft Wiki
Jump to: navigation, search
 
(6 intermediate revisions by 4 users not shown)
Line 4: Line 4:
 
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.
 
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
 
http://www.youtube.com/watch?v=i8Bv7uKkIOM&feature=youtu.be
Line 20: Line 22:
 
The Sensor Peripheral needs to be placed next to a computer and it has a single slot to insert a Sensor Card
 
The Sensor Peripheral needs to be placed next to a computer and it has a single slot to insert a Sensor Card
  
{{Crafting grid
+
{{Crafting
 
  |A1=Obsidian |B1=Obsidian          |C1=Obsidian
 
  |A1=Obsidian |B1=Obsidian          |C1=Obsidian
 
  |A2=Redstone |B2=Obsidian        |C2=Redstone
 
  |A2=Redstone |B2=Obsidian        |C2=Redstone
Line 26: Line 28:
 
  |Output=Sensor Peripheral
 
  |Output=Sensor Peripheral
 
  |Output-link=OpenCCSensors
 
  |Output-link=OpenCCSensors
}}
+
}}
 
<table style="width: 100%; border-spacing: 0px;">
 
<table style="width: 100%; border-spacing: 0px;">
  
Line 36: Line 38:
  
 
<tr style="background-color: #E8E8E8;"><td style="border-top: solid #C9C9C9 1px; padding: .4em;">mySensor.getTargets()</td>
 
<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 used as a numerical index, and the values are each a table of basic details.</td></tr>
+
<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>
  
  
Line 50: Line 52:
 
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.
 
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 grid
+
{{Crafting
 
  |A1=glass_pane |B1=Redstone          |C1=Monitor
 
  |A1=glass_pane |B1=Redstone          |C1=Monitor
 
  |Output=Gauge Peripheral
 
  |Output=Gauge Peripheral
 
  |Output-link=OpenCCSensors
 
  |Output-link=OpenCCSensors
}}
+
}}
  
  
Line 76: Line 78:
 
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.
 
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 grid
+
{{Crafting
|A1= |B1= |C1=
+
 
  |A2=Comparator |B2=Proximity Sensor Card MKIV |C2=Comparator
 
  |A2=Comparator |B2=Proximity Sensor Card MKIV |C2=Comparator
 
  |A3=Redstone |B3=Block of Iron      |C3=Redstone  
 
  |A3=Redstone |B3=Block of Iron      |C3=Redstone  
 
  |Output=Proximity Sensor Block
 
  |Output=Proximity Sensor Block
 
  |Output-link=OpenCCSensors
 
  |Output-link=OpenCCSensors
  }}
+
  |B2-link=OpenCCSensors
 +
}}
 
</td></tr>
 
</td></tr>
 
</table>
 
</table>
Line 97: Line 99:
 
<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.
 
<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.
  
{{Crafting grid
+
{{Crafting
 
  |A1=Redstone |B1=chest          |C1=Redstone
 
  |A1=Redstone |B1=chest          |C1=Redstone
 
  |A2=Redstone |B2=Redstone        |C2=Redstone
 
  |A2=Redstone |B2=Redstone        |C2=Redstone
Line 103: Line 105:
 
  |Output=Inventory Sensor Card
 
  |Output=Inventory Sensor Card
 
  |Output-link=OpenCCSensors
 
  |Output-link=OpenCCSensors
}}
+
}}
 
</td></tr>
 
</td></tr>
  
Line 109: Line 111:
 
<td style="border-top: solid #C9C9C9 1px; padding: .4em;">The Proximity Sensor Card is capable of detecting players and entities within it's range.
 
<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 grid
+
{{Crafting
 
  |A1=Redstone |B1=pressure_plate          |C1=Redstone
 
  |A1=Redstone |B1=pressure_plate          |C1=Redstone
 
  |A2=Redstone |B2=Redstone        |C2=Redstone
 
  |A2=Redstone |B2=Redstone        |C2=Redstone
Line 115: Line 117:
 
  |Output=Proximity Sensor Card
 
  |Output=Proximity Sensor Card
 
  |Output-link=OpenCCSensors
 
  |Output-link=OpenCCSensors
}}
+
}}
 
</td></tr>
 
</td></tr>
  
Line 123: Line 125:
 
<td style="border-top: solid #C9C9C9 1px; padding: .4em;">The Machine Sensor Card can read information from IC2 devices.  
 
<td style="border-top: solid #C9C9C9 1px; padding: .4em;">The Machine Sensor Card can read information from IC2 devices.  
  
{{Crafting grid
+
{{Crafting
 
  |A1=Redstone |B1=Redstone          |C1=Redstone
 
  |A1=Redstone |B1=Redstone          |C1=Redstone
 
  |A2=Redstone |B2=Redstone        |C2=Redstone
 
  |A2=Redstone |B2=Redstone        |C2=Redstone
Line 129: Line 131:
 
  |Output=Buildcraft Sensor Card
 
  |Output=Buildcraft Sensor Card
 
  |Output-link=OpenCCSensors
 
  |Output-link=OpenCCSensors
}}
+
}}
 
</td></tr>
 
</td></tr>
  
Line 135: Line 137:
 
<td style="border-top: solid #C9C9C9 1px; padding: .4em;">The Power Sensor Card can read power information from IC2 and Applied Energistics devices.  
 
<td style="border-top: solid #C9C9C9 1px; padding: .4em;">The Power Sensor Card can read power information from IC2 and Applied Energistics devices.  
  
{{Crafting grid
+
{{Crafting
 
  |A1=Redstone |B1=Coal          |C1=Redstone
 
  |A1=Redstone |B1=Coal          |C1=Redstone
 
  |A2=Redstone |B2=Redstone        |C2=Redstone
 
  |A2=Redstone |B2=Redstone        |C2=Redstone
Line 141: Line 143:
 
  |Output=Power Sensor Card
 
  |Output=Power Sensor Card
 
  |Output-link=OpenCCSensors
 
  |Output-link=OpenCCSensors
}}
+
}}
 
</td></tr>
 
</td></tr>
  
Line 149: Line 151:
 
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
 
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 grid
+
{{Crafting
 
  |A1=Redstone |B1=Bucket |C1=Redstone
 
  |A1=Redstone |B1=Bucket |C1=Redstone
 
  |A2=Redstone |B2=Redstone        |C2=Redstone
 
  |A2=Redstone |B2=Redstone        |C2=Redstone
Line 155: Line 157:
 
  |Output=Liquid Sensor Card
 
  |Output=Liquid Sensor Card
 
  |Output-link=OpenCCSensors
 
  |Output-link=OpenCCSensors
}}
+
}}
 
</td></tr>
 
</td></tr>
  
Line 161: Line 163:
 
<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.
 
<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 grid
+
{{Crafting
 
  |A1=Redstone |B1=ender_pearl |C1=Redstone
 
  |A1=Redstone |B1=ender_pearl |C1=Redstone
 
  |A2=Redstone |B2=Redstone        |C2=Redstone
 
  |A2=Redstone |B2=Redstone        |C2=Redstone
Line 167: Line 169:
 
  |Output=World Sensor Card
 
  |Output=World Sensor Card
 
  |Output-link=OpenCCSensors
 
  |Output-link=OpenCCSensors
}}
+
}}
 
</td></tr>
 
</td></tr>
  
Line 173: Line 175:
 
<td style="border-top: solid #C9C9C9 1px; padding: .4em;">The Dropped Item Sensor Card is able to locate and identify dropped items.
 
<td style="border-top: solid #C9C9C9 1px; padding: .4em;">The Dropped Item Sensor Card is able to locate and identify dropped items.
  
{{Crafting grid
+
{{Crafting
 
  |A1=Redstone |B1=slime_ball |C1=Redstone
 
  |A1=Redstone |B1=slime_ball |C1=Redstone
 
  |A2=Redstone |B2=Redstone        |C2=Redstone
 
  |A2=Redstone |B2=Redstone        |C2=Redstone
Line 179: Line 181:
 
  |Output=Dropped Item Sensor Card
 
  |Output=Dropped Item Sensor Card
 
  |Output-link=OpenCCSensors
 
  |Output-link=OpenCCSensors
}}
+
}}
 
</td></tr>
 
</td></tr>
  
Line 185: Line 187:
 
<td style="border-top: solid #C9C9C9 1px; padding: .4em;">The Sign Sensor Card is capable of reading signs within it's range.
 
<td style="border-top: solid #C9C9C9 1px; padding: .4em;">The Sign Sensor Card is capable of reading signs within it's range.
  
{{Crafting grid
+
{{Crafting
 
  |A1=Redstone |B1=sign|C1=Redstone
 
  |A1=Redstone |B1=sign|C1=Redstone
 
  |A2=Redstone |B2=Redstone        |C2=Redstone
 
  |A2=Redstone |B2=Redstone        |C2=Redstone
Line 191: Line 193:
 
  |Output=Sign Sensor Card
 
  |Output=Sign Sensor Card
 
  |Output-link=OpenCCSensors
 
  |Output-link=OpenCCSensors
}}
+
}}
 
</td></tr>
 
</td></tr>
  
Line 197: Line 199:
 
<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
 
<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 grid
+
{{Crafting
 
  |A1=Redstone |B1=Minecart|C1=Redstone
 
  |A1=Redstone |B1=Minecart|C1=Redstone
 
  |A2=Redstone |B2=Redstone        |C2=Redstone
 
  |A2=Redstone |B2=Redstone        |C2=Redstone
Line 203: Line 205:
 
  |Output=Minecart Sensor Card
 
  |Output=Minecart Sensor Card
 
  |Output-link=OpenCCSensors
 
  |Output-link=OpenCCSensors
}}
+
}}
 
</td></tr>
 
</td></tr>
  
Line 209: Line 211:
 
<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.  
 
<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 grid
+
{{Crafting
  |A1=Redstone |B1=Note Block|C1=Redstone
+
  |A1=Redstone |B1=Jukebox|C1=Redstone
 
  |A2=Redstone |B2=Redstone        |C2=Redstone
 
  |A2=Redstone |B2=Redstone        |C2=Redstone
 
  |A3=paper |B3=paper      |C3=paper
 
  |A3=paper |B3=paper      |C3=paper
 
  |Output=Sonic Sensor Card
 
  |Output=Sonic Sensor Card
 
  |Output-link=OpenCCSensors
 
  |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>
 
</td></tr>
  
Line 234: Line 250:
 
<td style="border-top: solid #C9C9C9 1px; padding: .4em;">The Range Extension Antenna is used to upgrade sensor cards to Mk1, Mk2, and Mk3.  
 
<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 grid
+
{{Crafting
 
  |B1=redstone_torch           
 
  |B1=redstone_torch           
 
  |A2=stone |B2=Redstone        |C2=stone
 
  |A2=stone |B2=Redstone        |C2=stone
Line 240: Line 256:
 
  |Output=Range Extension Antenna
 
  |Output=Range Extension Antenna
 
  |Output-link=OpenCCSensors
 
  |Output-link=OpenCCSensors
}}
+
}}
 
</td></tr>
 
</td></tr>
  
Line 246: Line 262:
 
<td style="border-top: solid #C9C9C9 1px; padding: .4em;">The Signal Amplifier is used to upgrade sensor cards to Mk3 and Mk4.  
 
<td style="border-top: solid #C9C9C9 1px; padding: .4em;">The Signal Amplifier is used to upgrade sensor cards to Mk3 and Mk4.  
  
{{Crafting grid
+
{{Crafting
 
  |A1=stone |B1=Gold_Ingot|C1=stone
 
  |A1=stone |B1=Gold_Ingot|C1=stone
 
  |A2=Redstone |B2=Redstone        |C2=Redstone
 
  |A2=Redstone |B2=Redstone        |C2=Redstone
Line 252: Line 268:
 
  |Output=Signal Amplifier
 
  |Output=Signal Amplifier
 
  |Output-link=OpenCCSensors
 
  |Output-link=OpenCCSensors
}}
+
}}
 
</td></tr>
 
</td></tr>
  
Line 258: Line 274:
 
<td style="border-top: solid #C9C9C9 1px; padding: .4em;">The Advanced Amplifier is used to upgrade sensor cards to Mk4.  
 
<td style="border-top: solid #C9C9C9 1px; padding: .4em;">The Advanced Amplifier is used to upgrade sensor cards to Mk4.  
  
{{Crafting grid
+
{{Crafting
 
  |A1=iron_ingot |B1=Gold_Ingot|C1=iron_ingot
 
  |A1=iron_ingot |B1=Gold_Ingot|C1=iron_ingot
 
  |A2=Redstone |B2=Diamond        |C2=Redstone
 
  |A2=Redstone |B2=Diamond        |C2=Redstone
Line 264: Line 280:
 
  |Output=Advanced Amplifier
 
  |Output=Advanced Amplifier
 
  |Output-link=OpenCCSensors
 
  |Output-link=OpenCCSensors
}}
+
}}
 
</td></tr>
 
</td></tr>
  
Line 295: Line 311:
 
[[File:Grid_Thaumcraft_Sensor_Card.png|24px|Thaumcraft Sensor]]
 
[[File:Grid_Thaumcraft_Sensor_Card.png|24px|Thaumcraft Sensor]]
 
[[File:Grid_Sonic_Sensor_Card.png|24px|Sonic Sensor]]
 
[[File:Grid_Sonic_Sensor_Card.png|24px|Sonic Sensor]]
 +
[[File:Grid_Crop_Sensor_Card.png|24px|Crop Sensor]]
 
</td></tr>
 
</td></tr>
 
<tr><td>Entity<td>'''4''' block-radius sphere</td><td>
 
<tr><td>Entity<td>'''4''' block-radius sphere</td><td>
Line 311: Line 328:
 
<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)
 
<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 grid
+
{{Crafting
 
  |A1=Inventory Sensor Card |B1=Range Extension Antenna
 
  |A1=Inventory Sensor Card |B1=Range Extension Antenna
 
  |Output=Inventory Sensor Card Mk2
 
  |Output=Inventory Sensor Card Mk2
 
  |Output-link=OpenCCSensors
 
  |Output-link=OpenCCSensors
  }}
+
  |A1-link=OpenCCSensors
 +
|B1-link=OpenCCSensors
 +
}}
  
  
Line 329: Line 348:
 
[[File:Grid_Thaumcraft_Sensor_Card.png|24px|Thaumcraft Sensor]]
 
[[File:Grid_Thaumcraft_Sensor_Card.png|24px|Thaumcraft Sensor]]
 
[[File:Grid_Sonic_Sensor_Card.png|24px|Sonic Sensor]]
 
[[File:Grid_Sonic_Sensor_Card.png|24px|Sonic Sensor]]
 +
[[File:Grid_Crop_Sensor_Card.png|24px|Crop Sensor]]
 
</td></tr>
 
</td></tr>
 
<tr><td>Entity<td>'''12''' block-radius sphere</td><td>
 
<tr><td>Entity<td>'''12''' block-radius sphere</td><td>
Line 342: Line 362:
 
<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.
 
<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 grid
+
{{Crafting
 
  |A1=Range Extension Antenna |B1=Inventory Sensor Card Mk2|C1=Range Extension Antenna
 
  |A1=Range Extension Antenna |B1=Inventory Sensor Card Mk2|C1=Range Extension Antenna
 
  |B2=Signal Amplifier
 
  |B2=Signal Amplifier
 
  |Output=Inventory Sensor Card Mk3
 
  |Output=Inventory Sensor Card Mk3
 
  |Output-link=OpenCCSensors
 
  |Output-link=OpenCCSensors
  }}
+
  |A1-link=OpenCCSensors
 +
|B1-link=OpenCCSensors
 +
|B2-link=OpenCCSensors
 +
|C1-link=OpenCCSensors
 +
}}
  
  
Line 361: Line 385:
 
[[File:Grid_Thaumcraft_Sensor_Card.png|24px|Thaumcraft Sensor]]
 
[[File:Grid_Thaumcraft_Sensor_Card.png|24px|Thaumcraft Sensor]]
 
[[File:Grid_Sonic_Sensor_Card.png|24px|Sonic Sensor]]
 
[[File:Grid_Sonic_Sensor_Card.png|24px|Sonic Sensor]]
 +
[[File:Grid_Crop_Sensor_Card.png|24px|Crop Sensor]]
 
</td></tr>
 
</td></tr>
 
<tr><td>Entity<td>'''20''' block-radius sphere</td><td>
 
<tr><td>Entity<td>'''20''' block-radius sphere</td><td>
Line 374: Line 399:
 
<td style="border-top: solid #C9C9C9 1px; padding: .4em;">Mk 4 is the highest tier of sensor card upgrades
 
<td style="border-top: solid #C9C9C9 1px; padding: .4em;">Mk 4 is the highest tier of sensor card upgrades
  
{{Crafting grid
+
{{Crafting
 
  |B1=Range Extension Antenna  
 
  |B1=Range Extension Antenna  
 
|A2=Range Extension Antenna |B2=Inventory Sensor Card Mk3|C2=Range Extension Antenna
 
|A2=Range Extension Antenna |B2=Inventory Sensor Card Mk3|C2=Range Extension Antenna
Line 380: Line 405:
 
  |Output=Inventory Sensor Card Mk4
 
  |Output=Inventory Sensor Card Mk4
 
  |Output-link=OpenCCSensors
 
  |Output-link=OpenCCSensors
  }}
+
  |B1-link=OpenCCSensors
 +
|A2-link=OpenCCSensors
 +
|B2-link=OpenCCSensors
 +
|C2-link=OpenCCSensors
 +
|A3-link=OpenCCSensors
 +
|B3-link=OpenCCSensors
 +
|C3-link=OpenCCSensors
 +
}}
  
  
Line 394: Line 426:
 
[[File:Grid_Thaumcraft_Sensor_Card.png|24px|Thaumcraft Sensor]]
 
[[File:Grid_Thaumcraft_Sensor_Card.png|24px|Thaumcraft Sensor]]
 
[[File:Grid_Sonic_Sensor_Card.png|24px|Sonic Sensor]]
 
[[File:Grid_Sonic_Sensor_Card.png|24px|Sonic Sensor]]
 +
[[File:Grid_Crop_Sensor_Card.png|24px|Crop Sensor]]
 
</td></tr>
 
</td></tr>
 
<tr><td>Entity<td>'''28''' block-radius sphere</td><td>
 
<tr><td>Entity<td>'''28''' block-radius sphere</td><td>

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

Grid disk.png   OpenCCSensors Peripherals

NameDescription
Sensor Peripheral

The Sensor Peripheral needs to be placed next to a computer and it has a single slot to insert a Sensor Card

Empty-crafting-table.png
Grid Obsidian.png
Grid Obsidian.png
Grid Obsidian.png
Grid Redstone.png
Grid Obsidian.png
Grid Redstone.png
Grid Sensor Peripheral.png
Grid Stone.png
Grid Stone.png
Grid Stone.png


os.loadAPI("ocs/apis/sensor") Load the sensor API
mySensor = sensor.wrap(side) Returns the wrapped sensor on the side specified.
mySensor.getTargets() 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.
mySensor.getTargetDetails(key) Returns a table of full details for that particular target from the sensor mySensor - where the the "key" is the key returned from getTargets()
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.

Empty-crafting-table.png
Grid glass pane.png
Grid Redstone.png
Grid Monitor.png
Grid Gauge Peripheral.png



Grid disk.png   OpenCCSensors Blocks

NameDescription
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.

Empty-crafting-table.png
Grid Comparator.png
Grid Proximity Sensor Card MKIV.png
Grid Comparator.png
Grid Proximity Sensor Block.png
Grid Redstone.png
Grid Block of Iron.png
Grid Redstone.png


Grid disk.png   OpenCCSensors Sensor Cards

NameDescription
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.
Empty-crafting-table.png
Grid Redstone.png
Grid chest.png
Grid Redstone.png
Grid Redstone.png
Grid Redstone.png
Grid Redstone.png
Grid Inventory Sensor Card.png
Grid paper.png
Grid paper.png
Grid paper.png
Proximity Sensor Card The Proximity Sensor Card is capable of detecting players and entities within it's range.
Empty-crafting-table.png
Grid Redstone.png
Grid pressure plate.png
Grid Redstone.png
Grid Redstone.png
Grid Redstone.png
Grid Redstone.png
Grid Proximity Sensor Card.png
Grid paper.png
Grid paper.png
Grid paper.png
Machine Sensor Card The Machine Sensor Card can read information from IC2 devices.
Empty-crafting-table.png
Grid Redstone.png
Grid Redstone.png
Grid Redstone.png
Grid Redstone.png
Grid Redstone.png
Grid Redstone.png
Grid Buildcraft Sensor Card.png
Grid paper.png
Grid paper.png
Grid paper.png
Power Sensor Card The Power Sensor Card can read power information from IC2 and Applied Energistics devices.
Empty-crafting-table.png
Grid Redstone.png
Grid Coal.png
Grid Redstone.png
Grid Redstone.png
Grid Redstone.png
Grid Redstone.png
Grid Power Sensor Card.png
Grid paper.png
Grid paper.png
Grid paper.png
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

Empty-crafting-table.png
Grid Redstone.png
Grid Bucket.png
Grid Redstone.png
Grid Redstone.png
Grid Redstone.png
Grid Redstone.png
Grid Liquid Sensor Card.png
Grid paper.png
Grid paper.png
Grid paper.png
World Sensor Card The World Sensor Card is able to tell the time, weather, and more about the world.
Empty-crafting-table.png
Grid Redstone.png
Grid ender pearl.png
Grid Redstone.png
Grid Redstone.png
Grid Redstone.png
Grid Redstone.png
Grid World Sensor Card.png
Grid paper.png
Grid paper.png
Grid paper.png
Dropped Item Sensor Card The Dropped Item Sensor Card is able to locate and identify dropped items.
Empty-crafting-table.png
Grid Redstone.png
Grid slime ball.png
Grid Redstone.png
Grid Redstone.png
Grid Redstone.png
Grid Redstone.png
Grid Dropped Item Sensor Card.png
Grid paper.png
Grid paper.png
Grid paper.png
Sign Sensor Card The Sign Sensor Card is capable of reading signs within it's range.
Empty-crafting-table.png
Grid Redstone.png
Grid sign.png
Grid Redstone.png
Grid Redstone.png
Grid Redstone.png
Grid Redstone.png
Grid Sign Sensor Card.png
Grid paper.png
Grid paper.png
Grid paper.png
Minecart Sensor Card The Minecart Sensor Card can detect minecarts in the area and give basic information about them
Empty-crafting-table.png
Grid Redstone.png
Grid Minecart.png
Grid Redstone.png
Grid Redstone.png
Grid Redstone.png
Grid Redstone.png
Grid Minecart Sensor Card.png
Grid paper.png
Grid paper.png
Grid paper.png
Sonic Sensor Card The Sonic Sensor Card can detect blocks in the area and report if they're solid or liquid.
Empty-crafting-table.png
Grid Redstone.png
Grid Jukebox.png
Grid Redstone.png
Grid Redstone.png
Grid Redstone.png
Grid Redstone.png
Grid Sonic Sensor Card.png
Grid paper.png
Grid paper.png
Grid paper.png
Crop Sensor Card The crop sensor card can detect the growth status of crops within range. IndustrialCraft2 crops are also supported (+extra!)
Empty-crafting-table.png
Grid Redstone.png
Grid Wheat.png
Grid Redstone.png
Grid Redstone.png
Grid Redstone.png
Grid Redstone.png
Grid Crop Sensor Card.png
Grid paper.png
Grid paper.png
Grid paper.png


Grid disk.png   OpenCCSensors Sensor Card Upgrades

NameDescription
Range Extension Antenna The Range Extension Antenna is used to upgrade sensor cards to Mk1, Mk2, and Mk3.
Empty-crafting-table.png
Grid redstone torch.png
Grid stone.png
Grid Redstone.png
Grid stone.png
Grid Range Extension Antenna.png
Grid stone.png
Grid iron ingot.png
Grid stone.png
Signal Amplifier The Signal Amplifier is used to upgrade sensor cards to Mk3 and Mk4.
Empty-crafting-table.png
Grid stone.png
Grid Gold Ingot.png
Grid stone.png
Grid Redstone.png
Grid Redstone.png
Grid Redstone.png
Grid Signal Amplifier.png
Grid stone.png
Grid Gold Ingot.png
Grid stone.png
Advanced Amplifier The Advanced Amplifier is used to upgrade sensor cards to Mk4.
Empty-crafting-table.png
Grid iron ingot.png
Grid Gold Ingot.png
Grid iron ingot.png
Grid Redstone.png
Grid Diamond.png
Grid Redstone.png
Grid Advanced Amplifier.png
Grid iron ingot.png
Grid Gold Ingot.png
Grid iron ingot.png


Grid disk.png   Sensor Tiers

NameDescription
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:

TypeRangeSensor types
Block1 block away (3x3x3)

Inventory Sensor Industrial Craft 2 Sensor Buildcraft Sensor Liquid Sensor Sign Sensor Thaumcraft Sensor Sonic Sensor Crop Sensor

Entity4 block-radius sphere

Proximity Sensor Dropped Item Sensor Minecart Sensor

SpecialN/A

World Sensor

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)
Empty-crafting-table.png
Grid Inventory Sensor Card.png
Grid Range Extension Antenna.png
Grid Inventory Sensor Card Mk2.png


Ranges:

TypeRangeSensor types
Block3 blocks away (7x7x7)

Inventory Sensor Industrial Craft 2 Sensor Buildcraft Sensor Liquid Sensor Sign Sensor Thaumcraft Sensor Sonic Sensor Crop Sensor

Entity12 block-radius sphere

Proximity Sensor Dropped Item Sensor Minecart Sensor

Mk 3 Mk 3 is the second upgrade to sensor cards. Note that the recipe is no longer shapeless.
Empty-crafting-table.png
Grid Range Extension Antenna.png
Grid Inventory Sensor Card Mk2.png
Grid Range Extension Antenna.png
Grid Signal Amplifier.png
Grid Inventory Sensor Card Mk3.png


Ranges:

TypeRangeSensor types
Block5 blocks away (11x11x11)

Inventory Sensor Industrial Craft 2 Sensor Buildcraft Sensor Liquid Sensor Sign Sensor Thaumcraft Sensor Sonic Sensor Crop Sensor

Entity20 block-radius sphere

Proximity Sensor Dropped Item Sensor Minecart Sensor

Mk 4 Mk 4 is the highest tier of sensor card upgrades
Empty-crafting-table.png
Grid Range Extension Antenna.png
Grid Range Extension Antenna.png
Grid Inventory Sensor Card Mk3.png
Grid Range Extension Antenna.png
Grid Inventory Sensor Card Mk4.png
Grid Signal Amplifier.png
Grid Advanced Amplifier.png
Grid Signal Amplifier.png


Ranges:

TypeRangeSensor types
Block7 blocks away (15x15x15)

Inventory Sensor Industrial Craft 2 Sensor Buildcraft Sensor Liquid Sensor Sign Sensor Thaumcraft Sensor Sonic Sensor Crop Sensor

Entity28 block-radius sphere

Proximity Sensor Dropped Item Sensor Minecart Sensor


Usage Examples

Grid paper.png  Example
List all available targets on a Proximity Sensor on the left of the Computer.
Code
os.loadAPI("ocs/apis/sensor")
local prox = sensor.wrap("left")
print(textutils.serialize(prox.getTargets()))
Output A huge blob of text with all nearby available targets to the sensor, and some basic details.



Grid paper.png  Example
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