Jump to content




how do i test my pheripheral?


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

#1 zwap1233

  • Members
  • 37 posts

Posted 21 July 2012 - 12:22 PM

i have 2 questions.
1. like the title says how do i test my pheripheral? after making the class and adding the ccapi and instaling forge(that went all well) do i just start recompile.bat or do i first have to remove the api? and is there a easier way?

2. what class must implement the IPheripheral iterface? the basemod class or the block class i made?

zwap1233

#2 Xtansia

  • Members
  • 492 posts
  • LocationNew Zealand

Posted 21 July 2012 - 12:57 PM

Your TileEntity class must implement IPeripheral

#3 Xfel

    Peripheral Designer

  • Members
  • 515 posts

Posted 21 July 2012 - 03:42 PM

You need the api classes exactly while compiling. Without them, it won't work.
If you use eclipse, you can run it without bothering with the scripts. However, you could only test your block's appearance and behavior without computers around, not more.

To test properly, you will of course need computercraft around too. So, you have to reobfuscate it and put it into your local minecraft installation. That is a lot of work, and you can't properly debug obfuscated code, but it's the only way. You might consider writing a batch script for recompiling, reobfuscating and installing the mod files.

#4 blystad

  • New Members
  • 3 posts

Posted 01 August 2012 - 08:16 PM

Actually, there is a 2nd way, and it is possible to do it with debugging, but it requires a lot of work before/unless Dan200/Cloudy releases a open source version of ComputerCraft. It involves decompiling the ComputerCraft files, and then deobfuscating them, similar to what we have to do at the moment with Minecraft.

Decompiling them is easy, "jd gui" can do that. Deobfuscating is (a lot) more work though. Similar to what MCP is currently doing with Minecraft, it has to be done on these files as well, but only on those functions that are communicating directly with Minecraft functions, or refering to Minecraft items. Dan200, have said he doesn't mind this for the sake of having sane development, https://twitter.com/...672377846042624

I sincerily do hope it will be released as an open source mod sooner rather then later, and I have voiced this with Dan200, but he doesn't feel ready for it just yet. If it was open source, it would be very easy to make periphials and testing them, as you could just add the source to your Eclipse project, and it would work. I've done this already with Not Enough Items and a few other mods.

#5 Cloudy

    Ex-Developer

  • Members
  • 2,543 posts

Posted 02 August 2012 - 02:17 AM

That's always an option - you can get MCP to deobsfucate things for you. Just don't expect any support from us if using that method.

#6 immibis

    Lua God

  • Members
  • 1,033 posts
  • LocationWellington, New Zealand

Posted 15 August 2012 - 04:28 AM

Has anyone tried Bearded Octo Nemesis for this purpose?

(Edit: It deobfuscates a mod)

#7 Xfel

    Peripheral Designer

  • Members
  • 515 posts

Posted 15 August 2012 - 05:44 AM

Just done. Well, it seems to work. I didn't test it to full extend, however, as I currently have a working setup. Would this work for 1.3.1, too?

#8 immibis

    Lua God

  • Members
  • 1,033 posts
  • LocationWellington, New Zealand

Posted 15 August 2012 - 06:11 AM

View PostXfel, on 15 August 2012 - 05:44 AM, said:

Just done. Well, it seems to work. I didn't test it to full extend, however, as I currently have a working setup. Would this work for 1.3.1, too?
Depends on whether MCP changed the way it works.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users