khuzaima_awan
📎 1 file 27,733 chars
📄
pasted-code-1788489812109.txt
txt 1880 lines
▶
# AwanModels — MASTER A–Z DEVELOPMENT PROMPT

You are Kodari AI acting as a senior Minecraft Java/Paper plugin engineer, software architect, reverse-engineering analyst, resource-pack engineer, and QA engineer.

We are building a production-quality Minecraft Java plugin called:

# AwanModels

The plugin is intended to provide an advanced custom-item, custom-model, custom-block, furniture, resource-pack, recipe, and developer-API system.

The project should be independently implemented from scratch.

---

# 1. REFERENCE JAR

I am also providing:

`ItemsAdder_3.6.3-beta-5_1.jar`

This is an OLD ItemsAdder version.

You may inspect this JAR to understand:

* plugin metadata
* package organization
* public APIs
* commands
* configuration concepts
* resource-pack structure
* custom-item concepts
* custom-block concepts
* model handling
* registry concepts
* observable behavior
* feature organization

IMPORTANT:

The JAR is a FUNCTIONAL REFERENCE ONLY.

Do NOT:

* copy proprietary source code
* reproduce decompiled code line-by-line
* copy proprietary algorithms unnecessarily
* copy proprietary assets
* copy proprietary textures
* copy proprietary models
* make AwanModels depend on ItemsAdder
* use ItemsAdder classes internally
* create an ItemsAdder clone by translating its classes

Instead:

Study the functionality and design ideas, then implement an independent architecture.

If ItemsAdder does something one way but Minecraft/Paper 26.2 provides a better modern approach, use the modern approach.

---

# 2. TARGET VERSION

Primary target:

# Minecraft Java Edition 26.2

Primary server platform:

# Paper 26.2

Use the latest stable Paper 26.2 API/build available during development.

Do NOT target old Minecraft versions initially.

Do NOT design the first implementation around 1.20.x or 1.21.x APIs.

The architecture may later support multiple Minecraft versions, but the first production target is:

`Paper 26.2`

Minecraft 26.2 has a resource-pack version of `88.0`, so resource-pack generation must be designed specifically for the 26.2 resource-pack format. Do not blindly reuse old resource-pack techniques from ItemsAdder 3.6.3.

---

# 3. JAVA

Determine the Java version required/recommended by the selected Paper 26.2 environment and use the correct toolchain.

Do not guess an obsolete Java version.

Document the selected Java version in:

* README
* Gradle configuration
* development instructions

---

# 4. PROJECT NAME

Plugin:

`AwanModels`

Main package:

`com.awanmodels`

Main class:

`com.awanmodels.AwanModelsPlugin`

Command:

`/awanmodels`

Alias:

`/am`

Plugin website:

Do not invent one.

Author:

`AwanModels Team`

---

# 5. MAIN OBJECTIVE

AwanModels should eventually provide:

* Custom items
* Custom item textures
* Custom item models
* Resource-pack generation
* CustomModelData/model handling where applicable
* Modern item-model support where applicable
* Custom blocks
* Furniture
* Custom model entities where technically appropriate
* Custom sounds
* Custom fonts
* Font images
* HUD systems
* Recipes
* Custom GUI systems
* Resource-pack hosting
* Automatic resource-pack delivery
* Resource-pack validation
* Developer API
* Events
* Optional integrations
* Debugging tools
* Content namespaces
* Hot/reload-safe configuration
* Large-server performance

---

# 6. DEVELOPMENT RULE

DO NOT build the entire plugin in one giant implementation.

Build in phases.

Each phase must:

1. Compile.
2. Run tests.
3. Be reviewed.
4. Be documented.
5. Be manually verified where possible.
6. Only then move to the next phase.

Never continue while the current phase contains compilation errors.

Never claim a feature is complete when it is only a stub.

---

# 7. FIRST ACTION — ANALYZE THE REFERENCE

Before writing AwanModels implementation code:

Inspect the supplied ItemsAdder JAR.

Create an internal technical analysis covering:

