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

[mc1.6.4] Project Red Peripheral

Started by joserobjr, 16 March 2014 - 05:00 AM
joserobjr #1
Posted 16 March 2014 - 06:00 AM
This peripheral allows you to connect computers to bundled cables from Project Red, it can also be used to extend the normal redstone output.

The peripheral is a block, can be used by multiple computers and you can control the output from any side.

Note: Project Red IS NOT required since version 1.3.1-r15, if you don't have it the bundled cable functions won't do anything but you'll be able to use vanilla redstone functions normally.

Requiriments
  • ComputerCraft
  • Forge Microblocks
  • CodeChickenLib
They will be downloaded and installed automatically (with exception of ComputerCraft that you have to install manually)

Images
Spoiler

Features
Spoiler
  • Connect Project Red's Bundled Cable to computers
  • Connect colored wired cables to computers
  • Transmit/Read different signals for each side
  • Transmit/Read analog signal for each color in a bundled cable or simple redstone

Planned Features
Spoiler
  • Transmit/Read different signals for each side rotation, so you can transmit a different signal for each possible microblock connection
  • Transmit different strength for each color in a bundled cable
  • Modify a single color output without affecting the other colors of a bundled cable

Exposed Methods
SpoilerVariable Description:
  • side: Possible values: "bottom", "top", "front", "back", "left", "right"
  • colors: Numeric color combination or the result of Colors API
  • project_red_strength: Power of a redstone signal from 0 to 255, used by Project: Red
  • redstone_strength: Power of a redstone signal from 0 to 16, used by normal redstone
Methods:
Note: Variables between "[" and "]" are optional.

setBundledOutput side colors
Set the bundled output to a Bundled Cable or colored redstone wire with maximum strength
Return: nothing

setAnalogBundledOutput side colors project_red_strength

Set the bundled output to a Bundled Cable or colored redstone wire with specified strength, all the active colors will have that strength
Return: nothing

getBundledOutput side
Return the current bundled output as a number compatible with Colors API (will not return the analog strength)
Return: number

getBundledInput side
Read and return the bundled colors being received in the specified direction, the returned number will be compatible with Colors API (will not return the analog strength)
Return: number

setOutput side boolean
Set the uncolored redstone output (vanilla redstone) with maximum strength
Return: nothing

setAnalogOutput side redstone_strength
Set the uncolored redstone output (vanilla redstone) with specified strength
Return: nothing

getOutput side
Return the current uncolored redstone (vanilla redstone) output by this peripheral
Return: boolean

getAnalogOutput side
Return the current uncolored redstone (vanilla redstone) output strength by this peripheral
Return: number

getSides
Returns the possible sides. Note: The order may be different from Redstone (API)
Returns: "bottom", "top", "front", "back", "left", "right"

getInput side
Read and return the current uncolored redstone (vanilla redstone) input from that side
Return: boolean

Downloads
SpoilerDownload version 1.3.11-r15 for Minecraft 1.6.4
Spoiler
  • Fixed Bundled IO recipe
  • Including Project: Red API so PR isn't required if you only want to use vanilla redstone signals
  • Prevent crash when Project: Red Transmission isn't installed
  • Started using SRG obfuscation
  • Fixed version signatures, added ChickenBone's downloader to the output
  • Bundled IO peripheral's type now is "bundledio"
  • Fixed "left" and "right" sides (were inverted)

Download version 1.3.5-r9 for Minecraft 1.6.4
Spoiler
  • Fixes Wired Modems not attaching to Bundled IO
  • Fixes Bundled IO not showing in creative tabs

Download version 1.0 for Minecraft 1.6.4

License
Creative Commons Attribution 4.0 International
Edited on 18 March 2014 - 09:33 AM
hpnisse #2
Posted 16 March 2014 - 01:33 PM
Hey!
This seems like a nice peripheral addon!

But one thing I discovered almost direct was, the peripheral isn´t a full size block.
Which means it does not going to attach "wired modems", you can only use this with a computer next to it or download another peripheral that has the Peripheral Proxy.

Besides that, it's a great peripheral, with great features.
CreeperWithShades #3
Posted 16 March 2014 - 07:17 PM
Hey!
This seems like a nice peripheral addon!

But one thing I discovered almost direct was, the peripheral isn´t a full size block.
Which means it does not going to attach "wired modems", you can only use this with a computer next to it or download another peripheral that has the Peripheral Proxy.

Besides that, it's a great peripheral, with great features.
You mean a transparent block.
BTW, awesome mod.
sci4me #4
Posted 16 March 2014 - 10:05 PM
NICE! Have needed this! :D/>
joserobjr #5
Posted 17 March 2014 - 02:43 PM
Hey!
This seems like a nice peripheral addon!

But one thing I discovered almost direct was, the peripheral isn´t a full size block.
Which means it does not going to attach "wired modems", you can only use this with a computer next to it or download another peripheral that has the Peripheral Proxy.

Besides that, it's a great peripheral, with great features.

