Railcraft

Railcraft

34M Downloads

[1.10.2] Create a separate API for Sponge plugins

liach opened this issue ยท 12 comments

commented

An API of Railcraft that depends on Sponge API would increase the compatibility between Railcraft and Sponge plugins. Sponge developers have already created such an API for Thaumcraft: https://github.com/gabizou/ThaumicSpongeAPI
And the implementation is here:
https://github.com/gabizou/ThaumicSponge

commented

wow, that was not the kind of dependencies that was expected from Sponge... It was supposed to be forge mod, that would talk to mods true forge..

commented

Why is this necessary?

commented

@JoneKone No. Sponge plugins are different from SpongeForge mod. Sponge plugins depend on SpongeAPI instead of on SpongeForge directly. Just like you compile Bukkit plugins with Bukkit and CraftBukkit, but rarely with NMS (Sponge is intended to make plugins use no vanilla/MCP code at all).

commented

@CovertJaguar It allows Modders who do not want to write a complex forge mod in order to modify some Railcraft behaviors to write some easily understood and clean code. This allows those plugin coders to manipulate the data or some other attributes of minecarts, instead of looking into the complex NBT tags. Also, there can be a better handle of other items, entities, or enchantments. With this hook, plugin makers can access the instance of Railcraft stuff. Without the hook, those instances of items, entity types, and enchantments would still be present, but modders cannot identify them that easily.

commented

If you do not want to do this, I believe I am able to. Since this API does not involve in rendering or other complex client stuffs, it is easy to implement.

commented

These plugins can't access code directly?

commented

They are supposed to be depending on an API instead of Minecraft code, because if they depend on Minecraft code, the code may vary between versions, but the API may not vary between Minecraft versions.

commented

But it's not Minecraft code they'd be depending on, it would be Railcraft code.

commented

Well yes, Railcraft code changes a lot between Railcraft or Minecraft versions, so there comes such an API... It also helps when some sponge plugin wants to support Railcraft only if Railcraft and Forge are present.

commented

The api doesn't usually.

commented

https://docs.spongepowered.org/master/en/about/history.html

Several goals should be achieved with the new API:
consistency
stability across Minecraft updates
ease of use
compliance with the Mojang EULA
protection against DMCA takedowns

commented

I believe we've had a throughout discussion on this on Discord, leading to a solution.

"A Sponge jobs plugin can allow users to have more output or shorter process time if they have a high railcraft job level"