Jump to content
  • Sky
  • Blueberry
  • Slate
  • Blackcurrant
  • Watermelon
  • Strawberry
  • Orange
  • Banana
  • Apple
  • Emerald
  • Chocolate
  • Charcoal
Dustpuppy

How to export items from ME network

Recommended Posts

Hi,

here is an easy way to export items from the applied energistics 2 network into a chest or other inventory.

 

First you need to connect an adapter to an ae2 interface block and the inventory where to you want to export on the same interface block.

(see picture)

 

Then it's easy to handle the export over the interface.

local component = require("component")
local meInterface = component.me_interface 
local ser = require("serialization")

local selection = "minecraft:dirt"			-- The item to export
local amount = 10					-- Max 64 (1 stack)

local directionChest = "UP"				-- Where the chest is connected to the interface

local fp = {}                                           -- Table for the fingerprint
local itemList = meInterface.getAvailableItems()	-- Get a list of all items in me-network

for number,item in pairs(itemList) do			-- Go over the list of items
  if item.fingerprint.id == selection then		-- Selected item found
    fp = item.fingerprint				-- Set the fingerprint
    break						-- Stop the loop
  end
end

print("Exporting " .. amount .. " of " .. selection .. " to chest (" .. directionChest .. ")")
meInterface.exportItem(fp, directionChest, amount, 0)	-- Export items

Have fun

 

post-2821-0-14146800-1470748867_thumb.png

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use and Privacy Policy.