19 posts
Posted 21 July 2012 - 01: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
496 posts
Location
New Zealand
Posted 21 July 2012 - 01:57 PM
Your TileEntity class must implement IPeripheral
510 posts
Posted 21 July 2012 - 04: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.
3 posts
Posted 01 August 2012 - 09: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/DanTwoHundred/status/230672377846042624I 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.
2447 posts
Posted 02 August 2012 - 03: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.
997 posts
Location
Wellington, New Zealand
Posted 15 August 2012 - 05:28 AM
Has anyone tried
Bearded Octo Nemesis for this purpose?
(Edit: It deobfuscates a mod)
510 posts
Posted 15 August 2012 - 06: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?
997 posts
Location
Wellington, New Zealand
Posted 15 August 2012 - 07:11 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?
Depends on whether MCP changed the way it works.