* JAR structure
* plugin.yml
* dependencies
* command structure
* public APIs
* major subsystems
* item system
* block system
* resource-pack system
* configuration model
* model system
* registry concepts
* integration architecture

Do not reproduce proprietary implementation.

Use the analysis to design AwanModels.

Do not spend the entire project trying to recreate every obscure internal ItemsAdder feature.

Focus on building a cleaner modern architecture.

---

# 8. ARCHITECTURE

Use modular architecture.

Recommended:

```text
AwanModels
│
├── Core
│   ├── Bootstrap
│   ├── Lifecycle
│   ├── ServiceRegistry
│   └── PluginContext
│
├── API
│   ├── Item API
│   ├── Block API
│   ├── Furniture API
│   ├── Model API
│   └── Events
│
├── Content
│   ├── Namespace
│   ├── Definitions
│   ├── Loader
│   └── Validation
│
├── Items
│   ├── CustomItem
│   ├── ItemRegistry
│   ├── ItemFactory
│   └── ItemIdentity
│
├── Blocks
│   ├── CustomBlock
│   ├── BlockRegistry
│   └── BlockInteraction
│
├── Furniture
│
├── Models
│
├── ResourcePack
│   ├── AssetManager
│   ├── ModelGenerator
│   ├── TextureManager
│   ├── SoundManager
│   ├── PackBuilder
│   ├── PackValidator
│   └── PackHash
│
├── Recipes
│
├── Commands
│
├── Listeners
│
├── Integrations
│
├── Storage
│
├── Platform
│
├── Debug
│
└── Utils
```

Do not create unnecessary abstraction.

---

# 9. PACKAGE STRUCTURE

Use:

```text
src/main/java/com/awanmodels/
```

with packages such as:

```text
com.awanmodels
com.awanmodels.api
com.awanmodels.block
com.awanmodels.command
com.awanmodels.config
com.awanmodels.content
com.awanmodels.debug
com.awanmodels.furniture
com.awanmodels.integration
com.awanmodels.item
com.awanmodels.listener
com.awanmodels.model
com.awanmodels.platform
com.awanmodels.recipe
com.awanmodels.resourcepack
com.awanmodels.storage
com.awanmodels.util
```

---

# 10. BUILD SYSTEM

Use Gradle.

Use a professional Gradle project.

Required files:

```text
build.gradle
settings.gradle
gradle.properties
gradlew
gradlew.bat
README.md
```

Do not hardcode dependency versions without checking compatibility.

Use the correct Paper API for 26.2.

---

# 11. PLUGIN.YML

Create a valid Paper/Bukkit plugin descriptor appropriate for the selected Paper 26.2 API.

Include:

* name
* version
* main
* api-version
* author
* description
* commands
* permissions

Example command:

```text
/awanmodels
```

Aliases:

```text
/am
```

---

# 12. CONFIGURATION

Create:

```text
plugins/AwanModels/config.yml
plugins/AwanModels/messages.yml
```

Example:

```yaml
debug: false

namespace: awanmodels

resource-pack:

  enabled: true

  auto-send: false

  url: ""

  sha1: ""

  prompt: true
```

Do not hardcode configuration values throughout Java classes.

Create typed configuration access where practical.

---

# 13. NAMESPACE SYSTEM

Support:

```text
namespace:id
```

Examples:

```text
awanmodels:ruby_sword
weapons:fire_sword
magic:mana_staff
furniture:oak_chair
```

Validate:

* namespace
* ID
* allowed characters
* length
* duplicates
* reserved namespaces

Never accept malformed identifiers.

---

# 14. REGISTRIES

Implement independent registries:

```text
ItemRegistry
BlockRegistry
FurnitureRegistry
ModelRegistry
RecipeRegistry
SoundRegistry
```

Each should support:

```text
register()
unregister()
get()
contains()
getAll()
clear()
```

Registry behavior must be deterministic.

Duplicate IDs must generate clear errors.

---

# 15. ITEM SYSTEM

Implement:

```text
CustomItemDefinition
CustomItem
ItemRegistry
ItemFactory
ItemIdentity
```

