Jump to content


theoriginalbit's Content

There have been 2 items by theoriginalbit (Search limited from 10-February 22)


By content type

See this member's

Sort by                Order  

#276556 IC2 Reactor Control Help (OpenPeripherals)

Posted by theoriginalbit on 31 March 2018 - 08:49 PM in Ask a Pro

In addition to what SquidDev said, changing a Redstone signal is also persistent change; so once you've turned it on it will stay on until you turn it off. This is also why you're not seeing it change when the heat does. For this you can use the condition you've used to check if the heat is ok to update the Redstone state, which would look like this:

local nuke = peripheral.wrap("nuclear_reactor_0")
while true do
    local tooHot = nuke.getHeat() >= 7000 --# we've inverted the condition here so that when it is above 7000 the value is 'true' resulting in the Redstone signal turning on
    rs.setOutput("right", tooHot)
    sleep(0.1)
end



#276524 Setting up the CC development environment [Windows]

Posted by theoriginalbit on 30 March 2018 - 08:29 AM in Tutorials

View PostEveryOS, on 25 January 2018 - 05:58 PM, said:

Now that CC is opensource, we can edit it, granted we set up the environment. Sadly, I did not see a setup.md file, so I had to figure out how to get it set up myself.

Technically, we can set this up on eclipse, but it is much easier just to use IntelliJ.

First, you will need to download the following files:
IntelliJ
Java 8 (You may need to uninstall Java 9)
Java 8 SDK - You should choose the version that matches your Java
git bash

Run each of those, and wait for them to install.
Next, open git bash and run the following:
git clone https://github.com/d...mputerCraft.git

When it is done, leave it open, we will use it again.

Open IntelliJ and choose 'import project'. Navigate to the computercraft folder and choose 'build.gradle'
I think it might ask you where your SDK is, if it is 64x it will be in Program Files/Java, labeled jdk1.80_161 (or whatever patch you have)
It will start syncing, when the bottom window says it is done syncing, close IntelliJ.
Now you must type ./setup.bat into git bash
When that finishes, open IntelliJ again.
Goto file>project settings>project. Change the project language level from 9 to 8.
Goto Run>Edit Configs, goto new (+)>Application.
In name, type Forge_Client
In Main Class, type GradleStart
In vm options, type -Xms500m
In module dropdown, choose ComputerCraft_main
In Jre, choose default (Maybe it was here that it made you choose the JDK? just look at instructions above)
Click Apply, then run
TADA

CC source is in src folder, you can edit it.

Tell me if I made a mess up.

Correction: set module to computercraft_main, not computercraft. Updated in instructions.

Just run the setup.bat file on Windows, and the setup.sh file on macOS/Linux after you've cloned the repo. It will perform all the IntelliJ setup for you.