1 posts
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.
2427 posts
Location
UK
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
957 posts
Location
Web Development
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
132 posts
Location
Florida, USA
Posted 27 March 2015 - 02:49 PM
What kind of ae2 device do you connect? A terminal, a cable, a monitor?
957 posts
Location
Web Development
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
2427 posts
Location
UK
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.