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

[1.56] Add Wireless Communication To The Api

Started by Foone, 25 September 2013 - 12:31 PM
Foone #1
Posted 25 September 2013 - 02:31 PM
It'd be handy for mods integrating with CC to be able to access wireless communication in a standardized way. At the moment, the best you can do is to reflect into WirelessNetwork.get().transmit(…)

This'd be useful for mods which add things like "satellites" which broadcast back to players, range extension/repeaters, controlling entities with redstone.
Wojbie #2
Posted 25 September 2013 - 02:38 PM
Is Rednet Api not standard?

EDIT: O wait you mean from Mod side of things? Cause Satellites and range extension/repeaters are easy to make using what we have in ComputerCraft right now.
Foone #3
Posted 25 September 2013 - 03:36 PM
Yeah, I mean from the java API, if you're writing a mod that interfaces with CC.
electrodude512 #4
Posted 25 September 2013 - 03:53 PM
What's wrong with just making a normal peripheral? Use peripheral cables if you want it to be remote. Use a computer with a wireless modem next to your peripheral if you want it to be wireless. What specifically do you need java-side rednet access for?

EDIT: All of the examples you gave could be done with normal computers and OpenPeripheral without touching the java rednet api. Satellites can run on normal computers in the air, and OpenPeripheral has a thing to send things remotely to the player and to control an entity, and neither of them require messing with rednet
Foone #5
Posted 25 September 2013 - 08:20 PM
My mod involves the user shooting a rocket into the air to collect data, and it's transmitted wirelessly back to the ground. There's no computer or modem up in the air (above max height), the rocket is only virtual at that point.

I could build a satellite dish peripheral and have the rockets transmit to that instead, but wireless rednet is an easy fix for now and I thought I'd ask because it seems useful to other mods as well.
Lyqyd #6
Posted 25 September 2013 - 08:28 PM
You're probably better off creating your own peripheral block to give the data to the computer. Wireless modems wouldn't make any sense for that purpose anyhow.