Jump to content




[OpenPeripheral] pushItem/pullItem not working


  • You cannot reply to this topic
7 replies to this topic

#1 negamartin

  • Members
  • 46 posts

Posted 03 June 2014 - 11:31 PM

Okay, so I've got a chest on the west side of a computer, and one on the east.
The computer's front is facing to the south, so right is the chest on the east.
Like this:
Attached Image

I put a sign in the top-left slot in the right chest and i dis in the lua program:
c=peripheral.wrap("right"); --East chest
c.pushItem("west",1);
The pushItem doesn't return anything and the sign doesn't move to the left(west).
Btw, peripheral.getType("right") and peripheral.getType("left") both return "container_chest"

It should move it, right?
c.getStackInSlot(1) returns:
{
id = 323,
name = "Sign",
maxdmg = 0,
rawName = "item.sign",
dmg = 0,
maxSize = 16,
ench = {},
qty = 1
}


EDIT: BTW, pushItem("left",1) just says "invalid direction"

Attached Thumbnails

  • Attached Image: 2014-06-03_19.16.09.png

Edited by negamartin, 03 June 2014 - 11:32 PM.


#2 Lyqyd

    Lua Liquidator

  • Moderators
  • 8,465 posts

Posted 03 June 2014 - 11:49 PM

The push/pull directions are relative to the inventory being manipulated, not the computer.

#3 apemanzilla

  • Members
  • 1,421 posts

Posted 04 June 2014 - 12:57 PM

Also, they can't push "through" computers, only to inventories next to them. So even the right direction still wouldn't work.

#4 negamartin

  • Members
  • 46 posts

Posted 04 June 2014 - 08:48 PM

Yay, it works!
However, on double chests doing something like this:

DDC

D=Double Chest Block C=Single Chest

And pushing an item from the double chest to the single chest just moves the item in the double chest to slot #2 if the item was initially in slot #1 and anywhere else it moves to the slot #1. It never changes chest, not even changes to slot #28, which should be the double chest on the right...

Edited by negamartin, 04 June 2014 - 09:01 PM.


#5 theoriginalbit

    Semi-Professional ComputerCrafter

  • Moderators
  • 7,332 posts
  • LocationAustralia

Posted 05 June 2014 - 01:18 AM

okay that could be a bug. what version of OpenPeripheral are you using?

#6 negamartin

  • Members
  • 46 posts

Posted 05 June 2014 - 01:33 AM

OpenPeripheralCore 0.4.0
and just in case it matters, I've got OpenPeripheralAddons 0.1.4

#7 theoriginalbit

    Semi-Professional ComputerCrafter

  • Moderators
  • 7,332 posts
  • LocationAustralia

Posted 05 June 2014 - 02:25 AM

okay thank you. I took a look into our code and I think I've discovered the problem, I've made an issue here to see if one of the other guys knows the best way to fix it as I'm not completely sure. Keep an eye on that issue for a resolution :)

#8 negamartin

  • Members
  • 46 posts

Posted 05 June 2014 - 04:13 AM

Okay, I'll keep an eye





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users