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

Need help with OpenPeripherals

Started by Splinti, 20 June 2015 - 12:03 PM
Splinti #1
Posted 20 June 2015 - 02:03 PM
Hello,

I've started to work with ComputerCraft in the FTB Infinity pack.
In the Program I need to get the mob-type which is in the safari-net. In the DW20-1.6-Pack it was like this:


function getCurrMob()
data = s.getStackInSlot(1)
if data then
  currMob = data.captured
else
  currMob = "None"
end
end

But the key captured doesn't exist anymore.
When I try to see the keys that are available I get this:

display_name | Safari Net (Reusable)
raw_name | item.mfr.safarinet.reusable
dmg | 0
max_dmg | 0
qty | 0
max_size | 1
id | MineFactoryReloaded:safarinet.reusable
nbt_hash | e51e8084a1604e5b07dff861ee6b551d
ore_dict | table: 185dfd4
name | safarinet.reusable
mod_id | MineFactoryReloaded
After that I thought that the information could just be inside the "ore_dict" but when I try to search inside it like this:

for v,k in pairs(data.ore_dict) do
  print(v.." | "..tostring(k))
end
I just get nothing…

Is OpenP somewhat broken or am I missing something ?
I also can't find any documentation on that …
flaghacker #2
Posted 20 June 2015 - 05:23 PM
It's no longer possible to read the captured mob directly, but you could manually rename your safari nets using an anvil to the mob name and use the display_name in your program.
Edited on 20 June 2015 - 03:24 PM
Splinti #3
Posted 20 June 2015 - 05:31 PM
Okay thanks, sad that they took that out :/