Coder Social home page Coder Social logo

ae-autocrafting-request-system's Introduction

Description

The AE Autocrafting Request System is a system that is used to automatically request crafting jobs for specific items. The system itself comprises of multiple different components: a ComputerCraft or CC:Tweaked computer, redstone conduits from EnderIO, and ME export buses with redstone and autocrafting cards.

However, it should be noted that this system was built within the FTB Infinity Evolved modpack for MC 1.7.10. Which at the time did not have a way to submit a crafting request directly to the AE system using a ComputerCraft or CC:Tweaked computer.

Setup

Installation

Install the program by copying and pasting the code from startup in this repository into the file of the same name on your computer. Relative to the minecraft directory, the location where the in-game files for your computer are stored is ~/minecraft/saves/world_name/computer/num_index_of_computer. I would tell you to use the pastebin command within the computer itself, however it no longer works as the pastebin API has since changed. That said, the startup script serves to automatically update AE-Autocrafting-Request-System.lua when programs/AE-Autocrafting-Request-System.lua is edited on the master branch.

If on a server, you'll have to download the startup script via the built-in HTTP api. As far as I know, you can only paste one line at a time within the computer, which makes the following the easiest way to download the script if you're on a server.

Open a lua shell with the lua command. Then type the following:

file = io.open("startup","w")

io.output(file)

f = http.get("https://raw.githubusercontent.com/ReallySecureShell/AE-Autocrafting-Request-System/master/startup").readAll()

io.write(f)

io.close()

Now restart the computer and the startup script will download the main script.

Configuring

When the script first executes it will generate a configuration file resources.config (or disk/resources.config if a disk-drive is present) and ask you to add some enteries.

The configuration can look a little complex, so I'll use one of my configurations as an example:

# ID,DMG,lowThreshhold,COLOR,SIDE,PULSE
#
# ID -            The ID of the item. 
#                 This is a string.
#
# DMG -           The damage value of the item.
#                 This is an int.
#
# lowThreshhold - The minimal amount the AE network will
#                 try to keep within the system.
#                 This is an int.
#
# COLOR -         The channel color the redstone output
#                 will be outputted on. This is used by
#                 bundled cables to transmit multiple
#                 redstone signals on the same wire.
#                 This is an int.
#
# SIDE -          The side of the computer that will emit
#                 a redstone signal on COLOR. 
#                 This is a string.
#
# PULSE -         Controls whether or not the redstone
#                 signal will pulse in 5 second intervals.
#                 This is to mitigate a bug in AE where
#                 a redstone signal appears to "halt"
#                 the system.
#                 This is a boolean.
# 
# In-order for the changes in this configuration file to
# take effect, the system will need to be rebooted.


# Charged Certus Quartz
appliedenergistics2:item.ItemMultiMaterial,1,100,16384,left,true

# Fluix Crystal
appliedenergistics2:item.ItemMultiMaterial,7,100,8192,left,true

# Logic Processor
appliedenergistics2:item.ItemMultiMaterial,22,100,4096,left,true

# Calculation Processor
appliedenergistics2:item.ItemMultiMaterial,23,100,2048,left,true

# Engineering Processor
appliedenergistics2:item.ItemMultiMaterial,24,100,1024,left,true

# Smooth Stone
minecraft:stone,0,100,32768,left,false

Also, you might of noticed that the value for color is provided as an integer. This being the case here is the full list of possible colors:

# Colors
white     1
orange    2
magenta   4
lightBlue 8
yellow    16
lime      32
pink      64
gray      128
lightGray 256
cyan      512
purple    1024
blue      2048
brown     4096
green     8192
red       16384
black     32768

Setting up the ME network

The computer will output a redstone signal on a specific redstone channel when the item configured for that channel falls below the specified minimum. We connect redstone conduits to the ME export buses to supply them with a redstone signal. The export buses are told to only export when a redstone signal is provided, and to always submit a crafting request when exporting. Additionally, each interface along the redstone conduit will need to be configured for a specific redstone channel.

An example of an autocrafting request system:

An example of an export bus configuration:

To connect the computer to the ME network, place it next to an ME cable:

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.