Jump to content




[mc 1.6.x+cc1.57][mc 1.5.2+cc 1.53] Redio - A Redstone Input/output Peripheral For Lan Networks! Updated 11/13/2013

peripheral

22 replies to this topic

#1 Nuchaz

  • Members
  • 7 posts

Posted 16 June 2013 - 02:27 AM

Updated! Ported directly to Minecraft v1.6.2/v1.6.4 and ComputerCraft v1.57. Enjoy! :)

Edited the post, July 30th, 2015, and added the source code for anyone who wants to play with it/update/do anything you want with it. No restrictions.

The Story

One day recently I found myself in my 1.5.2 Minecraft world working with my friends on a most epic build and wanted to control some redstone based stuff from a central location around a rather large 5 story mansion. I already had a large LAN network around the entire house connecting many (many) monitors to a central computer, so using the LAN network to get my redstone signal where I wanted it seemed most logical. Without any type of redstone wires to aid me it seemed I would have to just use more computers and have them communicate. After setting up a few computers on the network to read and output redstone I realized that was quite inconvenient as well to have to program the extra computer to do their job and communicate with the central computer, especially after getting used to wires of a more bundled nature. At that point I decided I wanted a peripheral based solution to connect to LAN cables that could output or read a redstone signal. I set searching the forums for such a mod but came up empty handed, so I headed off on an adventure into Eclipse. Within a couple days RedIO was born and already working the magic I wanted on the most epic build my friends and I are bringing to fruition.

Posted Image

The Block

In Minecraft the block is called the Redstone I/O. It is simple a peripheral that is meant to be connected to a LAN cable and can be used to read a redstone signal (with strength), output a redstone signal (also with strength, if desired) or throw an event on a change in redstone (turns on, off, or changes strength). The block can read/output only from one side indicated by the red cross. The red bits all around the block light up if the block is either receiving a signal or outputting a signal. This is a simple way of reading the redstone strength from redstone books placed on the bookcase in my other mod, BiblioCraft. The LAN modem can connect to any side.

If you have a mod installed that adds a tool such as any wrench (BC, IC2, TE, etc), the crowbar from railcraft and the tape measure from bibliocraft, than any one of these tools can be used to rotate the Redstone IO. Just simply right click the block with the tool in your hand.

The Recipe

Eight smooth stone and a redstone block:
Posted Image

The Code

The Redstone I/O exposes 3 methods and throw an event.
For the duration of this explanation, I will pretend I wrapped the Redstone IO. They use the name io, lowercase, in their names.
so if:
redio = peripheral.wrap("io_1")

redio.set(true)	-- enables a redstone signal with strength 15
redio.set(false)   -- disables the redstone signal
redio.set(10)	  -- outputs a redstone signal of 10
redio.set(0)	   -- disables the redstone signal
redio.get()		-- returns true/false if there is a redstone signal or not (any strength)
redio.analogGet()  -- returns an integer from 0-15 of the redstone strength

Then for our event:
event, state, strength, id = os.pullEvent("red_io")  -- pulls an event with 4 return values
-- event returns:  red_io
-- state returns true/false if there is redstone
-- strength returns an integer from 0-15 indicating the redstone strength
-- id returns the id of the peripheral the threw the event
The accuracy of state and strength may still be a bit buggy in returning either the state before or after the change, so no worries if that is off, I am aware of it.


The Download
For Minecraft v1.6.2/v1.6.4 and ComputerCraft v1.57
Download Here: http://adf.ly/ZHYOJ


Built and compiled on Forge release 7.8.0.712 and ComputerCraft v1.53. Also tested on forge release 7.8.0.734
Download Here For Minecraft v1.5.x: http://adfoc.us/12433425426632


Source code for RedIO v1.1 can be found here: www.bibliocraftmod.com/downloadables/RedIO[v1.1]-SRC.zip
No restrictions on this, do whatever you want with this source code.

The Changelog

-v1.1 - Updated for Minecraft v1.6.x. Straight port, no new features.
-v.1.0 - Initial release. Contains single block, the Redstone I/O

Mod Packs

