Jump to content




[mc 1.6.x] Openperipheral


  • This topic is locked This topic is locked
1184 replies to this topic

#721 theoriginalbit

    Semi-Professional ComputerCrafter

  • Moderators
  • 7,332 posts
  • LocationAustralia

Posted 05 October 2013 - 09:03 PM

View Postkarelmikie3, on 05 October 2013 - 06:01 PM, said:

sgcraft connecting and disconnecting doesn't seem to work is this a bug or did i just miss something
  • OpenPeripheral version
  • SGCraft version
  • Minecraft version
  • Forge version (including build!)
  • Any other versions of mods that you may think important
  • Any log files (if appropriate)
  • Relevant screenshots are appreciated
  • Pastebin of your code is appreciated


#722 cthulu28

  • New Members
  • 1 posts

Posted 06 October 2013 - 12:18 AM

Using the pushIntoSlot function with 0 as the parameter for max items duplicates the item in the inventory its pushing to. Using version 0.1.11 (the version included with ftb unleashed 1.1.4). Taking the item out of the inventory by hand will cause it to disappear if you try to place it or take another, but automated methods of removing it keep the item and make it fully placeable.

#723 theoriginalbit

    Semi-Professional ComputerCrafter

  • Moderators
  • 7,332 posts
  • LocationAustralia

Posted 06 October 2013 - 12:33 AM

View Postcthulu28, on 06 October 2013 - 12:18 AM, said:

Using the pushIntoSlot function with 0 as the parameter for max items duplicates the item in the inventory its pushing to. Using version 0.1.11 (the version included with ftb unleashed 1.1.4). Taking the item out of the inventory by hand will cause it to disappear if you try to place it or take another, but automated methods of removing it keep the item and make it fully placeable.
Fixed in newer version, not sure which one, but cannot replicate in latest build.

#724 karelmikie3

  • Members
  • 112 posts

Posted 06 October 2013 - 05:22 AM

View Posttheoriginalbit, on 05 October 2013 - 09:03 PM, said:

View Postkarelmikie3, on 05 October 2013 - 06:01 PM, said:

sgcraft connecting and disconnecting doesn't seem to work is this a bug or did i just miss something
  • OpenPeripheral version
  • SGCraft version
  • Minecraft version
  • Forge version (including build!)
  • Any other versions of mods that you may think important
  • Any log files (if appropriate)
  • Relevant screenshots are appreciated
  • Pastebin of your code is appreciated

openperipheral version: 0.2.1
sgcraft version: 0.6.0
mc version: 1.6.4
forge version: 1.6.4-9.11.1.917

addetional info: the special sgcraft don't seem to exist but the inventory methods do

#725 theoriginalbit

    Semi-Professional ComputerCrafter

  • Moderators
  • 7,332 posts
  • LocationAustralia

Posted 06 October 2013 - 05:30 AM

View Postkarelmikie3, on 06 October 2013 - 05:22 AM, said:

openperipheral version: 0.2.1
mc version: 1.6.4
addetional info: the special sgcraft don't seem to exist but the inventory methods do
Ok I would assume that this is because when OpenPeripheral was first ported to 1.6.x there was no SGCraft for 1.6.x, meaning that support for it would have been removed until a build was released. The reason that the inventory interaction works is because anything with an inventory will be detected by OpenPeripheral and allow interaction. I just added an issue for it to remind anyone to add SGCraft support back.

#726 karelmikie3

  • Members
  • 112 posts

Posted 06 October 2013 - 06:29 AM

View Posttheoriginalbit, on 06 October 2013 - 05:30 AM, said:

View Postkarelmikie3, on 06 October 2013 - 05:22 AM, said:

openperipheral version: 0.2.1
mc version: 1.6.4
addetional info: the special sgcraft don't seem to exist but the inventory methods do
Ok I would assume that this is because when OpenPeripheral was first ported to 1.6.x there was no SGCraft for 1.6.x, meaning that support for it would have been removed until a build was released. The reason that the inventory interaction works is because anything with an inventory will be detected by OpenPeripheral and allow interaction. I just added an issue for it to remind anyone to add SGCraft support back.

ok thx

#727 Wojbie

  • Members
  • 631 posts
  • LocationKinda lost

Posted 06 October 2013 - 04:35 PM

