blob: eb544af3183365ddcfae56ad895c82972456287d [file] [log] [blame] [raw]
A note to anyone looking to use this API:
This API should now be fairly stable and usable. You can use prefabs and core API classes to create your own galaxies.
Please avoid including interfaces where possible...
If you are creating your own addon you should be relying on Galacticraft:
Use the following steps to allow Galacticraft compilation:
1. Download the dev-deobf (deobfuscated development) version of Galacticraft.
2. Place the jar file somewhere in your workspace, remember the location.
3. In eclipse, right click on your project, click properties->Java Build Path->Libraries->Add External Jars and select the dev jar.
4. Galacticraft will now compile properly.
You can also download the source from github "https://github.com/micdoodle8" and add it to your development source.
Release your addon without any API classes or prefabs. Users with Galacticraft installed will experience no issues.
If you are implementing a few classes for compatibility, or checking inheritance:
Try to use java reflection where performance is not mandatory. Google is your friend for learning reflection.
Create multiple versions of a class implementing one of my interfaces. Check if Galacticraft is installed and invoke the appropriate class.
Crashes will only occur if you reference a class with a missing interface, so call the correct one and you won't have issues.
If you must include interfaces, only include the ones you need and check for updates.