I don't mind if this is used in a mod pack as long as proper credit is given and there is a link back to this page. I would prefer my download link be used if possible, but I also understand the need for a simpler distrubution system from packs, so this isn't a requirment.

Edited by Nuchaz, 30 July 2015 - 08:22 PM.


#2 GopherAtl

  • Members
  • 888 posts

Posted 16 June 2013 - 07:34 AM

Ha, nice. I was planning on making one of these today to add to my BioLock mod. I even had the same recipe in mind... Beaten to the punch! I'll give it a try later, nice work!

Any possibility of a v2.0 with a per-side input/output version in the future?
re-read the post and played with the mod and realized it's already per-side, just limited to one side.

#3 jesusthekiller

  • Banned
  • 562 posts
  • LocationWrocław, Poland

Posted 16 June 2013 - 10:22 AM

Nice!

#4 Nuchaz

  • Members
  • 7 posts

Posted 16 June 2013 - 12:50 PM

Thanks for the comments!

I think I forgot to mention in the original post that if you have one of a couple other mods installed it is possible to rotate the block. It pretty much works with any wrench (BC, IC2, TE, etc), the crowbar from railcraft and the tape measure from bibliocraft. Any one of these tools can be used to rotate the Redstone IO. :) (I will squeeze this bit of info into the main post too).

I had thought about making it so you could choose the output side instead of having just the one but then it just seemed a lot simpler to play with when it only has 1 side so you can visually see the side your output from or reading from before even opening the computer interface.

#5 ElvishJerricco

  • Members
  • 803 posts

Posted 16 June 2013 - 01:00 PM

I wonder if it would be possible to create a block like the modems that don't have to be a separate block, but instead can just be a torch-like thing connected in the same block as the wire. Then you wouldn't have to have a big ole block to output a signal.

#6 TurboTuTone

  • Members
  • 7 posts

Posted 25 June 2013 - 04:23 AM

Hi there, i just loaded your mod addon and got a warning in forge:

2013-06-24 14:44:32 [SEVERE] [ForgeModLoader] The mcmod.info file in [CC]RedIO[v1.0].zip cannot be parsed as valid JSON. It will be ignored
argo.saj.InvalidSyntaxException: At line 6, column 227:  Expected either , or ] but got [46].

it seems your description line in mcmod.info ends with a dot instead of a comma, wanted to let you know.
Anyways, thanks for the upload, ill continue testing your peripheral :)

#7 Nuchaz

  • Members
  • 7 posts

Posted 30 June 2013 - 03:20 PM

View PostTurboTuTone, on 25 June 2013 - 04:23 AM, said:

Hi there, i just loaded your mod addon and got a warning in forge:

2013-06-24 14:44:32 [SEVERE] [ForgeModLoader] The mcmod.info file in [CC]RedIO[v1.0].zip cannot be parsed as valid JSON. It will be ignored
argo.saj.InvalidSyntaxException: At line 6, column 227:  Expected either , or ] but got [46].

it seems your description line in mcmod.info ends with a dot instead of a comma, wanted to let you know.
Anyways, thanks for the upload, ill continue testing your peripheral :)


Derp!, I'll tweak that and re-upload. Version number won't change or anything, it'll be a ninja update probably later today. Thanks for letting me know :)

#8 NOTUSEDPLEASEDELETE

  • Members
  • 70 posts

Posted 13 August 2013 - 04:42 PM

I will be downloading!

#9 TehSomeLuigi

  • Members
  • 70 posts

Posted 24 August 2013 - 07:14 AM

Hi, is it possible to have an update for 1.6.2 or the sourcecode so I can port it myself? :)

#10 Negi

  • Members
  • 8 posts

Posted 24 August 2013 - 08:48 AM

You can use Gopher's Peripherals's PRBs, it works well and have the capacity to emit a different signal for each side of the block, are programmable, and all the stuff. Plus it adds cool programmable locks.

#11 Nuchaz

  • Members
  • 7 posts

Posted 13 November 2013 - 05:37 PM

Updated for Minecraft v1.6.x. I finally needed this mod in a build my friends and I did for v1.5 and I am moving it to v1.6, so It was time to update this. I also had a few requests, so this should make some folks happy. :)

