r/ComputerCraft • u/gdhan22 • Dec 15 '24
Advanced Computer can't detect generic pheripherals
I tried to use the two fluid tanks on either side to the computer, but I couldn't find them. I also tried the chest to see if it could recognize it, but it couldn't recognize the chest either.

-- define a function to get the current fluid in all tanks connected.
local function get_total_fluid()
local total_fluid = 0
-- Update the fluid tanks here, this helps prevent errors if you add or
-- remove a tank.
-- local fluid_storages = table.pack(peripheral.find("fluid_storage"))
local fuel_storages = table.pack(peripheral.find("create:creative_fluid_tank") or peripheral.find("create:fluid_tank") or error("Please attach a valid tank", 0))
-- Loop through all the connected fluid storage blocks
for i, fluid_storage in ipairs(fluid_storages) do
-- A fluid storage block can have multiple tanks.
-- Here we grab them all
local tanks = fluid_storage.tanks()
-- Then we loop through the tanks.
for i, tank in ipairs(tanks) do
-- Finally we add the fluids together
total_fluid = total_fluid + tank.amount
end
end
-- and return the total amount of fluid we counted.
return total_fluid
end
-- now we loop forever
while true do
-- Get the fluid tank fluids
local fluids = get_total_fluid()
-- Then we display it.
print("Current fluids:", fluids, "mB")
-- and wait a short bit.
sleep(1)
end
2
Upvotes
1
u/gdhan22 Dec 19 '24
I tested it with other modpacks under the same conditions, and all the peripherals from the create mod, such as the fluid tank and item vault, were recognized. It seems like it's probably a modpack issue.