mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-20 09:59:42 +00:00
INDEXED PROJECT WITH AGENTS.md + IMPORTANT MODERM MIGRATION RESEARCH
This commit is contained in:
1 parent
0833425d57
commit
cfeb300808
18 files changed
+1798
No files matched your search
@@ -0,0 +1,39 @@
|
||||
# platform-api/ — Interface Definitions
|
||||
|
||||
MC-free interfaces consumed by `core/`. Each MC version module provides implementations.
|
||||
|
||||
## Structure
|
||||
|
||||
```
|
||||
kamkeel/npcs/platform/ → PlatformService, PlatformServiceHolder, annotations
|
||||
noppes/npcs/api/ → Entity, item, handler, NBT interfaces
|
||||
noppes/npcs/platform/nbt/ → NBTFactory, NBTIO abstractions
|
||||
```
|
||||
|
||||
## Naming Conventions
|
||||
|
||||
- **Short `I` prefix**: `IMob`, `ILiving`, `IUser`, `INpc`, `IStack`, `IGameWorld`, `IDamage`
|
||||
- **No `Platform` prefix** on interfaces — only `PlatformService` itself uses it
|
||||
- **Scripting API** (`IPlayer`, `IEntity`, `ICustomNpc`) is in the same package but separate concern
|
||||
|
||||
## Key Interfaces
|
||||
|
||||
| Interface | Wraps | Extends |
|
||||
|---|---|---|
|
||||
| `IMob` | Entity | — |
|
||||
| `ILiving` | EntityLivingBase | `IMob` |
|
||||
| `IUser` | EntityPlayerMP | `ILiving` |
|
||||
| `INpc` | EntityNPCInterface | `ILiving` *(planned)* |
|
||||
| `IStack` | ItemStack | — |
|
||||
| `IGameWorld` | World | — |
|
||||
| `IDamage` | DamageSource | — |
|
||||
|
||||
## PlatformService
|
||||
|
||||
Central SPI (`kamkeel.npcs.platform.PlatformService`): NBT factory + I/O, file paths, entity/item/world wrapping, logging, environment queries, scheduling. Access: `PlatformServiceHolder.get()`.
|
||||
|
||||
## Rules
|
||||
|
||||
- **Interfaces only** — no MC imports allowed
|
||||
- `@ClientOnly` / `@ServerOnly` annotations for side-specific contracts
|
||||
- New interfaces follow `I[Thing]` naming — keep names short
|
||||
Reference in new issue
Block a user