I just fixed :)/>
Pyrodogg #6
Posted 24 March 2014 - 02:23 AM
Crashed with CC 1.6 pr 7

version 1.3.11-r15 of this mod


Crash Log: http://pastebin.com/Gd2LVjfT
Dilise_ #7
Posted 24 March 2014 - 06:39 AM
What about events?
When switching a signal of any of insulated conductors, it would be quite good to give out an event, for example "redstone" event.

PS: Sorry for my english. I'am not english speaking.
Hammerboy #8
Posted 19 April 2014 - 06:10 PM
Is an update expected in the next weeks? I need this for CC 1.6, the older version doesn't work for me.
TrovadorUrbano #9
Posted 26 May 2014 - 04:55 AM
Cannot download
"The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later."
skwerlman #10
Posted 27 May 2014 - 12:10 AM
Crashed with CC 1.6 pr 7

version 1.3.11-r15 of this mod


Crash Log: http://pastebin.com/Gd2LVjfT
This mod is for cc 1.5x, not 1.6…


(will not return the analog strength)
Are there plans to add this in a future release? It'd really useful to be able to determine the distance to the source of a redstone signal. (plus it'd allow for analog networking, giving us the ability to send single pulses with up to 16 bytes of info)

EDIT: Also, your d/l link is still throwing a 503…
Edited on 27 May 2014 - 02:19 AM
auri77 #11
Posted 22 June 2014 - 05:46 AM
Oi Jose
MarrusQ #12
Posted 22 June 2014 - 01:02 PM
Cannot download
"The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later."
Same here. The server is 503ing
acces denied #13
Posted 26 June 2014 - 03:11 PM
I hope nobody mind:

I re-uploaded the latest version from this mod © by
joserobjr

of course.

I just did this because the download Link doesn't work.

Anyway, here you go:
https://drive.google.com/file/d/0B1BMWHu8n1hXRzY4dDRJYllxcHM/edit?usp=sharing
sploders101 #14
Posted 27 June 2014 - 03:08 PM
I hope nobody mind:

I re-uploaded the latest version from this mod © by
joserobjr

of course.

I just did this because the download Link doesn't work.

Anyway, here you go:
https://drive.google...dit?usp=sharing
OMG!!! THANK YOU SO MUCH!!! I have been very limited on my system monitors, having them completely covered in redstone :P/> but i found this, thought it would work great, and the link was broken :P/> thanks!
Livewire13 #15
Posted 17 July 2014 - 05:24 PM
Anyone have some example code using this peripheral? I can't get any of the methods to work in either a program or lua prompt. Is there a certain way I need to call them or wrap them?
gtrxconfusion #16
Posted 18 July 2014 - 09:32 PM
How do we use the peripheral? I cant get it to work no matter what i do. just like livewire.
acces denied #17
Posted 19 July 2014 - 08:24 AM
It is working totally fine for me.
I tested it with the lua-console and it response like expected.

pr = peripheral.wrap("right") -- peripheral is on the right
    pr.setBundledOutput("back",colors.white)
    --I call the peripheral and say: "Activate "white" on the back""

You have to use the direction first from your peripheral to wrap, and after this secondly from the Bundledcable or Cable on which side its connected to.
Its work like the standard redstoneAPI from Computercraft.

here the Pictures:
http://imgur.com/a/PqOQw
phoe #18
Posted 24 July 2014 - 08:59 AM
anyone know how am i supposed to use "getBundledInput"?
my code:
pr = peripheral.wrap("bottom")
pr.getBundledInput("back")
after running program i get
input:2 java.lang.NullPointerException

also feed the beast console, returns following log:

