NEW OPTIMISED MIGRATION_ROADMAP.md

This commit is contained in:
bigguy345 committed 2026-03-15 08:57:42 +02:00
1 parent cfeb300808
commit b8a9de00ab
13 files changed
+711 -548

No files matched your search

+22 -15
View File
@@ -1,32 +1,39 @@
# platform-api/ — Interface Definitions
MC-free interfaces consumed by `core/`. Each MC version module provides implementations.
The scripting API interfaces (`noppes.npcs.api.*`) are being merged into this module.
## Structure
```
kamkeel/npcs/platform/ → PlatformService, PlatformServiceHolder, annotations
noppes/npcs/api/ → Entity, item, handler, NBT interfaces
noppes/npcs/platform/nbt/ → NBTFactory, NBTIO abstractions
kamkeel/npcs/platform/ → PlatformService, PlatformServiceHolder, annotations
kamkeel/npcs/platform/config/ → IConfigProvider
noppes/npcs/api/ → Entity, item, handler, ability, NBT interfaces (from scripting API)
noppes/npcs/platform/nbt/ → NBTFactory, NBTIO abstractions
```
## Naming Conventions
- **Short `I` prefix**: `IMob`, `ILiving`, `IUser`, `INpc`, `IStack`, `IGameWorld`, `IDamage`
- **Use the existing scripting API names as-is**: `IPlayer`, `IEntity`, `IItemStack`, `IWorld`, `ICustomNpc`, `INbt`, etc.
- **NEVER create semantically duplicate interfaces** — no `IUser`, `IStack`, `IGameWorld`, `IMob`. These don't exist and never should.
- **No `Platform` prefix** on interfaces — only `PlatformService` itself uses it
- **Scripting API** (`IPlayer`, `IEntity`, `ICustomNpc`) is in the same package but separate concern
- **MC1710 wrappers**: `[Thing]Wrapper` — `PlayerWrapper`, not `MC1710PlayerWrapper`
## Key Interfaces
## Key Interfaces (actual, from noppes.npcs.api.*)
| Interface | Wraps | Extends |
| Interface | Wraps | Package |
|---|---|---|
| `IMob` | Entity | — |
| `ILiving` | EntityLivingBase | `IMob` |
| `IUser` | EntityPlayerMP | `ILiving` |
| `INpc` | EntityNPCInterface | `ILiving` *(planned)* |
| `IStack` | ItemStack | — |
| `IGameWorld` | World | — |
| `IDamage` | DamageSource | — |
| `IPlayer` | EntityPlayerMP | `noppes.npcs.api.entity` |
| `IEntity` | Entity | `noppes.npcs.api.entity` |
| `IEntityLivingBase` | EntityLivingBase | `noppes.npcs.api.entity` |
| `IEntityLiving` | EntityLiving | `noppes.npcs.api.entity` |
| `ICustomNpc` | EntityCustomNpc | `noppes.npcs.api.entity` |
| `IItemStack` | ItemStack | `noppes.npcs.api.item` |
| `IWorld` | World | `noppes.npcs.api` |
| `INbt` | NBTTagCompound | `noppes.npcs.api` |
| `INbtList` | NBTTagList | `noppes.npcs.api` |
| `IPos` | BlockPos | `noppes.npcs.api` |
| `IDamageSource` | DamageSource | `noppes.npcs.api` |
## PlatformService
@@ -36,4 +43,4 @@ Central SPI (`kamkeel.npcs.platform.PlatformService`): NBT factory + I/O, file p
- **Interfaces only** — no MC imports allowed
- `@ClientOnly` / `@ServerOnly` annotations for side-specific contracts
- New interfaces follow `I[Thing]` naming — keep names short
- New interfaces use existing API names — check `src/api/java/` before creating anything new