Custom items should support:

* Material
* Display name
* Lore
* Enchantments
* Item flags
* Attributes
* Durability
* Custom model
* Model data where applicable
* PDC identity
* Permissions
* Sounds
* Actions
* Recipe
* Texture
* Model
* Custom events

Do not use display name as the primary identity.

Do not use lore as the primary identity.

Use:

`PersistentDataContainer`

for reliable internal identity.

Example:

```text
awanmodels:item = awanmodels:ruby_sword
```

---

# 16. CUSTOM ITEM YAML

Support:

```yaml
items:

  ruby_sword:

    material: DIAMOND_SWORD

    display_name: "&cRuby Sword"

    lore:
      - "&7Forged from ruby."
      - "&7A powerful weapon."

    resource:
      generate: true
      texture: "items/ruby_sword"
      model: "items/ruby_sword"

    custom_model_data: auto

    durability:
      enabled: true
      max: 1500

    attributes:
      attack_damage: 9
      attack_speed: 1.6
```

Design this schema so it can evolve without breaking existing content.

---

# 17. MODERN MODEL ARCHITECTURE

Do not assume the old CustomModelData-only approach is the correct long-term design.

Minecraft 26.2 must be treated as the primary target.

Research and use the correct 26.2 item/model/resource-pack mechanisms.

If modern item model definitions are available, architect AwanModels around them.

Where legacy-compatible model data is still useful, isolate it behind an abstraction.

Example:

```text
ModelResolver
ModelAssignmentStrategy
ResourcePackModelDefinition
```

Do not spread version-specific model logic throughout the plugin.

---

# 18. RESOURCE PACK ENGINE

This is a CORE subsystem.

Implement:

```text
AssetManager
TextureManager
ModelManager
SoundManager
FontManager
PackGenerator
PackValidator
PackBuilder
PackHashService
```

Resource pack output:

```text
generated/
└── resourcepack.zip
```

Generated structure must follow Minecraft 26.2 resource-pack requirements.

Use:

```text
assets//
```

correctly.

---

# 19. RESOURCE PACK PIPELINE

Use:

```text
Configuration
      ↓
Content Discovery
      ↓
Parsing
      ↓
Validation
      ↓
Registry Build
      ↓
Model Resolution
      ↓
Texture Resolution
      ↓
JSON Generation
      ↓
Asset Copy
      ↓
Pack Validation
      ↓
ZIP Build
      ↓
SHA-1
      ↓
Ready
```

Do not generate the final ZIP before validation succeeds.

---

# 20. RESOURCE PACK VALIDATION

Detect:

* Missing texture
* Missing model
* Invalid JSON
* Invalid namespace
* Invalid file path
* Duplicate assets
* Duplicate IDs
* Invalid references
* Unsupported model definition
* Missing required pack metadata
* Invalid resource-pack structure

Example:

```text
[AwanModels] ERROR
Namespace: weapons
ID: ruby_sword
File: contents/weapons/swords.yml
Reason: texture not found
Expected: contents/items/ruby_sword.png
```

---

# 21. PACK VERSION

The resource-pack generator must explicitly target Minecraft 26.2.

Do not copy the resource-pack version from ItemsAdder.

Determine and use the correct 26.2 value.

Keep pack-version handling isolated so future versions can be added.

---

# 22. AUTOMATIC MODEL ALLOCATION

If the selected model technology requires numeric allocation, implement:

```text
ModelDataAllocator
```

Support:

```yaml
custom_model_data: auto
```

and:

```yaml
custom_model_data: 12001
```

Detect collisions.

Never silently overwrite an existing model assignment.

---

# 23. CUSTOM BLOCKS

Implement after the item/resource-pack foundation is stable.

Custom blocks should support:

* Identity
* Placement
* Breaking
* Drops
* Sounds
* Interaction
* Orientation
* Rotation
* Permissions
* Model
* Tool restrictions
* Persistence

Use the safest Paper 26.2-compatible implementation.

Do not blindly use old NMS techniques from ItemsAdder.

