Stability and versioning
Stability markers
Section titled “Stability markers”Every public type of the API carries one of three annotations from
net.night.ipreforged.api.annotation:
| Annotation | Promise |
|---|---|
@Stable |
Binary compatible within a major version. Anything that will be removed is first marked @Deprecated for at least one minor version. |
@Experimental |
May change in any release, including patch releases. Feedback is welcome. |
@Internal |
Public only for technical reasons, for the mod’s own use. Do not call it. |
The annotations are kept in the class files (not at runtime), so tools that inspect bytecode can see them.
In API level 1:
| Type | Marker |
|---|---|
ReforgedApi, PortalService |
@Stable |
ApiEvent, TeleportEvents, PortalEvents |
@Stable |
RenderViews, ViewInfo |
@Stable (except RenderViews.enter and exit, which are @Internal) |
PortalBuilder |
@Experimental |
The engine types the API hands out (PortalSnapshot, Warp, the shapes and so on, see
Geometry types) are part of the API but carry no marker yet.
Classes outside the API packages (net.night.ipreforged.impl, .client, .server, .mixin and
the others) are internal even when they are public.
API level
Section titled “API level”ReforgedApi.API_VERSION is the level your code was compiled against, and
ReforgedApi.get().apiVersion() the level of the installed mod. The level goes up with every
backwards-compatible addition. A breaking major version of the API would start over in a new
namespace instead of changing the existing one.
The mod itself follows semantic versioning.
What comes next
Section titled “What comes next”The API grows with the mod’s roadmap:
| Phase | Planned additions |
|---|---|
| 1 | Group handles (edit and remove from code), finding portals in an area, raycasts through portals |
| 2 | Chunk-loading tickets through portals, seamless teleport from code |
| 3 | Gate recipes in code and datapacks, frame events, custom triggers and shape generators |
| 4 | Client view events (begin and end of a view), per-dimension client state |
| 5 | Compatibility interfaces for terrain renderers, shader packs, level-of-detail and instancing mods |
Remote calls are part of level 1, marked @Experimental while the
first releases collect feedback.