Small question - is there a way to determine if OpenPeripherals are installed on server or not by program itself without need of input from player or trying to connect to chest or other block? I kinda have part of code that needs to run differently depending if OpenPeripherals are installed or not.

I mean are there any functions added to computers/turtles itself that i could check for existence or something?

#728 iserbkin

  • New Members
  • 2 posts

Posted 07 October 2013 - 02:08 AM

Hello!

i'm kinda confused about documentation here.
In documentation getInvName() but in game it is getInventoryName(). :D
Also getSizeInventory() but ingame getInventorySize().
Where i can fint the link to the correct documentation...? :unsure:

#729 theoriginalbit

    Semi-Professional ComputerCrafter

  • Moderators
  • 7,332 posts
  • LocationAustralia

Posted 07 October 2013 - 04:02 AM

View Postiserbkin, on 07 October 2013 - 02:08 AM, said:

Hello!

i'm kinda confused about documentation here.
In documentation getInvName() but in game it is getInventoryName(). :D
Also getSizeInventory() but ingame getInventorySize().
Where i can fint the link to the correct documentation...? :unsure:
I'm going to go ahead and assume that you're using a 1.6.x build of OpenPeripheral, all the method names went through a massive rename process to make it easier for "you" the developer to understand what they do better. As of yet there is no official documentation for these methods (that I know of), however you can do the following in-game

1. Turn on the computer
2. Make sure the peripheral is attached to the computer directly or via a network cable (and the modem is on)
3. Open the Lua prompt by typing lua
4. Type the following and press enter peripheral.call("name", "listMethods") replacing name for the side, or remote name (appears in chat) of the peripheral.


You will now have a list of all the methods on the peripheral. If you get a "no such method" then it is not a peripheral that OpenPeripheral interfaces with, but instead a Vanilla ComputerCraft peripheral.

Alternatively you can also do the following
local per = peripheral.wrap("name")
for k,v in pairs(per) do
  print(k, ' = ', v)
end


#730 iserbkin

  • New Members
  • 2 posts

Posted 07 October 2013 - 04:11 AM

Oh thank you my god sir! :D
Already get some methods from peripheral.call("name", "listMethods") and made little help file for me.
thanks again and good day! :lol:

#731 DerKoch

  • Members
  • 19 posts

Posted 07 October 2013 - 08:27 AM

Might be because I still use the version for 1.5.2, but listMethods sometimes doesn't show all available methods! Thus I always use the snippet from the wiki:
for i,v in ipairs(peripheral.getMethods("right")) do print(i..". "..v) end
theoriginalbit's is basically the same.

#732 theoriginalbit

    Semi-Professional ComputerCrafter

  • Moderators
  • 7,332 posts
  • LocationAustralia

Posted 07 October 2013 - 08:37 AM

View PostDerKoch, on 07 October 2013 - 08:27 AM, said:

Might be because I still use the version for 1.5.2, but listMethods sometimes doesn't show all available methods!
It actually does, its just in the 1.5.2 version each method was printed with a new line, some things have more than 19 methods (19 is screen height of a computer), this has been fixed in one of the newer 1.6.4 versions by not printing each method on a new line.

#733 DerKoch

  • Members
  • 19 posts

Posted 07 October 2013 - 10:12 AM

Oooh I guess I got a little confused there, maybe it was the actual documentation on the website that acutually doesn't show all methods. for example: ME Bridge.

Also fixed post above, don't want to spread incorrect facts.

#734 VonHardy

  • New Members
  • 2 posts

Posted 07 October 2013 - 10:37 PM

Hey guys, when retrieving the information from a tconstruct casting basin, it always says that the liquid is iron, even though it is not. Is this a known bug? I can't find anything about it.

#735 theoriginalbit

    Semi-Professional ComputerCrafter

  • Moderators
  • 7,332 posts
  • LocationAustralia

Posted 07 October 2013 - 11:28 PM

View PostVonHardy, on 07 October 2013 - 10:37 PM, said:

Hey guys, when retrieving the information from a tconstruct casting basin, it always says that the liquid is iron, even though it is not. Is this a known bug? I can't find anything about it.
  • OpenPeripheral version
  • Tinkers' Construct version
  • Minecraft version
  • Forge version (including build!)
  • Any log files (if appropriate)
  • Relevant screenshots are appreciated
  • Pastebin of your code is appreciated


#736 VonHardy

  • New Members
  • 2 posts

Posted 08 October 2013 - 05:23 AM

View Posttheoriginalbit, on 07 October 2013 - 11:28 PM, said:

View PostVonHardy, on 07 October 2013 - 10:37 PM, said:

Hey guys, when retrieving the information from a tconstruct casting basin, it always says that the liquid is iron, even though it is not. Is this a known bug? I can't find anything about it.
  • OpenPeripheral version
  • Tinkers' Construct version
  • Minecraft version
  • Forge version (including build!)
  • Any log files (if appropriate)
  • Relevant screenshots are appreciated
  • Pastebin of your code is appreciated

Wow, I feel so stupid. Of course I need to provide more information...
  • Minecraft 1.5.2
  • Forge 7.8.1 build 737
  • TConstruct 1.4.2.1
  • OpenPeripheral 0.1.9
As for the code, here it is: http://pastebin.com/4nXaaXkW
I just output the content of the two tables (one for the basin in the front, and one in the back).

The output of this code is:
Back
rawName: liquidmetal.iron
pressure: 0
amount: 560
capacity: 1000
name: Molten Iron
id: 1480
-------
Front
rawName: liquidmetal.iron
pressure: 0
amount: 144
capacity: 1296
name: Molten Iron
id: 1480

The setup is as follows: http://imgur.com/pHHgsZ8
The back basin has molten glass, and the front one has molten copper.


Edit: In fact, I realize now trying to interact with other blocks that barely any of the blocks from tconstruct are able to give their info correctly (using getTanks on the smeltery also returns Molten Iron, even though it is glass.. )

#737 thislooksfun

  • Members
  • 25 posts
  • LocationBehind you

Posted 09 October 2013 - 10:05 PM

A request: would it be possible to wrap a Detector - Routing from RailCraft and be able to read the ticket in a locomotive? I would really love to be able to do that.

#738 sean222

  • Members
  • 3 posts

Posted 10 October 2013 - 12:37 PM

Hi guys ,I read that in OpenPeripheral is OpenccSensors. But i Cant find what blocks is from openccSensors. I want to scan inventory and get the items ID's. But don't know how. Thanks for reply.

#739 theoriginalbit

    Semi-Professional ComputerCrafter

  • Moderators
  • 7,332 posts
  • LocationAustralia

Posted 10 October 2013 - 06:45 PM

View PostVonHardy, on 08 October 2013 - 05:23 AM, said:

Edit: In fact, I realize now trying to interact with other blocks that barely any of the blocks from tconstruct are able to give their info correctly (using getTanks on the smeltery also returns Molten Iron, even though it is glass.. )
I would suggest trying other directions other than "unknown" otherwise it is a Tinkers' Construct bug since OpenPeripheral uses the one Adapter class to read liquids and it works fine for all other liquids in other mods.

View Postthislooksfun, on 09 October 2013 - 10:05 PM, said:

A request: would it be possible to wrap a Detector - Routing from RailCraft and be able to read the ticket in a locomotive? I would really love to be able to do that.
I'd assume this would be up to the RailCraft developers as to whether it can be done or not (just like the ticket machine).

View Postsean222, on 10 October 2013 - 12:37 PM, said:

Hi guys ,I read that in OpenPeripheral is OpenccSensors. But i Cant find what blocks is from openccSensors. I want to scan inventory and get the items ID's. But don't know how. Thanks for reply.
OpenCCSensors was no longer developed in 1.5.2, but the FTB team jumped the gun by removing OCS in the 1.5.2 versions since OpenPeripheral has only contained a sensor since 1.6.x

#740 MrJeff

  • New Members
  • 1 posts

Posted 10 October 2013 - 10:51 PM

View Posttheoriginalbit, on 10 October 2013 - 06:45 PM, said:


View Postthislooksfun, on 09 October 2013 - 10:05 PM, said:

A request: would it be possible to wrap a Detector - Routing from RailCraft and be able to read the ticket in a locomotive? I would really love to be able to do that.
I'd assume this would be up to the RailCraft developers as to whether it can be done or not (just like the ticket machine).


Somewhat, right? It would take looking at the code and seeing what data you could pull from it? It would be cool if it could happen however. I'd love to be able to set up a train-routing turtle that can make a replacement ticket based on the current destination of the train.

Now if I can figure out how to get a printed ticket out of the machine and stuff it into the train directly. :)





2 user(s) are reading this topic

0 members, 2 guests, 0 anonymous users