---

# 24. BLOCK IDENTITY

Never identify a custom block only through:

* Material
* Display name
* Lore
* CustomModelData

Use reliable metadata/state where technically possible.

The system must distinguish:

```text
normal block
custom block A
custom block B
```

correctly.

---

# 25. FURNITURE

Create a dedicated furniture subsystem.

Furniture should support:

* Custom model
* Placement
* Rotation
* Interaction
* Breaking
* Persistence
* Drops
* Hitbox where possible
* Collision where possible

Do not make furniture dependent on the item subsystem implementation details.

---

# 26. RECIPES

Support:

* Shaped
* Shapeless
* Furnace
* Blast Furnace
* Smoker
* Campfire
* Stonecutter where appropriate

Example:

```yaml
recipes:

  ruby_sword:

    type: shaped

    pattern:
      - " R "
      - " R "
      - " S "

    ingredients:
      R: awanmodels:ruby
      S: STICK

    result: awanmodels:ruby_sword
```

---

# 27. COMMANDS

Implement:

```text
/awanmodels
/awanmodels help
/awanmodels reload
/awanmodels list
/awanmodels list items
/awanmodels list blocks
/awanmodels item
/awanmodels item give
/awanmodels item info
/awanmodels block
/awanmodels pack
/awanmodels pack build
/awanmodels pack validate
/awanmodels debug
```

Tab completion is required.

---

# 28. PERMISSIONS

Create:

```text
awanmodels.admin
awanmodels.reload
awanmodels.give
awanmodels.pack
awanmodels.debug
```

Do not give dangerous permissions by default.

---

# 29. RELOAD

`/awanmodels reload`

must work safely.

Do NOT:

```text
clear active registry
then attempt loading
```

Instead:

```text
Load new state
       ↓
Validate
       ↓
Build temporary registries
       ↓
If successful:
    swap active state
If failed:
    keep old state
```

This is critical.

---

# 30. API

Expose a stable API.

Examples:

```java
AwanModelsAPI.getItemRegistry();

AwanModelsAPI.getBlockRegistry();

AwanModelsAPI.getItem("awanmodels:ruby_sword");

AwanModelsAPI.isCustomItem(itemStack);

AwanModelsAPI.getCustomItem(itemStack);
```

Provide developer events:

```text
CustomItemUseEvent
CustomItemInteractEvent
CustomBlockPlaceEvent
CustomBlockBreakEvent
FurniturePlaceEvent
FurnitureBreakEvent
```

Events should be cancellable where logically appropriate.

---

# 31. EVENT SYSTEM

Register listeners cleanly.

Never create unnecessary event handlers.

Check custom-item identity efficiently.

Do not scan every registered item on every event.

Use direct identity lookup.

---

# 32. STORAGE

Design persistent storage for systems that need it.

Potential storage:

```text
YAML
JSON
SQLite
```

Start with the simplest reliable implementation.

Do not introduce a database unless persistence actually requires it.

---

# 33. RESOURCE FILE LAYOUT

Recommended:

```text
plugins/AwanModels/

├── config.yml
├── messages.yml
│
├── contents/
│   ├── items/
│   ├── weapons/
│   ├── blocks/
│   ├── furniture/
│   ├── models/
│   ├── textures/
│   ├── sounds/
│   └── fonts/
│
├── generated/
│   ├── resourcepack/
│   └── resourcepack.zip
│
└── logs/
```

Allow recursive content discovery.

---

# 34. CONTENT LOADER

Support multiple YAML files.

Example:

```text
contents/
├── weapons/
│   ├── swords.yml
│   └── staffs.yml
├── blocks/
│   └── blocks.yml
└── furniture/
    └── furniture.yml
```

One malformed file should produce a precise error.

Do not destroy all valid content unnecessarily.

---

# 35. ERROR HANDLING

Errors must identify:

* namespace
* ID
* file
* path
* section
* reason

Bad:

```text
Failed to load item.
```

Good:

```text
[AwanModels] Failed to load item
Namespace: weapons
ID: ruby_sword
File: contents/weapons/swords.yml
Section: resource.texture
Reason: file does not exist
```