The build I am updating is a full functional/playable Clue Mansion inside of minecraft. 2 friends and I have worked on this project for quite some time and hope to set it up for a public release sometime in the next few weeks. My buddy also release a video of us playing a game of Clue on the build just recently. I posted the video with some more info in a recent news post on my website at www.bibliocraftmod.com. Check it out if you like epic MInecraft builds and/or the game of clue. :)

#12 Arduin

  • Members
  • 21 posts

Posted 14 November 2013 - 04:34 AM

Would it be possible to add compatability with Project: Red wires and bundled cables? That would be truly awesome.

MCForum Thread : http://www.minecraft...40512-10172013/
GitHub: https://github.com/MrTJP/ProjectRed

#13 tec_SG

  • Members
  • 10 posts

Posted 14 November 2013 - 02:54 PM

Thank you master :D

#14 Jyzarc

  • Members
  • 24 posts

Posted 15 November 2013 - 05:09 PM

I am having a problem with the event. When redstone is on and turns off the event returns the state as true and the strength as the strength before it turned off - 2. I tested this with red alloy wire from Project Red and it was fine, so it may have something to do with analog states.

#15 Jyzarc

  • Members
  • 24 posts

Posted 15 November 2013 - 06:23 PM

Also I made a spotlight of it here

#16 LemADEC

  • Members
  • 3 posts

Posted 16 January 2014 - 01:19 AM

Tried your mod on 1.6.4, it appears there's a syntax error in your mcmod.info file:
[SEVERE] [ForgeModLoader] The mcmod.info file in RedIO-CC1.57-v1.1.zip cannot be parsed as valid JSON. It will be ignored
argo.saj.InvalidSyntaxException: At line 6, column 227: Expected either , or } but got [.].
at argo.saj.SajParser.objectString(SajParser.java:120)
at argo.saj.SajParser.aJsonValue(SajParser.java:194)
at argo.saj.SajParser.arrayString(SajParser.java:79)
at argo.saj.SajParser.parse(SajParser.java:58)
at argo.jdom.JdomParser.parse(JdomParser.java:36)
at cpw.mods.fml.common.MetadataCollection.from(MetadataCollection.java:44)
at cpw.mods.fml.common.discovery.JarDiscoverer.discover(JarDiscoverer.java:53)
at cpw.mods.fml.common.discovery.ContainerType.findMods(ContainerType.java:42)
at cpw.mods.fml.common.discovery.ModCandidate.explore(ModCandidate.java:71)
at cpw.mods.fml.common.discovery.ModDiscoverer.identifyMods(ModDiscoverer.java:137)
at cpw.mods.fml.common.Loader.identifyMods(Loader.java:353)
at cpw.mods.fml.common.Loader.loadMods(Loader.java:484)
at cpw.mods.fml.server.FMLServerHandler.beginServerLoading(FMLServerHandler.java:99)
at cpw.mods.fml.common.FMLCommonHandler.onServerStart(FMLCommonHandler.java:350)
at net.minecraft.server.dedicated.DedicatedServer.func_71197_b(DedicatedServer.java:92)
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:634)
at net.minecraft.server.ThreadMinecraftServer.run(ThreadMinecraftServer.java:16)

#17 jsonnet

  • New Members
  • 2 posts
  • LocationMunich

Posted 29 March 2014 - 06:55 PM

Are you planning to update to ComputerCraft 1.6 ?

#18 ShadowGar

  • Members
  • 13 posts

Posted 03 May 2014 - 10:46 PM

This is one of the last peripherals that need updated for us to move to the new CC. Hopefully get gets updated.

#19 jsonnet

  • New Members
  • 2 posts
  • LocationMunich

Posted 20 July 2014 - 05:00 PM

I think in the future we have to take MoarPeripherals because theOriginalbits plans to add such a block and also he has added blocks similar to miscperipherals to his mod. And all that for the newest Version of Computercraft :D

#20 Creator

    Mad Dash Victor

  • Members
  • 2,168 posts
  • LocationYou will never find me, muhahahahahaha

Posted 16 June 2015 - 08:28 PM

Please update it. Please.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users