[Help Wanted] Data API for API developers

I’ve been away from the development for awhile to deal with school stuff, but in a few weeks I will out of school. That’s when I’ll hopefully be picking up some of the work for the API and implementation developers.

The Data API is really complicated when it comes to how it works in the API and implementation side. Would a connected developer be able to explain the relevant classes and give an idea of how to properly bring the Data API into things (like the Maps API).

@gabizou maybe you could explain?

You should definitely see the Data API proposal,

I’ll let someone else actually explain how to apply this to the Map API (@gabizou?)

What do you want to know?

API side:

An object that can have data implements the DataHolder interface (block, entity, …)

The data classes interfaces itself implement the DataManipulator interface. There are a few helper interfaces that can be extended (for single value data, int data, list data, …).

There are also a few manipulators that do not store a value, like WetData (code example in the docs: http://docs.spongepowered.org/en/plugin/basics/blocks/accessing.html#blockstates).

Many data manipulators are single value data objects returning a cataloged type (e.g. DirtData --> DirtType).

Which data manipulators can be applied to which data holder and how the data is saved is handled by the implementation.

1 Like

I’ve read the API PR but it was hard to understand the proper user then. Thanks for the explanation @boformer that’s exactly what I needed.

1 Like