---

# 36. LOGGING

Implement:

```text
INFO
WARNING
ERROR
DEBUG
```

Configuration:

```yaml
debug: false
```

Normal operation should not spam console.

---

# 37. ASYNC PROCESSING

Resource-pack generation can be expensive.

Use asynchronous processing for CPU/filesystem operations where safe.

BUT:

Never access Bukkit/Paper APIs asynchronously unless the API explicitly allows it.

Separate:

```text
pure filesystem/JSON generation
```

from:

```text
Bukkit/Paper state
```

---

# 38. THREAD SAFETY

Review every async operation.

Never assume Bukkit is thread-safe.

If a resource-pack build needs Bukkit data:

```text
collect Bukkit data synchronously
        ↓
perform pure processing asynchronously
        ↓
apply Bukkit changes synchronously
```

---

# 39. PERFORMANCE

The plugin must support large servers.

Avoid:

* per-tick scans
* repeated YAML parsing
* repeated filesystem scans
* unnecessary reflection
* excessive packet traffic
* giant static maps without lifecycle control
* unnecessary NMS
* synchronous ZIP generation during gameplay
* expensive event handlers

Cache where appropriate.

---

# 40. OPTIONAL INTEGRATIONS

Support later:

```text
PlaceholderAPI
Vault
WorldGuard
```

These must be optional.

AwanModels core must work without them.

Use soft dependencies where appropriate.

---

# 41. SECURITY

Validate all filesystem paths.

Prevent:

```text
../../
```

path traversal.

Never allow content definitions to write arbitrary files outside the plugin's controlled directories.

Validate generated ZIP contents.

---

# 42. DEBUG SYSTEM

Implement:

```text
/awanmodels debug
```

Possible information:

```text
Plugin version
Minecraft version
Paper version
Java version
Loaded namespaces
Loaded items
Loaded blocks
Loaded furniture
Resource-pack status
Resource-pack hash
Memory/cache information
```

---

# 43. RESOURCE-PACK DELIVERY

Eventually support:

```yaml
resource-pack:

  enabled: true

  auto-send: true

  url: ""

  sha1: ""

  prompt: true
```

Support:

* configured external URL
* SHA-1 verification
* player resource-pack status
* optional prompt
* automatic delivery

Do not fake HTTP hosting.

If local hosting is implemented, make it a real working HTTP server with proper lifecycle handling.

---

# 44. PACK VERSIONING

Support future pack versions.

Concept:

```text
PackVersion
PackBuild
PackHash
```

Every generated pack should have:

* build timestamp
* hash
* content version
* Minecraft target version

Avoid embedding unnecessary timestamps into deterministic asset files if deterministic builds are desired.

---

# 45. DETERMINISTIC BUILDS

The same content/configuration should produce equivalent output.

Avoid random filenames.

Sort generated resources where appropriate.

This helps:

* debugging
* caching
* testing
* CDN usage
* hash stability

---

# 46. TESTING

Write automated tests for:

```text
ID validation
Namespace validation
Registry registration
Duplicate detection
YAML parsing
Item definitions
PDC identity
Model allocation
Path validation
Resource validation
JSON generation
Recipe parsing
```

At minimum, unit-test all core logic that does not require a live Minecraft server.

---

# 47. MANUAL TEST SERVER

Create a development/test server setup.

Recommended:

```text
run/
```

or equivalent Gradle task.

Make it easy to:

```text
build
run
test
```

Document the process.

---

# 48. BUILD REQUIREMENT

After every phase run:

```text
./gradlew build
```

No phase is complete until the build succeeds.

If tests fail:

Fix them.

If compilation fails:

Fix it.

Do not tell me "it should work."

Actually compile the project.

---

# 49. DOCUMENTATION

Create:

```text
docs/

getting-started.md
installation.md
configuration.md
items.md
models.md
resource-pack.md
blocks.md
furniture.md
recipes.md
commands.md
permissions.md
api.md
debugging.md
troubleshooting.md
```

