This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
fataldarkness's profile picture

[1.7.10] CC and Applied Energistics 2

Started by fataldarkness, 26 March 2015 - 12:44 AM
fataldarkness #1
Posted 26 March 2015 - 01:44 AM
So I haven't played any modded minecraft for a while and getting back into it with the Direwolf 20 pack i figured I would get warmed up to AE2 and ComputerCraft again. I remember on one of my old worlds back during AE1 I had my ME system and a computer/monitor display attached, this monitor displayed the percent used inventory of my ME system. Unfortunately I no longer have this world but I feel that the code would no longer work anyways with AE2. That old code used an API to getFreeBytes() / getTotalBytes() *100 and then write it to a monitor. With AE2 however I noticed that the API seems to have changed and neither of those calls exist any longer. I was wondering if any of you knew an alternate way to achieve a display of inventory percent used on a monitor? Please also note that openCCperipheral has getinventory() but it just returns 0, even when connected directly to the ME core.
Lupus590 #2
Posted 26 March 2015 - 08:02 AM
try this code with the AE2 device attached to the computer, it will print out all of the methods that you can call on the AE2 device.

local side = "right" --# or left up down front back
peripheral.wrap(side)
local i, v
for i,v in ipairs(p.getMethods(side)) do
   print(i..". "..v)
end

edit: bug fix in code
Edited on 27 March 2015 - 07:06 AM
HPWebcamAble #3
Posted 26 March 2015 - 11:50 PM
If the methods can't be displayed on one page, you can use my SUPER overcomplicated Get Methods program!

To clarify, it is complicated *behind the scenes*
It is super easy to use though

Pastebin:
http://pastebin.com/sKLqTGrM
AssossaGPB #4
Posted 27 March 2015 - 02:49 PM
What kind of ae2 device do you connect? A terminal, a cable, a monitor?
HPWebcamAble #5
Posted 27 March 2015 - 06:08 PM
What kind of ae2 device do you connect? A terminal, a cable, a monitor?

Try all of them, until you find one with the functions you are looking for
Lupus590 #6
Posted 27 March 2015 - 06:29 PM
I'd think that an empty ME interface would work, this is based on how AE interacts with other mods though.