Loading...
Beta Modpages Unclaimed

Open Computers Refined Storage Driver

OpenComputers + Refined Storage = <3

0 Likes
619873 Downloads
Created by davenonymous

Description

ocrsdriver

OpenComputers + Refined Storage = ❤️

Allows OpenComputers to access Refined Storage grid nodes via Adapters. This is for Minecraft 1.10.2. Refined Storage for 1.11.2 has this functionality included by default.

Known Issues

  • This is currently unrestricted, i.e. you can export items and fluids using just a cable - and fast.

Available Commands

Method Description
isConnected() Returns whether the grid node is connected to a network
getEnergyUsage() Returns the energy usage of the whole network in RS/tick
getItems() Returns a list of all itemstacks stored in the network
getItem(itemstack, cmpMeta, cmpNbt, cmpOre) Returns a stack in the network matching the given itemstack
extractItem(itemstack, amount, side) Extracts the given amount of itemstack to the specified side and returns the number of transfered items.
getFluids() Returns a list of all fluid stacks stored in the network
getFluid(fluidstack) Returns a stack in the network matching the given fluidstack
extractFluid(fluidstack, amount, side) Extracts the given amount of fluid to the specified side and returns the amount of millibuckets transfered.
getTasks() Returns a list of crafting tasks the system has currently queued
getPatterns() Returns a list of all crafting patterns in the network
hasPattern(itemstack) Returns true if the system has a pattern for the given itemstack
getMissingItems(itemstack, amount) Returns a list of all items missing to craft the given itemstack in the given amount
craftItem(itemstack, amount) Requests crafting of the specified item in the specified quantity
cancelCrafting(itemstack) Cancels all crafting operations for the given itemstack and returns the number of cancelled tasks

Examples

Drop all items you got more than 8192 of

Place a Trash Can below an interface connected to an OpenComputers Adapter.

local component = require("component")
local sides = require("sides")

local rs = component.block_refinedstorage_interface

local limit = 8192
local side  = sides.down

for i,stack in ipairs(rs.getItems()) do
	while(stack.size > limit) do
		local dropped = rs.extractItem(stack, stack.size - limit, side)
		stack.size = stack.size - dropped
		if(dropped < 1) then
			break
		end
	end
end

Keep 64 torches and levers in your crafting system

Don't forget to teach a crafter the recipe for torches and levers

local component = require("component")
local sides = require("sides")

local rs = component.block_refinedstorage_interface

local targetAmount = 64
local items = {
    {name = "minecraft:torch"},
    {name = "minecraft:lever"}
}

while(true) do
    for i,stack in ipairs(items) do
        if(rs.hasPattern(stack)) then
            local rsStack = rs.getItem(stack)

            local toCraft = targetAmount;
            if(rsStack ~= nil) then
                toCraft = toCraft - rsStack.size
            end

            if(toCraft > 0) then
                rs.craftItem(stack, toCraft)
            end
        else
            print("Missing pattern for: " .. stack.name)
        end
    end

    os.sleep(5)
end


AD Become Premium to remove Ads!

What means Verified?

  • Compatibility: The mod should be compatible with the latest version of Minecraft and be clearly labeled with its supported versions.
  • Functionality: The mod should work as advertised and not cause any game-breaking bugs or crashes.
  • Security: The mod should not contain any malicious code or attempts to steal personal information.
  • Performance: The mod should not cause a significant decrease in the game's performance, such as by causing lag or reducing frame rates.
  • Originality: The mod should be original and not a copy of someone else's work.
  • Up-to-date: The mod should be regularly updated to fix bugs, improve performance, and maintain compatibility with the latest version of Minecraft.
  • Support: The mod should have an active developer who provides support and troubleshooting assistance to users.
  • License: The mod should be released under a clear and open source license that allows others to use, modify, and redistribute the code.
  • Documentation: The mod should come with clear and detailed documentation on how to install and use it.

AD Become Premium to remove Ads!

How to Install

1

Download Forge & Java

Download Forge from the offical Site or here. If you dont have Java installed then install it now from here. After Downloading Forge you can run the file with Java.

2

Prepare

Lounch Minecraft and select your Forge istallation as Version this will create a Folder called Mods.

3

Add Mods

Type Win+R and type %appdata% and open the .minecraft Folder. There will you find your Folder called Mods. Place all Mods you want to play in this Folder

4

Enjoy

You are now Ready. Re-start your Game and start Playing.

More Mods like this

Botania

An innovative natural magic themed tech mod

Thermal Expansion

Expanding Minecraft Thermally! A server-friendly and content-rich blend of magic and technology!

Mekanism

High-tech machinery, powerful energy generation, fancy gadgets and more. Now on Curse!

Industrial Foregoing

A collection of machines to make your minecraft builds easier to automate

Flux Networks

Wireless Energy Networks, compatible with FE/EU/RF/TESLA/AE

Create

Aesthetic Technology that empowers the Player