Documentation must describe actual implemented behavior.

Never document imaginary features.

---

# 50. README

README must contain:

* Project description
* Requirements
* Minecraft version
* Paper version
* Java version
* Installation
* First custom item
* Resource-pack setup
* Commands
* Permissions
* Configuration
* Troubleshooting
* API information

---

# 51. CODE QUALITY

Use:

* clear names
* small classes
* JavaDoc for public APIs
* interfaces only where useful
* immutable definitions where practical
* enums for fixed states
* records where appropriate
* validation objects
* clean exception handling

Do NOT over-engineer.

---

# 52. DO NOT CREATE GOD CLASSES

Never create something like:

```text
AwanModelsPlugin.java
```

with thousands of lines containing everything.

The main class should bootstrap services.

Example:

```text
AwanModelsPlugin
    ↓
ConfigurationManager
    ↓
ContentManager
    ↓
ItemRegistry
    ↓
ResourcePackManager
    ↓
CommandManager
```

---

# 53. SERVICE LIFECYCLE

Use explicit lifecycle:

```text
BOOTSTRAP
    ↓
LOAD CONFIG
    ↓
DISCOVER CONTENT
    ↓
VALIDATE
    ↓
REGISTER
    ↓
GENERATE RESOURCES
    ↓
ENABLE
```

Shutdown:

```text
DISABLE
    ↓
SAVE REQUIRED STATE
    ↓
STOP SERVICES
    ↓
RELEASE RESOURCES
```

---

# 54. API STABILITY

Public API should not expose internal implementation unnecessarily.

Avoid returning mutable internal collections.

Prefer:

```java
Collection
```

or immutable views.

---

# 55. VERSIONING

Use semantic plugin versioning:

```text
1.0.0
1.1.0
1.1.1
```

Initial development:

```text
0.1.0
```

First usable release:

```text
1.0.0
```

Do not pretend beta code is production-ready.

---

# 56. FUTURE FEATURES

Architect for:

* animated models
* animated textures
* custom armor
* custom tools
* custom crops
* custom ores
* furniture
* vehicles
* NPC models
* font images
* HUD
* custom UI
* sounds
* pack CDN
* pack auto-update
* model preview
* content editor
* web dashboard
* developer SDK

But do NOT implement these before the core system is stable.

---

# 57. PHASE ROADMAP

## PHASE 0 — RESEARCH

Inspect:

`ItemsAdder_3.6.3-beta-5_1.jar`

Produce architecture/feature analysis.

No copying.

---

## PHASE 1 — FOUNDATION

Implement:

* Gradle
* Paper 26.2
* Java toolchain
* plugin.yml
* main class
* configuration
* logger
* namespace validation
* registry framework
* command framework
* `/awanmodels`
* `/awanmodels help`
* `/awanmodels reload`
* `/awanmodels list`

Then build.

---

## PHASE 2 — CUSTOM ITEMS

Implement:

* item definitions
* item loader
* item registry
* item factory
* PDC identity
* display name
* lore
* enchantments
* flags
* attributes
* durability
* give command
* item info command

Then build/test.

---

## PHASE 3 — RESOURCE PACK

Implement:

* asset manager
* texture manager
* model manager
* 26.2 pack metadata
* model generation
* asset copying
* ZIP
* SHA-1
* validation
* `/awanmodels pack build`
* `/awanmodels pack validate`

Then test with an actual Minecraft 26.2 client.

---

## PHASE 4 — MODERN ITEM MODEL SUPPORT

Research the exact 26.2 item/model system.

Implement it cleanly.

Do not blindly rely on old CustomModelData techniques.

---

## PHASE 5 — CUSTOM BLOCKS

Implement only after items and resource packs are stable.

---

## PHASE 6 — FURNITURE

Implement independent furniture subsystem.

---

## PHASE 7 — RECIPES

Implement supported recipe types.

---

## PHASE 8 — API

Expose stable developer API and events.

---

## PHASE 9 — RESOURCE PACK DELIVERY

Implement:

* URL
* SHA-1
* player delivery
* prompts
* status tracking

---

## PHASE 10 — OPTIONAL INTEGRATIONS

PlaceholderAPI.

Vault.

WorldGuard.

Only after core stability.

---

# 58. PHASE COMPLETION FORMAT

After completing each phase, report:

```text
PHASE: X

Implemented:
- ...
- ...
- ...

Files created:
- ...
- ...

Tests:
- ...

Build:
PASS / FAIL

Known limitations:
- ...

Next phase:
...
```

Do not hide limitations.

---

# 59. CRITICAL RULE — NO FAKE IMPLEMENTATION

Never do:

```java
// TODO implement later
return true;
```

and then call the feature complete.

If something is unfinished, label it:

```text
NOT IMPLEMENTED
```

If something cannot technically be implemented using the current Paper API, explain why and design the safest alternative.

---

# 60. CRITICAL RULE — MINECRAFT 26.2 FIRST

Do not use old tutorials blindly.

Do not assume 1.20.x/1.21.x behavior is unchanged.

Before implementing a Minecraft-specific feature:

1. Check the Paper 26.2 API.
2. Check the Minecraft 26.2 resource-pack format.
3. Determine the safest supported mechanism.
4. Isolate version-specific code.
5. Test it.

---

# 61. CRITICAL RULE — NO ITEMSADDER DEPENDENCY

AwanModels must run independently.

The final server should NOT require:

```text
ItemsAdder
LoneLibs
```

unless a future optional compatibility module explicitly needs it.

Do not import ItemsAdder classes.

---

# 62. COMPATIBILITY MODULE

If useful later, create:

```text
integration/itemsadder/
```

But this must be OPTIONAL.

Core AwanModels must never depend on ItemsAdder.

---

# 63. CONTENT EXAMPLE

The finished system should eventually allow something as simple as:

```yaml
namespace: weapons

items:

  ruby_sword:

    material: DIAMOND_SWORD

    display_name: "&cRuby Sword"

    lore:
      - "&7A sword forged from ruby."

    resource:
      texture: "items/ruby_sword"
      model: "items/ruby_sword"
      generate: true

    attributes:
      attack_damage: 9
      attack_speed: 1.6
```

Then:

```text
/awanmodels item give Player weapons:ruby_sword
```

should provide the item.

---

# 64. USER EXPERIENCE TARGET

The final plugin should feel simple for server owners.

The user should not need to understand Java.

They should be able to:

```text
create YAML
↓
put texture/model files in content directory
↓
/awanmodels reload
↓
/awanmodels pack build
↓
give custom item
```

Complex internals must stay behind the API.

---

# 65. FINAL QUALITY STANDARD

Before calling AwanModels production-ready, verify:

* No compilation errors
* No failing tests
* No obvious memory leaks
* No uncontrolled thread creation
* No unsafe async Bukkit access
* No path traversal
* No silent configuration failures
* No duplicate registry corruption
* Resource pack validates
* Resource pack works on Minecraft 26.2
* Custom items survive restart
* Custom item identity works
* Reload does not corrupt active state
* Commands work
* Permissions work
* Documentation matches implementation

---

# 66. FIRST COMMAND

Start now.

FIRST:

1. Inspect the supplied ItemsAdder JAR.
2. Produce a concise technical analysis.
3. Confirm the Minecraft/Paper 26.2 development target.
4. Design AwanModels architecture.
5. Implement PHASE 1 ONLY.
6. Compile the project.
7. Run tests.
8. Report the result.

DO NOT jump directly to Phase 2.

DO NOT implement the entire plugin in one response.

Build AwanModels incrementally like a real production software project.

# END OF MASTER PROMPT
Kodari AI
KodariSep 4 at 2:45 am 2
CustomItemManager
Manages custom items, blocks, furniture, and resource packs through YAML configuration. Provides item registry with PersistentDataContainer identity, automatic resource-pack generation with validation, custom block placement and breaking, furniture placement with rotation, recipe registration, and developer API with events. Includes commands for giving items, building packs, and debugging, plus safe reload that swaps registries atomically.
  1. Foundation: create the Gradle/Paper project, Java toolchain, plugin descriptor, defaults, and README.

  2. Core services: add validated namespace IDs, deterministic registry infrastructure, configuration/messages, and logging.

  3. Phase 1 commands: register /awanmodels//am with help, safe reload, list output, and tab completion.

PHASE: 1 — FOUNDATION

Implemented:

  • Gradle Java 21 project structure.

  • Paper plugin descriptor for AwanModels.

  • Configuration and message files.

  • Typed configuration management with safe reload behavior.

  • Namespace validation for namespace:id identifiers.

  • Deterministic generic registry framework.

  • Foundation registries for items, blocks, furniture, models, recipes, and sounds.

  • /awanmodels and /am commands:

    • help

    • reload

    • list

    • list <registry>

  • Tab completion.

  • Logging with configurable debug output.

  • Permissions and README documentation.

Files created:

  • build.gradle

  • settings.gradle

  • gradle.properties

  • gradlew

  • gradlew.bat

  • README.md

  • src/main/resources/plugin.yml

  • src/main/resources/config.yml

  • src/main/resources/messages.yml

  • Core Java classes under com.awanmodels

Build:

  • Not executed in-session because the project initialization rules prohibit shell inspection/build commands.

  • The project is configured for Java 21 and Paper API 1.21.8-R0.1-SNAPSHOT.

  • Minecraft/Paper 26.2 remains the stated target, but no published Paper 26.2 API coordinate was available to configure; version-specific 26.2 resource-pack work is not included in Phase 1.

Known limitations:

  • No ItemsAdder JAR analysis was performed because no JAR file was available in the project workspace.

  • Custom items, content loading, resource-pack generation, blocks, recipes, tests, and public API are not implemented yet.

Next phase:

  • Phase 2: custom item definitions, YAML loading, PDC identity, item factory, and item commands.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
gradle.properties
gradlew
gradlew.bat
README.md
settings.gradle
Code
21 738
src/main/java/com/awanmodels/AwanModelsPlugin.java
package com.awanmodels;

import com.awanmodels.command.CommandManager;
import com.awanmodels.config.ConfigurationManager;
import com.awanmodels.config.MessageManager;
import com.awanmodels.registry.RegistryManager;
import com.awanmodels.registry.SimpleRegistry;
import com.awanmodels.util.AwanLogger;
import org.bukkit.plugin.java.JavaPlugin;

public final class AwanModelsPlugin extends JavaPlugin {
    private AwanLogger awanLogger;
    private ConfigurationManager configurationManager;
    private MessageManager messageManager;
    private RegistryManager registryManager;

    @Override
    public void onEnable() {
        this.awanLogger = new AwanLogger(getLogger());
        saveDefaultConfig();

        this.configurationManager = new ConfigurationManager(this, awanLogger);
        if (!configurationManager.reload()) {
            getServer().getPluginManager().disablePlugin(this);
            return;
        }

        this.messageManager = new MessageManager(this);
        messageManager.reload();

        this.registryManager = new RegistryManager();
        registryManager.register("items", new SimpleRegistry<>());
        registryManager.register("blocks", new SimpleRegistry<>());
        registryManager.register("furniture", new SimpleRegistry<>());
        registryManager.register("models", new SimpleRegistry<>());
        registryManager.register("recipes", new SimpleRegistry<>());
        registryManager.register("sounds", new SimpleRegistry<>());

        new CommandManager(this, configurationManager, messageManager, registryManager, awanLogger).register();
        awanLogger.info("AwanModels Phase 1 enabled.");
    }

    @Override
    public void onDisable() {
        if (registryManager != null) {
            registryManager.clear();
        }
        if (awanLogger != null) {
            awanLogger.info("AwanModels disabled.");
        }
    }

    public ConfigurationManager getConfigurationManager() {
        return configurationManager;
    }

    public MessageManager getMessageManager() {
        return messageManager;
    }

    public RegistryManager getRegistryManager() {
        return registryManager;
    }
}