Can't get os.pullEvent("isort_item") to fire on interactive sorter
codestripper opened this issue · 3 comments
Description
When an item is inserted into the interactive inventory the "isort_item" event is not fired
Steps to Reproduce
- Place down computer
- Place sorter to the rear
- Use the following code:
sorter=peripheral.wrap("back")
while true do
print("Waiting for Event...")
local event, item, amount = os.pullEvent("isort_item")
print("Event has fired")
end - Put an item into the sorter's inventory
Expected behavior: The program should print the event, param, and amount, variables when the event fires.
Actual behavior: The program keeps running as the event is never detected
Version affected: Peripherals++ v1.3.6, FML v7.99.30.1492
Additional Information
Added this mod to the Tekkit Legends pack. Thought it might be because I wasn't using CC v1.75 so I tried switching and still didn't work.
Sorry for being really late with this reply, but I'm leaving this here for other to find.
In case you want to use the Interactive Sorter the samt way that you could in Misc. Peripherals, a.k.a os.pullEvent("isort_item")
, that won't work here.
Namely, the event has changed name. Now the event is called itemReady
, so instead of os.pullEvent("isort_item")
you now call os.pullEvent("itemReady")
.
The event won't contain any data also, so you need to do a <peripheralName>.analyze()
to get the data.
I myself do
sorter = peripheral.wrap("left")
while true do
os.pullEvent("itemReady")
itmData =sorter.analyze()
print(itmData.stringId)
end
The table ìtmData` contains this example output:
Name | data | type |
---|---|---|
stringId | minecraft:cobblestone |
string |
name | Cobblestone |
string |
oreDictionaryEntries | {"cobblestone"} |
array |
meta | 0 |
int |
numericalId | 4 |
int |
amount | 64 |
int |
Hope that this clears things up for some people!
Well that would have been nice to know about 7 months ago lol. But really good to know in case I ever play with the mod again. Thank you for the solution!