Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local meBridge = peripheral.find("meBridge")
- if not meBridge then
- print("ME Bridge not found")
- return
- end
- -- List of mod IDs to export items from (updated list)
- local modList = {
- "advancementframes", "advancementplaques", "ad_astra", "aether", "alexscaves", "alexsmobs", "allurement",
- "ambientenvironment", "ambientsounds", "amendments", "appbot", "aquamirae", "arseng", "ars_creo", "ash_api",
- "autumnity", "bagus_lib", "berry_good", "bcc", "betterdays", "betterf3", "betterjukebox", "betterlily",
- "betterpingdisplay", "biomesoplenty", "blueprint", "boatload", "botania", "botarium", "buzzier_bees", "bwncr",
- "carbonconfig", "carpeted", "carryon", "catalogue", "chalk", "charmofundying", "chat_heads", "cherishedworlds",
- "chunkpregen", "chunksending", "citadel", "citresewn", "clayworks", "clean_tooltips", "cleardespawn", "clickadv",
- "codechickenlib", "configured", "connectivity", "craterlib", "create", "createaddition", "create_jetpack",
- "creativecore", "darkutils", "defaultoptions", "dimdoors", "drawerstooltip", "dusk", "dynview", "eatinganimation",
- "eccentrictome", "ecologics", "eco", "elytraslot", "embeddium", "embeddiumextras", "embers", "enderstorage",
- "enlightened_end", "everycomp", "fairylights", "fallingleaves", "fallingtree", "fancymenu", "farsight_view",
- "farsightedmobs", "fastsuite", "flowerpatch", "fluxnetworks", "forgematica", "fpsreducer", "galosphere",
- "gardens_of_the_dead", "globalpacks", "goblintraders", "guardvillagers", "hauntedharvest", "hearth_and_home",
- "hunters_return", "immersiveengineering", "incubation", "inventoryhud", "inventorysorter", "jadeaddons",
- "jadecolonies", "jeresources", "kiwi", "kleeslabs", "krypton", "kubejs_create", "kubejsarsnouveau", "kubejsdelight",
- "kubejs_botania", "labels", "lapisreserve", "lightoverlay", "littlecontraptions", "littlelogistics", "lodestone",
- "logprot", "lootintegrations", "lootjs", "mafglib", "malum", "mcjtylib", "mekanismadditions", "melody", "mowziesmobs",
- "mutil", "neapolitan", "neat", "nethersdelight", "notenoughanimations", "obscure_api", "oculus", "openpartiesandclaims",
- "paintings", "panoramica", "personality", "nourished_nether", "pigpen", "quark", "quarkoddities", "raised",
- "rechiseledcreate", "recipeessentials", "refinedstorage", "refinedstorageaddons", "rftoolsbase", "ribbits",
- "rightclickharvest", "runelic", "serverconfigupdater", "simplerpc", "sliceanddice", "smoothchunk", "snad",
- "snowrealmagic", "snowundertrees", "sound_physics_remastered", "railways", "storagedrawers", "storageracks",
- "structureessentials", "structure_gel", "sullysmod", "supplementaries", "suppsquared", "tetra", "tetracelium",
- "tetranomicon", "textrues_embeddium_options", "conjurer_illager", "tipsmod", "toofast", "toolstats", "transparent",
- "twigs", "twilightdelight", "twilightforest", "upgrade_aquatic", "valhelsia_furniture", "valhelsia_structures",
- "valhelsia_tweaks", "visuality", "voicechat", "v_slab_compat", "woodworks", "xaeroworldmap", "xaerominimap",
- "xercamusic", "xercapaint", "xnet", "xnetgases", "betterdeserttemples", "betterdungeons", "betterendisland",
- "betterjungletemples", "betterfortresses", "betteroceanmonuments", "betterstrongholds", "zeta"
- }
- -- Utility function to check if a value is in a table
- function table.contains(tbl, element)
- for _, value in pairs(tbl) do
- if value == element then
- return true
- end
- end
- return false
- end
- -- Function to export items in batches
- local function exportAllItems()
- local items = meBridge.listItems()
- if not items then
- print("No items found in ME system.")
- return
- end
- for _, item in pairs(items) do
- if item and item.name then
- local mod = item.name:match("([^:]+)")
- if mod and table.contains(modList, mod) then
- local countToExport = item.count or 64
- while countToExport > 0 do
- local batchCount = math.min(countToExport, 64)
- local success, err = pcall(function()
- meBridge.exportItem({name = item.name, count = batchCount}, "UP")
- end)
- if not success then
- print("Error exporting item " .. item.name .. ": " .. err)
- break
- end
- countToExport = countToExport - batchCount
- end
- end
- else
- print("Invalid item detected, skipping...")
- end
- end
- end
- -- Run the export function continuously
- while true do
- exportAllItems()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement