Jump to content




[mc 1.6.x] Openperipheral


1184 replies to this topic

#561 dorky106

  • Members
  • 19 posts

Posted 22 July 2013 - 11:38 AM

How do I get how much liquid is in a Iron/Steel tank?

This is what I have, but it doesnt work.
When I add a side to getTanks, its just a bunch of randoms numbers and letters.
ST = peripheral.wrap("steel_tank_valve_1")
local tableinfo = ST.getTanks
for key, value in pairs(tableinfo) do
  print(key .. " = " .. tostring(value))
end


#562 Thief^

  • Members
  • 29 posts

Posted 22 July 2013 - 11:53 AM

You forgot to put "()" on the end of getTanks(). Without the () you are trying to print the function out, instead of calling it and printing its results!

#563 dorky106

  • Members
  • 19 posts

Posted 22 July 2013 - 11:56 AM

I'm trying with the () and parameters, but I'm just getting random letters and numbers

#564 Mikeemoo

  • Members
  • 732 posts
  • LocationLondon, UK

Posted 22 July 2013 - 12:48 PM

View Postdorky106, on 22 July 2013 - 11:56 AM, said:

I'm trying with the () and parameters, but I'm just getting random letters and numbers

ST = peripheral.wrap("steel_tank_valve_1")
local tankList = ST.getTanks("unknown")
for key, tank in pairs(tankList) do
  for k2, value in pairs(tank) do
    print(k2.. " = " .. tostring(value))
  end
end


#565 dorky106

  • Members
  • 19 posts

Posted 22 July 2013 - 02:08 PM

alright got it all working :D

#566 Lego Stax

  • Members
  • 136 posts
  • LocationThe dark depths of the web

Posted 22 July 2013 - 07:12 PM

The Terminal Glasses are AMAZING! I'm thinking about adding in Terminal Glasses support for my coming OS.

#567 KaoS

    Diabolical Coder

  • Members
  • 1,510 posts
  • LocationThat dark shadow under your bed...

Posted 23 July 2013 - 08:45 AM

rather than a setOrigin(sCorner) command a setScale(xScale,yScale) and translate(x,y) would be amazing so to move the origin to the bottom left you would just say
glass.translate(0,screenHeight)
glass.setScale(1,-1)

although I suppose since we can't get the current screen height without manually checking it and adding it to the code it wouldn't be perfect...

#568 macdude

  • Members
  • 6 posts

Posted 25 July 2013 - 12:20 PM

I get an error when trying to install/run the mod like the following:

Caused by: java.lang.NoSuchMethodError: argo.jdom.JsonNode.getFieldList()Ljava/util/List;
    at openperipheral.common.definition.DefinitionJsonMethod.<init>(DefinitionJsonMethod.java:79)
    at openperipheral.common.definition.DefinitionJsonClass.<init>(DefinitionJsonClass.java:29)
    at openperipheral.common.definition.DefinitionJsonMod.<init>(DefinitionJsonMod.java:25)
    at openperipheral.common.definition.DefinitionManager.load(DefinitionManager.java:26)
    at openperipheral.OpenPeripheral.init(OpenPeripheral.java:167)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at cpw.mods.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:494) 


#569 Russoul

  • Members
  • 14 posts

Posted 25 July 2013 - 01:57 PM

Hey ! I have a little question . How does your remote work ? How did you pass a distanse check ? I thought you were using a fakeplayer but i did not find it in your classes

#570 TorakTu

  • Members
  • 231 posts

Posted 25 July 2013 - 02:22 PM

I just nabbed your OpenPeripherals BETA.. TY TY TY :D

#571 Mikeemoo

  • Members
  • 732 posts
  • LocationLondon, UK

Posted 25 July 2013 - 07:16 PM

View Postmacdude, on 25 July 2013 - 12:20 PM, said:

I get an error when trying to install/run the mod like the following:

Caused by: java.lang.NoSuchMethodError: argo.jdom.JsonNode.getFieldList()Ljava/util/List;
	at openperipheral.common.definition.DefinitionJsonMethod.<init>(DefinitionJsonMethod.java:79)
	at openperipheral.common.definition.DefinitionJsonClass.<init>(DefinitionJsonClass.java:29)
	at openperipheral.common.definition.DefinitionJsonMod.<init>(DefinitionJsonMod.java:25)
	at openperipheral.common.definition.DefinitionManager.load(DefinitionManager.java:26)
	at openperipheral.OpenPeripheral.init(OpenPeripheral.java:167)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:606)
	at cpw.mods.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:494)

Are you trying to install a 1.5.2 mod on 1.6.2 minecraft?

View PostRussoul, on 25 July 2013 - 01:57 PM, said:

Hey ! I have a little question . How does your remote work ? How did you pass a distanse check ? I thought you were using a fakeplayer but i did not find it in your classes

Magic :)

#572 Lord_Spelunky

  • Members
  • 60 posts

Posted 26 July 2013 - 04:03 AM

View PostMikeemoo, on 25 July 2013 - 07:16 PM, said:

View Postmacdude, on 25 July 2013 - 12:20 PM, said:

I get an error when trying to install/run the mod like the following:

Caused by: java.lang.NoSuchMethodError: argo.jdom.JsonNode.getFieldList()Ljava/util/List;
	at openperipheral.common.definition.DefinitionJsonMethod.<init>(DefinitionJsonMethod.java:79)
	at openperipheral.common.definition.DefinitionJsonClass.<init>(DefinitionJsonClass.java:29)
	at openperipheral.common.definition.DefinitionJsonMod.<init>(DefinitionJsonMod.java:25)
	at openperipheral.common.definition.DefinitionManager.load(DefinitionManager.java:26)
	at openperipheral.OpenPeripheral.init(OpenPeripheral.java:167)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:606)
	at cpw.mods.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:494)

Are you trying to install a 1.5.2 mod on 1.6.2 minecraft?

View PostRussoul, on 25 July 2013 - 01:57 PM, said:

Hey ! I have a little question . How does your remote work ? How did you pass a distanse check ? I thought you were using a fakeplayer but i did not find it in your classes

Magic :)
Mikeemoo, there is no way to craft thin wire on 1.6.2 version of open peripheral? or is there not meant to be? if so then I think that is a little under-powered and you have to find it in dungeon chests

#573 Russoul

  • Members
  • 14 posts

Posted 26 July 2013 - 04:04 AM

No ! No magic . I found that . But it's too complicated for me :(

#574 rawritsdan

  • Members
  • 26 posts

Posted 28 July 2013 - 01:29 PM

Does anybody know what the size I should set the terminal glasses box to so it will just cover the screen?

#575 PixelToast

  • Signature Abuser
  • 2,265 posts
  • Location3232235883

Posted 28 July 2013 - 07:55 PM

View Postrawritsdan, on 28 July 2013 - 01:29 PM, said:

Does anybody know what the size I should set the terminal glasses box to so it will just cover the screen?
it depends on the client's windows :(

#576 theoriginalbit

    Semi-Professional ComputerCrafter

  • Moderators
  • 7,332 posts
  • LocationAustralia

Posted 29 July 2013 - 10:46 AM

Hey Mikeemoo,

I've had an idea which would allow for a nice way of adding in multiuser support and allowing us to know the users screen size.

Spoiler

Tell me what you think

— BIT

EDIT: Changed one of the functions, was kinda stupid xD I don't know what I was thinking @ 2 in the morning... much better now...

Edited by theoriginalbit, 29 July 2013 - 10:14 PM.


#577 MudkipTheEpic

  • Members
  • 639 posts
  • LocationWhere you'd least expect it.

Posted 29 July 2013 - 10:58 AM

View Posttheoriginalbit, on 29 July 2013 - 10:46 AM, said:

Hey Mikeemoo,

I've had an idea which would allow for a nice way of adding in multiuser support and allowing us to know the users screen size.

Spoiler

Tell me what you think

— BIT

Oh I'll tell you what I think...

It's....

It's......

Brilliant!

I think this would be a great way to handle multiusers. Maybe a gui_resize event with the user's name as a parameter, sorta like the monitor_resize event?

#578 Thib0704

  • Members
  • 93 posts
  • LocationgetServer().getPlayer("Thib0704").getLocation();

Posted 29 July 2013 - 11:16 AM

View Posttheoriginalbit, on 29 July 2013 - 10:46 AM, said:

Hey Mikeemoo,

I've had an idea which would allow for a nice way of adding in multiuser support and allowing us to know the users screen size.

Spoiler

Tell me what you think

— BIT
That is a GREAT Idea !

#579 Spaceshipable

  • Members
  • 8 posts

Posted 29 July 2013 - 05:21 PM

Hey, I get this error with the most recent version of modular power suits:

http://pastebin.com/jZpA98ks

#580 Spaceshipable

  • Members
  • 8 posts

Posted 29 July 2013 - 05:24 PM

literally just noticed the MPS fix DL - testing now





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users