2014-07-24 09:54:11 [INFO] [STDERR] java.lang.NullPointerException
2014-07-24 09:54:11 [INFO] [STDERR] at br.com.gamemods.computercraft.integration.projectred.block.TileEntityProjectRedPeripheral.getPoweredColors(TileEntityProjectRedPeripheral.java:73)
2014-07-24 09:54:11 [INFO] [STDERR] at br.com.gamemods.computercraft.integration.projectred.block.TileEntityProjectRedPeripheral.callMethod(TileEntityProjectRedPeripheral.java:169)
2014-07-24 09:54:11 [INFO] [STDERR] at dan200.computer.core.apis.PeripheralAPI$PeripheralWrapper.call(PeripheralAPI.java:122)
2014-07-24 09:54:11 [INFO] [STDERR] at dan200.computer.core.apis.PeripheralAPI.callMethod(PeripheralAPI.java:484)
2014-07-24 09:54:11 [INFO] [STDERR] at dan200.computer.core.LuaJLuaMachine$2.invoke(LuaJLuaMachine.java:304)
2014-07-24 09:54:11 [INFO] [STDERR] at org.luaj.vm2.lib.VarArgFunction.onInvoke(Unknown Source)
2014-07-24 09:54:11 [INFO] [STDERR] at org.luaj.vm2.TailcallVarargs.eval(Unknown Source)
2014-07-24 09:54:11 [INFO] [STDERR] at org.luaj.vm2.TailcallVarargs.arg1(Unknown Source)
2014-07-24 09:54:11 [INFO] [STDERR] at org.luaj.vm2.LuaClosure.call(Unknown Source)
2014-07-24 09:54:11 [INFO] [STDERR] at org.luaj.vm2.LuaClosure.execute(Unknown Source)
2014-07-24 09:54:11 [INFO] [STDERR] at org.luaj.vm2.LuaClosure.onInvoke(Unknown Source)
2014-07-24 09:54:11 [INFO] [STDERR] at org.luaj.vm2.LuaClosure.invoke(Unknown Source)
2014-07-24 09:54:11 [INFO] [STDERR] at org.luaj.vm2.LuaClosure.execute(Unknown Source)
2014-07-24 09:54:11 [INFO] [STDERR] at org.luaj.vm2.LuaClosure.onInvoke(Unknown Source)
2014-07-24 09:54:11 [INFO] [STDERR] at org.luaj.vm2.LuaClosure.invoke(Unknown Source)
2014-07-24 09:54:11 [INFO] [STDERR] at org.luaj.vm2.lib.BaseLib.pcall(Unknown Source)
2014-07-24 09:54:11 [INFO] [STDERR] at org.luaj.vm2.lib.BaseLib$BaseLibV.invoke(Unknown Source)
2014-07-24 09:54:11 [INFO] [STDERR] at org.luaj.vm2.LuaClosure.execute(Unknown Source)
2014-07-24 09:54:11 [INFO] [STDERR] at org.luaj.vm2.LuaClosure.onInvoke(Unknown Source)
2014-07-24 09:54:11 [INFO] [STDERR] at org.luaj.vm2.LuaClosure.invoke(Unknown Source)
2014-07-24 09:54:11 [INFO] [STDERR] at org.luaj.vm2.LuaClosure.execute(Unknown Source)
2014-07-24 09:54:11 [INFO] [STDERR] at org.luaj.vm2.LuaClosure.onInvoke(Unknown Source)
2014-07-24 09:54:11 [INFO] [STDERR] at org.luaj.vm2.TailcallVarargs.eval(Unknown Source)
2014-07-24 09:54:11 [INFO] [STDERR] at org.luaj.vm2.TailcallVarargs.arg1(Unknown Source)
2014-07-24 09:54:11 [INFO] [STDERR] at org.luaj.vm2.LuaClosure.call(Unknown Source)
2014-07-24 09:54:11 [INFO] [STDERR] at org.luaj.vm2.LuaClosure.execute(Unknown Source)
2014-07-24 09:54:11 [INFO] [STDERR] at org.luaj.vm2.LuaClosure.onInvoke(Unknown Source)
2014-07-24 09:54:11 [INFO] [STDERR] at org.luaj.vm2.LuaClosure.invoke(Unknown Source)
2014-07-24 09:54:11 [INFO] [STDERR] at org.luaj.vm2.LuaClosure.execute(Unknown Source)
2014-07-24 09:54:11 [INFO] [STDERR] at org.luaj.vm2.LuaClosure.onInvoke(Unknown Source)
2014-07-24 09:54:11 [INFO] [STDERR] at org.luaj.vm2.LuaClosure.invoke(Unknown Source)
2014-07-24 09:54:11 [INFO] [STDERR] at org.luaj.vm2.lib.BaseLib.pcall(Unknown Source)
2014-07-24 09:54:11 [INFO] [STDERR] at org.luaj.vm2.lib.BaseLib$BaseLibV.invoke(Unknown Source)
2014-07-24 09:54:11 [INFO] [STDERR] at org.luaj.vm2.LuaClosure.execute(Unknown Source)
2014-07-24 09:54:11 [INFO] [STDERR] at org.luaj.vm2.LuaClosure.call(Unknown Source)
2014-07-24 09:54:11 [INFO] [STDERR] at org.luaj.vm2.LuaClosure.execute(Unknown Source)
2014-07-24 09:54:11 [INFO] [STDERR] at org.luaj.vm2.LuaClosure.onInvoke(Unknown Source)
2014-07-24 09:54:11 [INFO] [STDERR] at org.luaj.vm2.LuaClosure.invoke(Unknown Source)
2014-07-24 09:54:11 [INFO] [STDERR] at org.luaj.vm2.LuaThread$State.run(Unknown Source)
2014-07-24 09:54:11 [INFO] [STDERR] at java.lang.Thread.run(Unknown Source)
acces denied #19
Posted 24 July 2014 - 10:47 PM
anyone know how am i supposed to use "getBundledInput"?
my code:
pr = peripheral.wrap("bottom")
pr.getBundledInput("back")
after running program i get
input:2 java.lang.NullPointerException

In this case it works also fine to me… It would be just great to know on which version of Minecraft you run.

I added a few new Images:
http://imgur.com/a/PqOQw

This Plugin is by the way (sadly) not for CC1.6+. I use personally: Project Red 1.6.4-4.3.5.30 and CC1.58.
Edited on 24 July 2014 - 08:49 PM