SpongeDocs
SpongeDocs copied to clipboard
Information for Mod developers to add compatibility?
So Sponge is obviously being designed with mod compatibility in mind. We should create guides for mod developers to add APIs to access their mod features, data, etc through Sponge.
Guides for:
- DataManipulators. this would be a major one - the ability for mods to add manipulators for their custom entities, items and blocks, or adding support for existing manipulators. Should also talk about ideals (abstract similar data together, not all of an entities metadata, for example)
- BlockType/ItemType/etc. Registering types in the registry, as well as builders
- Inventories. Another big section that mods change, and how they should support our Inventory Query system.
There's probably more that I've forgotten as well!
Worldgen,
World modify on behalf of entities / players / machines
Inventory Transfer
Attack / damage sources / tracking.
properties,
pvp control
projectile and machine owners
entity owners where applicable.
Off-world storage.
From the Best Practices doc (WIP), there is this (may be outdated and not definitive): How should devs approach using Forge or NMS classes? Mods that add to the SpongeAPI using internals will have to specifically write an API that isn’t relying on underlying Minecraft code to be usable by Sponge plugins. However, plugins can be created that load separate “compatibility” modules to interact with the underlying implementation (of which there are two major implementations, Sponge for Forge, and SpongeVanilla). Are there any specific areas that will be left out of the API, that will necessitate invoking Forge/NMS? Anything to do with intercepting packets, adding NPC’s, introducing custom items/blocks/entities/etc.
A new section on Mod interactions with Sponge API would be a useful addition. The Plugins section would be appropriate, next to Basic and Advanced. Presumably this will only cover Forge mods? Whomsoever wants to write something helpful to get this started, please accept this Green Light.