dakingofbots

make sure to include every feature

📎 1 file 52,262 chars
📄
pasted-code-1786658885561.txt
txt 3049 lines
▶
# Procedural Dimension Framework Plugin Specification

## Overview

Create a highly modular Paper plugin that allows users to create fully configurable procedural dimensions.

The plugin must allow users to create custom worlds with different generation systems, room pools, layers, areas, passive effects, and entity configurations through configuration files.

The plugin must not contain hardcoded content for any specific map. Everything should be configurable.

The goal is to allow users to create large infinite procedural dimensions made from NBT structures while supporting multiple generation algorithms.

---

# World Configuration System

Each procedural world is created through a folder located in:

```
worlds/
```

The folder name determines the world name.

The folder contains the world's config file as well as the world’s entities configs,

Example:

```
worlds/
├── level0/
 |      └ level0.yml
 |      └ entities.yml
```

The plugin automatically creates a Minecraft dimension/world with the corresponding name if it does not exist.

New worlds created by the plugin start empty and are generated according to their configuration.

Example:

```yaml
Generator:
    Type: random

StructurePool:
    world/

RoomSize:
    X:16
    Z:16

DangerLevel:1
```

---

# Structure Pools

Structure pools contain all NBT files used by generation.

Example:

```
world/
├── room1.nbt
├── room2.nbt
├── wall.nbt
└── props/
      ├── chair.nbt
      └── table.nbt
```

Rooms are normal Minecraft NBT structures.

Nbt files in subfolders are used by structure blocks and not the plugin.

Users build rooms manually and save them as NBT files.

---

# Room Size System

Each world has a default room size.

Example:

```yaml
RoomSize:
    X:16
    Z:16
```

This represents the minimum generation grid.

However, rooms may be larger, they may use multiple grid spaces.

The plugin must automatically detect the occupied size of every structure.

The plugin must mark all occupied cells to prevent another room from generating inside it.

Large rooms must never be partially regenerated.

---

# Room Height And Floor Alignment

Rooms are allowed to have different Y sizes.

The plugin must not require every room to have the same height.

Instead, every world configuration file defines a floor block.

Example:

```yaml
FloorBlock:
    minecraft:dirt_path
```

When loading a room, the plugin detects the floor level by finding the floor blocks.

Rooms are aligned by their floor level.

They connect normally because their floors align.

A room may extend above or below another room.

---

# Room Rotation

Rooms may rotate.

Supported rotations:

```
0°
90°
180°
270°
```

The plugin must correctly rotate:

* structure placement,
* room size detection,
* floor detection,
* connector positions.

---

# Room Weight System

Every room has a default weight of 10.

The configuration can override individual room weights.

Example:

```yaml
RoomWeights:

    rare_room.nbt = 2

    common_room.nbt = 20
```

Higher weight means a higher chance of selection.

Rooms not listed automatically use weight 10.

---

# World Layers

A world can contain multiple vertical layers.

Example:

```yaml
Layers:

    Top:
        DangerLevel:1

    Middle:
        DangerLevel:2

    Bottom:
        DangerLevel:3
```

Each layer generates independently at different Y coordinates (the set coordinates are the floor's of each layer).

Example:

```yaml
LayerYLevels:

    Top:100

    Middle:50

    Bottom:0
```

Layers can optionally use different structure pools.

Example:

```yaml
LayerPools:

    Top:
        world/top/

    Middle:
        world/middle/

    Bottom:
        world/bottom/
```

If no layer pool is specified, all layers use the default world structure pool.

---

# Symmetrical Layer Generation

Layers can copy each other.

Setting:

```yaml
SymmetricalGeneration:true
```

creates similar layouts between layers.

The value can also be an integer.

Range:

```
0-10
```

Example:

```yaml
SymmetricalGeneration:7
```

Meaning:

* 10 = almost exact copy
* 0 = completely different
* 7 = 70% matching rooms

If different layer pools are used, symmetry automatically becomes disabled.

---

# Area System

Areas are special generation regions.

They can be used for:

* dark zones,
* large open areas,
* blocked regions,
* strange generation behavior.

Example:

```yaml
Areas:

    DarkArea:

        GenerationType:
            sparse, non-euclidian

        SpecificLayer:
            Bottom

        DangerLevel:3

        GenerationPool:
            world/level0dark/
    OpenArea:

        GenerationType:
            groups

        SpecificLayer:
            nil

        DangerLevel:3

        GenerationPool:
            world/OpenPoolroom/

```

---

# Area Generation Types

Areas support combinations of modifiers.

Example:

```
groups non-euclidian
```

or

```
sparse blocked
```

---

## Groups

Creates connected large areas.

Useful for:

* giant rooms,
* open zones,
* large structures.

It works by making rooms from this area’s pool have higher spawning chances near each others.

---

## Sparse

Creates scattered areas.

The opposite of groups.

---

## Void

The area becomes empty space.

The plugin marks those chunks as already generated.

No rooms can ever generate there.

---

## Blocked

The area is blocked off from the rest using the wall.nbt file in the world’s generation pool.

This type isnt an area but is a modifier (added to any area’s generator like in the example)
---

## Non-Euclidian

The area periodically regenerates.

When a player generates an area, the generated rooms dont actually save as generated and are regenerated every time the area re enter the players's generation radius. (The rooms are never marked as generated basically)

The regenerated area may be completely different.

This type isnt an area but is a modifier (added to any area’s generator like in the example)

---

# Area Danger Level

Every area has a danger level.

Default:

```
1
```

Example:

```yaml
DangerLevel:3
```

This affects:

* entity spawning chances,
* which entities can appear.

An entity with danger level 3 cannot spawn in a danger level 1 area.

An entity with danger level 1 can spawn anywhere with danger level 1 or higher.

The danger level also acts as a multiplier for the chances of an entity to spawn.

---

# Global World Danger Level

Every procedural world has a global danger level.

Example:

```yaml
DangerLevel:2
```

This represents the base danger of the entire dimension.

The world danger level is used as the default value when no more specific danger value exists.

The final danger level of an area is calculated separately.

Example:

```yaml
World:

    DangerLevel:2


Area:

    DangerLevel:4
```

The area uses danger level 4 while the rest of the world uses danger level 2.

The world danger level affects:

* default entity spawning rules.

The base world danger level is always lower priority than area-specific settings.

---

# Danger Level Hierarchy

Danger levels follow this priority:

1. Area danger level
2. Layer danger level
3. World danger level

Example:

```yaml
DangerLevel:1


Layers:

    Bottom:

        DangerLevel:3


Areas:

    DarkZone:

        DangerLevel:5
```

A normal location in the world:

```
Danger level 1
```

A location in the Bottom layer:

```
Danger level 3
```

A DarkZone:

```
Danger level 5
```

---

# Entity System

The entity system will be added later in a separate part.

The future entity system will allow:

* custom entities,
* custom models through resource packs,
* custom AI behaviors,
* configurable danger levels,
* entity spawning rules,
* entity sounds,
* entity animations.

The world generation system must only expose the required hooks so that the entity system can be added without rewriting the generator.

---

# Passive Effects System

Each world may define passive effects applied to players.

These effects represent environmental properties of a dimension.

Example:

```yaml
PassiveEffects:

    - Tireless

    - Dementia
```

Passive effects are custom plugin effects (see end of prompt) they can also be normal vanilla Minecraft effects.

They are applied automatically when entering the world.

Each world may have different effects.

Layers and areas may override them.

Example:

```yaml
World:

    PassiveEffects:

        - Nyctophobia


Areas:

    DarkZone:

        PassiveEffects:

            - nil
```

---

# Generator System

The plugin supports multiple generation algorithms.

Each world chooses one generator.

Example:

```yaml
Generator:

    Type:random
```

Available generators:

* Random
* Wave Connect Function
* Repeat
* Hallway
* Set World
* Empty

Each generator has its own settings.

---

# Random Generator

The random generator creates an infinite world using rooms selected from a structure pool.

It works by creating generation points around players.

Temporary armor stands are used as generation markers.

Process:

1. A player approaches an ungenerated area.
2. The plugin checks nearby generation markers.
3. If there are none, a temporary armor stand marked as generation marker is created.
4. The armor stand selects a valid room.
5. The room is rotated if needed.
6. The room is placed.
7. Props are generated by jigsaw blocks.
8. The armor stand is removed.

Generation only happens in chunks that have not already been generated.
Armor stands only appear in ungenerated chunks touching a generated chunk
The default generation radius is configurable.

Example:

```yaml
GenerationRadius:4
```

---

# Wave Connect Function Generator

This generator creates connected layouts by analyzing room connections.

Each room is checked for openings.

Example:

```
North: open

East: wall

South: open

West: wall
```

The plugin only places rooms that correctly connect.

This generator is designed for organic layouts where rooms must follow connection rules.

Unlike the random generator, this generator understands room connectivity.

Every time a room generates, it will have a 20% chance of being replaced by the set wall.nbt.

It will 50% of the time try to use a room with a connector of the same size. Walls bypass that.

---

# Repeat Generator

The repeat generator repeats a predefined section.

Example:

```yaml
Generator:

    Type:repeat


Settings:

    Axis:X

    Size:10
```

Supported axes:

* X
* Y
* Z

If repeating on the Y axis, the plugin automatically creates walls using the set wall.nbt file on the sides of the repeated section.

The repeated area can either be:

* a complete generated section,
* a slice of the world.

Y-axis slicing is not supported.

---

# Hallway Generator

The hallway generator creates an endless corridor.

Example:

```yaml
Generator:

    Type:hallway


Hallway:

    Structure:
        world/hallway.nbt
```

The hallway structure is copied infinitely in one direction.

The hallway structure may contain jigsaw blocks.

Those jigsaw blocks generate rooms from their selected pool.

The hallway structure itself cannot be generated by those jigsaw blocks to prevent recursion.

The generation radius is much larger on this generator, being set to a 16x16 chunk radius/length. Do make sure it is still optimized tho.

---

# Set World Generator

The Set World generator uses a completely prebuilt world.

The plugin does not generate rooms.

Only systems such as:

* passive effects,
* future entities,
* world settings

are applied.

---

# Empty Generator

The Empty generator creates an infinite repeating environment.

It repeats a single room in every direction.

Example:

```yaml
Generator:

    Type:empty


Template:

    empty_room.nbt
```

The room repeats on:

* X axis
* Z axis

It does not repeat vertically except if it has layers.

The floor alignment system still applies.

The generator supports rare alternative rooms.

Example:

```yaml
RareRoomsWeights:

    special_room.nbt:1

    large_room.nbt:3
```

These rooms replace the default room occasionally using the same weight system.

The generation radius is much larger on this generator, being set to a 16x16 chunk radius. Do make sure it is still optimized tho.

---

## Non Euclidian worlds

A world may optionally use non euclidian geometry.

This is **not** a generator. This is an option that can be added to any existing generator.

A world with this setting enabled will not save wich rooms have been generated before. It will regenerate them whenever the rooms leave then re enter the player's generation radius.

Example:
1. Player enters a non euclidian world.
2. Player walks around and generates rooms.
3. The plugin doesn't save rooms as generated apart from the ones currently in the player's generation radius.
4. The player goes back where they came from
5. Different rooms frome before, as those have been regenerated by the plugin.
---

## Hub Worlds

A world may optionally behave as a hub.

This is **not** a generator.

Instead, it is an optional setting that modifies how players enter the world.

Example:

```yaml
Hub:

    Enabled:true

    SpawnRoom:
        world/spawn.nbt
```

Default:

```yaml
Hub:

    Enabled:false
```

If enabled:

* Every player entering the world is teleported to the world's origin (0, 0) (using the configured Y level or the floor alignment system).
* The configured spawn room is always generated first.
* Generation then continues normally using the world's selected generator.
* The hub room is never randomly generated elsewhere unless it is also present in the normal structure pool.

The hub setting works with every generator.

Examples:

* Random + Hub
* Wave Connect Function + Hub
* Hallway + Hub
* Empty + Hub

---

# Wave Connect Function Improvements

The Wave Connect Function generator must automatically detect every connection on every room.

A connection is any opening on the room border.

Rooms may have multiple openings on the same wall.

Example:

```
North

■■□■■□■■

Two exits
```

The plugin must recognize both exits independently.

Example:

```
West

□■■□■■□

Three exits
```

Each opening becomes its own connector.

The plugin must only connect rooms whose connectors line up correctly.

Multiple connectors on the same wall must all be validated independently.

The system must also work after rotating a room.

---

# Connector Detection

Connector detection is fully automatic.

Users should not have to manually configure connector positions.

When loading a room, the plugin scans each outer wall and records every opening.

Example:

```
North

Exit 1

Exit 2


South

Exit 1
```

The plugin stores:

* wall
* horizontal position
* opening width
* opening height
* floor offset

Those values are used when validating neighboring rooms.

---

# Vertical Connections

The Wave Connect Function generator must support rooms with different heights.

Rooms connect using their configured floor level rather than their total height.

Connectors are stored relative to the detected floor.

Example

```
Room A

Height:12

Connector:
3 blocks above floor


Room B

Height:24

Connector:
3 blocks above floor
```

The connectors match.

This allows rooms with different ceiling heights to connect correctly without additional configuration.

---

# Connector Width

Openings are not restricted to one block.

Example

```
1 block doorway

■■□■■
```

```
2 block doorway

■□□■
```

```
5 block opening

□□□□□
```

The plugin must automatically detect opening width.

Rooms only connect if compatible openings exist.

---

# Generation Validation

Before placing a room, the plugin validates:

* Occupied size
* Floor alignment
* Connector positions
* Connector widths
* Rotation
* Existing neighboring rooms

If any required connector cannot be matched, another room is selected.

If no compatible room exists, generation fails gracefully without creating invalid layouts.

---

# Room Selection Order

When selecting a room, the plugin should:

1. Gather every room from the appropriate generation pool.
2. Remove rooms that do not fit inside the available free space.
3. Remove rooms with incompatible connectors (Wave Connect Function only).
4. Apply room weights.
5. Randomly choose one of the remaining valid rooms.
6. Rotate the room if rotation is enabled.
7. Validate again after rotation.
8. Place the structure.
9. Generate props using its jigsaw blocks.

---

# Generation Persistence

Generated rooms should remain permanently by default.

Generation data must be saved to disk.

The plugin must remember:

* generated room positions,
* room rotation,
* occupied tiles,
* layer,
* generation pool used,
* area modifiers affecting the room.

This prevents regeneration after server restarts.

A configuration option may allow worlds to regenerate after unloading if desired.

---

# Example World Configurations

The AI should include several complete example configuration files demonstrating different combinations of settings, including:

* A basic random world.
* A Wave Connect Function world with rooms of different sizes and multiple exits per wall.
* A multi-layer world using different layer pools.
* A hub world.
* A hallway world.
* An empty repeating world with rare replacement rooms.
* A repeat generator world.
* Worlds using grouped, sparse, blocked, void, and non-euclidian areas in combination.

---

# Documentation

The AI should also generate complete documentation for every configuration option implemented.

For each setting, include:

* its purpose,
* valid values,
* default value,
* example usage,
* interactions with other settings.

The documentation should cover every option supported by the plugin so that users can create entirely new procedural worlds without modifying the plugin's source code.


# Part 4 — Generation Internals

This section defines how the generation engine should work internally.

Everything should be designed for performance and scalability.

---

# General Requirements

The plugin must:

* Be optimized to never freeze the server,
* avoid unnecessary chunk loads,
* support multiple players simultaneously,
* generate seamlessly,
* save generation data,
* support millions of generated rooms,
* work on Paper 1.21.5.

Generation should happen incrementally over multiple ticks whenever possible.

---

# Chunk Generation

The plugin only generates inside loaded chunks.

Generation never force-loads distant chunks.

Whenever a player enters an unloaded generation region:

1. The chunk loads.
2. The plugin checks if generation is required.
3. Generation is queued.
4. The room is generated.
5. The room is saved.

---

# Generation Queue

Generation requests enter a queue.

Each server tick the plugin processes a configurable number of requests.

Example

```yaml
Generation:

    RoomsPerTick:4
```

This prevents lag spikes.

Higher values increase generation speed.

Lower values improve TPS.

---

# Multiplayer Generation

Every player contributes to generation.

If two players approach the same region simultaneously:

* only one generation task is created,
* duplicate generation must never occur.

The plugin should merge generation requests whenever possible.

---

# Generated Tile Cache

Every occupied generation tile is saved.

The plugin should never scan already-generated locations.

Each tile stores:

* room ID,
* rotation,
* occupied size,
* world,
* layer,
* area,
* generation timestamp.

---

# Structure Size Cache

Room sizes should only be calculated once.

When a room is first loaded:

* detect occupied width,
* detect occupied depth,
* detect height,
* detect floor,
* detect connectors.

Those values should be cached permanently.

Future generations use the cache.

---

# Connector Cache

Wave Connect Function rooms should cache:

* connector count,
* connector positions,
* connector widths,
* connector heights,
* wall location.

These values should never be recalculated unless the structure changes.

---

# Rotation Cache

Rotated connector layouts should also be cached.

Instead of recalculating after every rotation, cache all four possible rotations.

---

# Room Validation

Before placing a room the plugin validates:

* occupied area,
* floor alignment,
* connector compatibility,
* rotation,
* layer,
* area,
* room conditions.

If validation fails:

select another room.

---

# Structure Placement

Generation order:

1. Choose room.
2. Rotate room.
3. Detect occupied cells.
4. Reserve cells.
5. Place structure.
6. Run jigsaw blocks.
7. Save generation data.
8. Remove temporary generation entities.

---

# Temporary Armor Stands

Generators using armor stands must:

* spawn them only during generation,
* immediately remove them afterwards,
* never leave them loaded,
* never save them.

Armor stands are generation markers only.

---

# Save System

Generation data must persist across restarts.

Server shutdown should never corrupt generation.

Only generation metadata needs to be saved.

NBT structures themselves are never duplicated.

---

# Regeneration

Worlds may optionally regenerate.

```yaml
Regeneration:

    Enabled:false
```

If enabled:

rooms outside the unload radius may be forgotten.

Returning players regenerate those areas.

---

# Unload Radius

Example

```yaml
UnloadRadius:8
```

Generated rooms farther than the configured radius from every player become eligible for unloading.

---

# Memory Usage

Only loaded rooms should remain in memory.

Metadata for unloaded rooms stays on disk.

---

# Performance Goals

The plugin should comfortably support:

* thousands of loaded rooms,
* multiple simultaneous players,
* multiple procedural worlds,
* large room libraries.

Performance should remain consistent regardless of world size.

---

# Random Seeds

Each world may optionally define a seed.

```yaml
Seed:123456789
```

If omitted:

a random seed is generated.

Using the same seed with identical room libraries should produce identical layouts.

---

# Generator-Specific Settings

Each generator has its own configuration section.

Example

```yaml
Generator:

    Type:Random

    Settings:

        GenerationRadius:4

        RotateRooms:true
```

The plugin should ignore settings belonging to other generators.

---

# Room Conditions

Rooms may define optional generation conditions.

Example

```yaml
Conditions:

    MinDangerLevel:3

    MaxDangerLevel:6
```

The room only participates in selection when the current danger level matches.

Additional conditions should be easy to add later.

---

# Room Tags

Rooms may have arbitrary tags.

Example

```yaml
Tags:

- hallway

- dead_end

- large

- office
```

The generator itself does not use tags unless configured.

Future systems may reference them.

---

# Area Room Weights

Areas may override room weights.

Example

```yaml
Areas:

    DarkArea:

        RoomWeights:

            hallway.nbt:30

            office.nbt:2
```

Rooms not listed continue using the world's normal weights.

---

# Future Compatibility

The generation engine should be written to allow future systems to interact with it without modification.

Future systems include:

* entities,
* ambient sounds,
* music,
* loot,
* puzzles,
* scripted events,
* objectives,
* custom blocks.

Generation should expose internal APIs for these systems rather than hardcoding behavior.

---

# Part 5 — Complete Configuration Reference

The AI should generate complete documentation for every configuration option implemented by the plugin.

For every setting include:

* Purpose
* Accepted values
* Default value
* Example
* Related settings

The documentation should cover every available option so users can create entirely new procedural worlds without modifying the plugin source code.

---

# Global Plugin Configuration

The plugin should contain a global configuration file for settings shared across every world.

Example:

```yaml
DefaultWorld: level0

SaveInterval: 300

Generation:

    RoomsPerTick: 4

    CacheRoomData: true

    AsyncPreparation: true
```

## DefaultWorld

Type:

```yaml
String
```

Default:

```yaml
None
```

The world players enter when they first enter the procedural dimension system.

Players enter this world by suffocating inside a block (for example sand or gravel) and dying to it. They then are sent to the procedural world at the relative coordinates in that dimension, except on the y axis. They are teleported to the y coordinates of the floor level +3.

---

# SaveInterval

How often generation metadata is saved.

Example

```yaml
SaveInterval:300
```

Seconds.

---

# Generation Settings

```yaml
Generation:

    RoomsPerTick:4

    CacheRoomData:true

    AsyncPreparation:true
```

RoomsPerTick

Maximum number of queued generation jobs processed each server tick.

CacheRoomData

Caches room analysis permanently.

AsyncPreparation

Allows room analysis and validation to occur asynchronously whenever possible.

---

# World Configuration

Every world supports the following options.

```yaml
Generator:

StructurePool:

RoomSize:

FloorBlock:

DangerLevel:

PassiveEffects:

Entities:

RoomWeights:

Layers:

Areas:

Seed:

Hub:
```

---

## Generator

Defines which generation algorithm the world uses.

Supported values

```yaml
Random

WaveConnectFunction

Repeat

Hallway

Empty

SetWorld
```

---

## StructurePool

Folder containing every room available to the world.

Example

```yaml
StructurePool:

world/
```

---

## RoomSize

Defines the generation grid size.

Example

```yaml
RoomSize:

    X:16

    Z:16
```

Large rooms may occupy multiple cells automatically.

---

## FloorBlock

The block used for automatic floor alignment.

Example

```yaml
FloorBlock:

minecraft:smooth_stone
```

Every room should contain this block somewhere on its intended floor. The plugin recognizes where that block is on the y axis and places the rooms so the floor blocks match

---

## DangerLevel

Defines the world's default danger level.

Example

```yaml
DangerLevel:2
```

Area danger levels override it.

Layer danger levels override it.

---

## PassiveEffects

List of custom passive effects.

Example

```yaml
PassiveEffects:

- Tireless

- Hyperacusis
```

The actual effect implementations are handled elsewhere.

---

## Entities

Example

```yaml
Entities:

    ExampleEntity:

        Model:

        AiType:

        DangerLevel:
```
---

## RoomWeights

Overrides room selection probabilities.

Default weight for every room:

```yaml
10
```

Example

```yaml
RoomWeights:

    office.nbt:25

    storage.nbt:5
```

---

## Layers

Defines vertical world layers.

Each layer supports

```yaml
DangerLevel

GenerationPool
```

Optional, If omitted, The default StructurePool is used.

---

## SymmetricalGeneration

Supported values

```yaml
false

true

0-10
```

---

## LayerYLevels

Defines each layer's generation height.

Example

```yaml
LayerYLevels:

    Top:128

    Bottom:0
```

---

## Areas

Every area supports

```yaml
GenerationType

GenerationPool

DangerLevel

SpecificLayer

PassiveEffects

RoomWeights
```

---

## GenerationType

Supported modifiers

```yaml
groups

sparse

random

void

blocked

non-euclidian
```

Modifiers may be combined.

Example

```yaml
groups blocked

random non-euclidian

sparse void
```

---

## SpecificLayer

Default

```yaml
All
```

Restricts generation to selected layers.

---

## GenerationPool

Overrides the world's default room pool.

---

# Generator Settings

Each generator exposes its own configuration.

---

## Random

```yaml
Settings:

    GenerationRadius:4

    RotateRooms:true
```

---

## Wave Connect Function

```yaml
Settings:

    RotateRooms:true

    ValidateConnectors:true
```

Automatically detects:

* connector positions
* connector widths
* connector heights
* multiple connectors on one wall
* floor alignment

---

## Repeat

```yaml
Settings:

    Axis:X

    RepeatSize:8

    Slice:false
```

This would make the dimension just 8 repeated room on the x axis. There would be void blocked off with a wall on either sides on the z axis. 
---

## Hallway

```yaml
Settings:

    Hallway:

        hallway.nbt
```

---

## Empty

```yaml
Settings:

    Template:

        empty.nbt

    RareRooms:

        special.nbt:1

        office.nbt:5
```

---

## SetWorld

No generator-specific settings.

---

# Hub Settings

```yaml
Hub:

    Enabled:false

    SpawnRoom:

        hub.nbt
```

The configured room always generates at the world's origin.

Players entering the world spawn there.

Generation then continues normally, but takes the hub into account and doesn't generate on it.

---

# Future-Proofing

When generating the documentation, the AI should also include:

* a table listing every configuration option,
* every default value,
* every accepted value,
* examples of valid configurations,
* explanations of interactions between settings.

No configuration option should be undocumented.

---

# Example Worlds

The AI should automatically generate several fully working example world configuration files demonstrating different combinations of every feature, including:

* Basic Random world.
* Wave Connect Function world with rooms of different heights and multiple exits per wall.
* Multi-layer world using different generation pools.
* Hub world.
* Hallway world.
* Repeat world.
* Empty world with rare room substitutions.
* Set World configuration.
* Worlds using grouped, sparse, blocked, void, and non-euclidian areas.
* Worlds using different danger levels, passive effects, seeds, and room weights.

These examples should be complete, well-commented, and usable as templates for creating new procedural worlds.


# Part 6 — Future-Proof Framework

The plugin must be designed to be easily expandable.

Future systems should integrate with the existing framework without requiring modifications to the generation engine.

The generator should expose APIs, managers, and events that future systems can use.

Nothing in the generator should depend on a specific gameplay style.

---

# Future Entity System

The entity system will be implemented later.

The generator should already expose everything it needs.

Each world stores:

```yaml
Entities:

    EntityName:

        Model:

        AiType:

        DangerLevel:
```

The generator should expose:

* Current world
* Current layer
* Current area
* Current danger level
* Room position
* Room ID
* Generated room events
* Room unload events

The future entity plugin will use these values to determine when and where entities should spawn.

The generator itself should not spawn entities.

---

# Future Ambient Sound System

The framework should allow future plugins to register ambient sounds.

Possible triggers include:

* entering a room,
* entering an area,
* entering a layer,
* entering a world,
* periodic ambient playback,
* danger level changes.

No sounds should be implemented yet.

---

# Future Music System

The framework should allow future music playback.

Music should be configurable per:

* world,
* layer,
* area.

Future plugins should be able to replace currently playing music without modifying the generator.

---

# Future Loot System

Loot generation should not be handled by this plugin.

Rooms may contain vanilla chests.

Future plugins may replace or fill them.

The generator only places structures.

---

# Future Events

Future plugins should be able to trigger events.

Examples:

* temporary area modifications,
* scripted sequences,
* room transformations,
* changing room weights,
* modifying passive effects.

The generator should expose sufficient APIs for these systems.

---

# Future Scripting Support

The plugin architecture should make it possible to support scripting in the future.

Potential scripting events include:

* room generated,
* room unloaded,
* area entered,
* world entered,
* layer changed,
* room regenerated.

No scripting language needs to be implemented.

The architecture should simply allow it.

---

# Public API

The generator should expose a clean API.

Other plugins should be able to:

* retrieve generated room data,
* determine current area,
* determine current layer,
* determine current danger level,
* query room metadata,
* query room tags,
* request regeneration,
* listen for generation events.

No plugin should need to access internal classes directly.

---

# Design Principles

The framework should follow these principles:

* Modular.
* Fully configurable.
* Data-driven.
* Deterministic when using seeds.
* Efficient.
* Easy to extend.
* Independent of any specific map or game mode.

Nothing should be hardcoded around a specific project.

---

# Deliverables

The AI should produce:

* A complete Paper 1.21.5 plugin.
* Clean, documented source code.
* A complete configuration system.
* Automatic configuration generation where appropriate.
* Full documentation for every configuration option.
* Several complete example world configurations demonstrating every supported feature.
* Well-structured packages and classes.
* Comments explaining non-obvious algorithms.
* Consistent coding style throughout the project.

---

# General Requirements

The finished plugin should allow users to create entirely new procedural dimensions simply by:

1. Creating a new configuration file inside the `worlds/` folder.
2. Adding NBT structures to the chosen structure pools.
3. Configuring generation settings.

No Java code should be required to add new procedural worlds.




# Part 5 — Entity System

The entity system must be completely data-driven. The plugin itself should not contain any hardcoded entities. Instead, it provides a library of AI types that users can assign to entities through each world's configuration file. Every entity is defined inside the world configuration and can therefore exist only in certain worlds if desired.

Every entity is by default persistent. They can also be spawned manually by future admin commands (implemented later). The plugin should never use Minecraft's natural mob spawning for custom entities.

Every entity supports custom models, animations and sounds through a resource pack. The plugin only controls logic, while appearance comes entirely from the configured model.

The plugin should also support multiple variants of the same entity. Variants share the same AI but may use different models, sounds, textures, animations and statistics.

The plugin should expose an API so future plugins can register additional AI types without modifying the generator.

---

## Entity Definition

Each world configuration contains its own entity list.

Example:

```yaml
Entities:

  Smiler:
    Model: entities/smiler
    AiType: Stalker
    DangerLevel: 2

  Hound:
    Model: entities/hound
    AiType: Violent
    DangerLevel: 3
```

Each entity supports the following settings.

```yaml
Entities:

  EntityName:

    Enabled: true

    Model:

    TextureVariant:

    AiType:

    DangerLevel:

    CanOpenDoors:

    CanSwim:

    CanClimb:

    ImmuneToVoid:

    Persistent:

    Silent:

    CustomSounds:

    CustomAnimations:
```

Every setting should have base values that are used as fallback if none are inputted.

---

## Danger Levels

Every entity has a danger level.

Every world also has a danger level.

Areas may override that value.

An entity may only spawn if

```
AreaDangerLevel >= EntityDangerLevel
```

This allows progressively more dangerous entities to appear in harder areas while weaker entities continue spawning.

Future plugins may use danger levels for additional mechanics.

Here is the hierarchy of danger levels:
Level (dimension 's) < layer's < area's
---

## General Spawning Rules

The plugin should attempt entity spawning periodically.

Entities may spawn anywhere satisfying their requirements.

They should remain relatively uncommon.

Entities must never spawn

* inside players
* inside blocks
* while directly visible to any player

Entities also must never despawn while players are looking at them, except if said otherwise.

The plugin should instead wait until every player loses sight of the entity before despawning or teleporting it if required.

Entities should attempt to spawn inside already-generated rooms.

Ungenerated rooms should never force entity spawning.

---

## Resource Pack Support

Every entity supports

* custom model
* multiple animations
* idle animation
* walking animation
* sprint animation
* attack animation
* death animation
* hurt animation
* custom sounds

The plugin only controls when animations play.

The resource pack provides the assets.

If the plugin cannot find the right assets, it will send an error in the console once, and use a fallback instead (vanilla model, animations and sounds)

---

# AI Types

## 1. Stalker

The Stalker watches players from afar.

Every encounter brings it closer.

Whenever a player notices it by looking directly at it, the entity disappears after roughly 0.1 seconds and its progression is set back by 1.

If it gets into a 10 block radius around the player before being noticed, it immediately begins sprinting toward the player.

---

## 2. Camera

The Camera is effectively blind while players remain completely still.

Movement and sounds attract it.

Any sound sourve may distract it. (Like a warden)

Whenever nobody looks at it, it has a 1/1000 chance to disappear every tick.

---

## 3. Reverse Angel

Moves only while observed.

Whenever no player sees it, it freezes.

---

## 4. Violent

Simple aggressive AI.

Immediately attacks players upon detection.

Every instance randomizes statistics.

Statistics:

```yaml
MinHealth:
MaxHealth:
MinSpeed:
MaxSpeed:
MinDamage:
MaxDamage:
```

---

## 5. Fly

Prefers brightly lit rooms.

Normally passive.

Becomes hostile if forced into darkness or if players approach too closely.

---

## 6. Skinwalker

Only enabled after multiple unique players have joined.

Copies skins and usernames from previous players.

Attempts to isolate victims.

Only one may exist simultaneously.

After killing someone it copies their appearance.

---

## 7. Living Darkness

The Living Darkness is not a traditional entity but a moving anomaly.

It appears as an unnaturally dark area that slowly moves through generated rooms.

Players and entities entering it are immediately absorbed and teleported to configurable coordinates inside a configurable world. (Set in the worlds config file)

After absorbing something it disappears and later reappears in the vicinity.

Its size increases every time it absorbs a player or mob. (Items, armor stands, item frames, block, item and text displays are excluded)

If it absorbs nothing for 20 minutes its size decreases by one stage. (It may diseappear that way)

Players trapped inside the destination room must survive for 5 minutes before being teleported to their original location.

The destination room automatically spawns entities according to the Living Darkness configuration in the dimension config file.

---

## 9. Pack

Shares detected targets with nearby pack members.

---

## 10. Coward

Avoids players whenever possible.

If cornered it becomes hostile.

---

## 11. Collector

Searches for dropped items.

Each collected item permanently buffs its stats.

---

## 12. Wanderer

Random movement.

Ignores players until close.

---

## 14. Sleeper

Sleeps indefinitely.

Wakes only after environmental changes.

Triggers include

* light changes
* sounds
* nearby movement
* block updates
* doors
* players

---

## 15. Shy

Moves only when players are sufficiently far away.

Freezes otherwise.

---

## 16. Observer

Never attacks.

Quietly follows players for extended periods.

May eventually leave or disappear.

---

## 17. Phase

Travels only through darkness.

Avoids illuminated paths whenever possible.

---

## 18. Intelligent

Learns player habits.

Repeatedly used escape routes become increasingly likely interception points.

---

# Future AI Expansion

The AI framework should be modular.

Adding a new AI type should require creating a single new AI class implementing the common interface.

No existing AI should require modification.

Future entities should simply reference the new AI by name inside the configuration.

The plugin should also generate complete example configurations demonstrating every AI type, explaining every available setting and providing comments for each configuration option.




# Part 6 — Items, Events and Commands

This plugin should also implement a framework for Backrooms-related items, global events and administrative commands. Like the rest of the plugin, these systems must be fully modular and easily expandable. Every item, event and command should be designed so future additions require minimal code changes.

---

# Items

The plugin should register custom items using vanilla Minecraft items with custom model data (or item model definitions for Minecraft 1.21.5 resource packs). If the resource pack is missing, every item must still function correctly using a configurable vanilla fallback texture.

Every custom item supports:

* Display name
* Description (lore)
* Custom model
* Vanilla fallback item
* Stack size
* Rarity
* Consumable or not
* Cooldown
* Craftable or not
* Obtainable through commands
* Future loot plugin compatibility

---

## Almond Water

Properties should follow the Backrooms Wiki as closely as reasonably possible within Minecraft.

Effects:

* Restores hunger.
* Restores saturation.
* Removes negative potion effects that are curable.
* Gives Regeneration for 30s.
* Gives Resistance for 30s.
* Extinguishes fire.

Uses:

* Custom bottle model.
* Fallback texture: Invisibility Potion.

---

## Liquid Pain

Uses:

* Custom bottle model.
* Fallback texture: Instant Health Potion.

Effects:

* Applies a custom "Suffering" effect (internally Wither).
* Deals damage over time.
* Reduce movement speed.
* May cause Darkness (random chance).

---

## Lucky Clover

Uses:

* Custom model.
* Fallback texture: Gold Nugget.

Simply existing inside the player's inventory grants the "Lucky" effect (internally Luck II)

The effect immediately disappears when removed from inventory

---

## Almonds

Effects based on the wiki:

* Restore a small amount of hunger.
* Slightly restore "sanity-related" effects.
* Small Regeneration effect.

Fallback item:

* Beetroot Seeds.

---

## Memory Juice

Effects:

* Removes certain psychological effects.
* Gives temporary Nausea.
* Gives temporary Weakness.

Fallback:

* Honey Bottle.

---

## Royal Rations

Effects:

* Fully restores hunger.
* Gives Saturation.
* Gives Regeneration.
* Gives Resistance.
* Long consumption time.

Fallback:

* Cooked Beef.

---

## Cashew Water

A weaker version of Almond Water.

Effects:

* Small hunger restoration.
* Small saturation restoration.
* Weak regeneration.

Fallback:

* Water Bottle.

---

## Firesalt

Throwable item (like snowballs).

Effects:

* Creates temporary fire where it lands.
* Can ignite entities and make them diseappear.
* Can light campfires.

Fallback:

* Blaze Powder.

---

## Object 11 (Flashlight)

Uses durability as battery.

Provides configurable light.

Can use the plugin's dynamic lighting system if installed.

Fallback:

* Carrot on a Stick.

---

## M.E.G. Badge

Purely cosmetic.

Future updates may use it for dialogue or permissions.

Fallback:

* Name Tag.

---

## Bandages

Consumable healing item.

Effects:

* Restores health.
* Stops the new bleeding effect.

Fallback:

* Paper.

---

## Adrenaline Syringe

Effects:

* Speed
* Haste
* Temporary Strength

Followed by:

* Slowness
* Weakness

Fallback:

* Arrow.

---

## Anti-Anxiety Pills

Effects:

* Removes psychological passive effects.
* Removes Darkness.
* Gives temporary Calm (custom effect).

Fallback:

* Sugar.

---

# Events

Events affect one or more procedural worlds.

Rooms around the player in an 8 room radius are updated dynamically whenever the player moves.

Propagation continues even if the player left the world.

Newly generated rooms automatically inherit active events.

Only one instance of the same event may affect the same world simultaneously unless explicitly configured otherwise.

Events may appear at any time naturally depending on their rarity on any level where a player is. If an event is currently ongoing on a level, no event may start naturally on that level, and a there must be a set cooldown before events are able to spawn in again.

Make a eventsConfig.yml file for the events’s configs.

Example:

Delayed (in seconds): 600
Events:
 Blackout:
  Rarity: 1/10000 (every second)
  Dimensions:
   level0
   poolrooms
   overworld
 Flicker
  Rarity: 1/100000000
---

## Blackout

Affects one world.

Effects:

* Every Waxed Copper Bulb flickers for a bit then turns off.
* Sky becomes completely black.
* Sun, stars and moon disappear.
* Base lighting overridden to -1.
* Entity spawn chances increase.
* World danger level increases by 1.
* Existing entities become more active.

Everything goes back to normal when it ends.

—

## MiniBlackout

Small version of the blackout. Only affects rooms in a 12 room radius around the player.

—

## Flicker

Makes lights flicker for a random amount of time. Only affects rooms around players in a 10 room radius. The random amount of time must be between 20s and 1 minute.

—

## TheFlicker

Global version of Blackout.

Runs simultaneously on every procedural world.

Each world updates independently whenever a player enters them.

---

## Fog

Adds thick fog to the affected world.

Effects:

* Reduced render distance (through packet fog if possible).
* Darkness atmosphere.
* Certain entities receive spawn bonuses.

---

## Power Surge

Random lights flicker.

Copper bulbs repeatedly switch between on and off.

Random lamps "burn out" until the event ends.

Does not affect already broken lights.

---

## Earthquake

Applies periodic screen shake using packets.

Random falling particles.

Random earthquake like sounds.

Makes lights flicker.

---

## Echoes

Players occasionally hear:

* footsteps
* doors
* mining
* entity sounds
* player sounds

No actual entities are created.

---

## False Alarm

Temporarily increases ambient sounds.

Makes entity sounds play.

Makes a heartbeat sound.

---

## Heavy Silence

Removes almost every ambient sound.

Only important gameplay sounds remain.

Creates extremely quiet environments.

---

## Infestation

Temporarily increases entity spawn rates.

Danger level unchanged.

---

## Reality Shift

Non-Euclidean areas regenerate much faster during the event.

Configurable regeneration multiplier.

---

## Dim Lights

Instead of turning lights completely off, randomly reduces brightness throughout generated rooms. (Makes copper bulbs oxidized)


--


# Commands

Every command should provide tab completion.

Every command should validate arguments before executing.

Permission nodes should be configurable.

---

## Give Item

```
/backrooms give  [player] [amount]
```

Gives a registered Backrooms item.

If no player is specified, the sender receives it.

---

## Summon Entity

```
/backrooms summon  [x] [y] [z]
```

Summons the specified custom entity.

If coordinates are omitted, the entity spawns at the sender.

Supports relative coordinates.

---

## Warp

```
/backrooms warp  [player] [room]
```

Teleports the specified player. If none are specified, teleports the sender

If only a level is provided:

* Teleport to a random generated room.

If a room name is provided:

* Teleport to a random generated instance of that room.

If none exist:

* Display an error.

---

## Event

```
/backrooms event   [duration] [level]
```

Starts or stops an event.

If no level is specified for world-specific events, use the sender's current world.

Duration defaults to the configured value.

---

## Reload

```
/backrooms reload
```

Reloads every plugin configuration without restarting the server.

---

## Debug

```
/backrooms debug
```

Displays:

* current world
* current room
* room coordinates
* layer
* area
* danger level
* active events
* passive effects
* generation type
* generator state

---

## Locate Room

```
/backrooms locate 
```

Searches generated rooms and returns the nearest instance.

---

## Regenerate

```
/backrooms regenerate 
```

Marks nearby generated rooms for regeneration.

Rooms regenerate the next time a player approaches.

---

## Info

```
/backrooms info
```

Displays information about the current room:

* Room ID
* Structure file
* World
* Layer
* Area
* Generator type
* Danger level
* Passive effects
* Active events
* Room tags

---

## List

```
/backrooms list 
```

Return the specified list in the chat.

Possible Lists:

* registered worlds
* generators
* AI types
* events
* passive effects
* custom items
* loaded entities

---

## Validate

```
/backrooms validate
```

Checks every world configuration for:

* missing rooms
* invalid references
* missing models
* missing pools
* invalid generator settings
* invalid room weights
* invalid danger levels
* invalid area definitions

Reports every issue without stopping at the first error. This command is intended to help creators verify large procedural worlds before using them in-game.
Kodari AI
KodariAug 13 at 10:13 pm 32
ProceduralDimensionFramework
A highly modular Paper plugin for creating fully configurable procedural dimensions. It supports multiple generation algorithms (Random, Wave Connect Function, Repeat, Hallway, Set World, Empty), automatic structure analysis with rotation and connector detection, vertical world layers, custom areas with modifiers (groups, sparse, void, blocked, non-euclidian), and a complete danger level hierarchy. Includes a data-driven entity system with fourteen AI types, custom items, dynamic global events, and administrative commands—all fully configurable through YAML files without Java coding.
  1. Bootstrap the Paper plugin, configuration loader, world lifecycle, and public API.

  2. Implement queued procedural generation, persistent room metadata, structure caching, and generator strategies.

  3. Add passive effects, configurable entities/AI registry, custom items, world events, and commands.

  4. Include complete configuration reference plus ready-to-copy world and event examples.

  1. Bootstrap complete.

  1. Generation engine, NBT analysis cache, connector model, persistence, and extension API are in place.

  1. Queue-safe strategies now cover random, connector-validated wave layouts, repeat, hallway, empty, set-world, rotation, persistence, regeneration, and multiplayer request merging.

  1. Entity AI registry and data-driven custom items are available for every configured world.

  1. Configurable events, passive-effect resolution, all administration commands, validation, and tab completion are included.

  1. Added complete configuration documentation and example packs for random, wave-connect, layered, hub, hallway, empty, repeat, set-world, and area-modifier worlds.

dakingofbots

make it compatible with 26.2 and make sure you fix any error you come across

Kodari AI
KodariAug 15 at 7:40 am 5
  1. Update the build and plugin metadata for Paper 26.2 / Java 25.

  2. Repair structure placement so rotations and current Bukkit structure APIs work correctly.

Updated for Paper 26.2:

  • Paper API dependency moved to 26.2-R0.1-SNAPSHOT.

  • Java toolchain and compiler release updated to Java 25.

  • plugin.yml API version updated to 26.2.

  • Replaced broken reflective structure placement with the typed Bukkit Structure API.

  • Fixed all supported room rotations, including 0° (NONE) and 270° (COUNTERCLOCKWISE_90).

dakingofbots

Make SURE nothing uses deprecated stuff, like the new system for coloured writing for example, and other stuff.

Kodari AI
KodariAug 15 at 7:45 am 15
  1. Audit the source for legacy/deprecated Bukkit/Paper APIs and text handling.

  2. Replace confirmed legacy usage with current Paper 26.2 APIs, preserving existing behavior.

  • Replaced legacy &/§ formatting with MiniMessage Component messages and item names.

  • Migrated item metadata to ItemStack#editMeta, displayName(Component), and CustomModelDataComponent.

  • Replaced deprecated potion-type name checks with namespaced-key value checks.

  • Updated default item names in config.yml to MiniMessage syntax.

  • Confirmed the scheduler and file-based StructureManager#loadStructure(File) usage remain supported; no unnecessary replacement made.

dakingofbots

also for some reason you didnt add the suffocation tp thingy:

If a player is dying from suffocation and reaches half health, they are healed back and sent to the default dimension

Kodari AI
KodariAug 15 at 7:48 am 2
  1. Add a suffocation-damage listener to the existing dimension event service.

  2. At half health, restore health and teleport the player to the configured DefaultWorld, creating that procedural world when applicable.

Added the suffocation rescue handler:

  • On suffocation damage that would bring a player to half health or lower, damage is cancelled.

  • The player is fully healed.

  • They are teleported to DefaultWorld’s spawn location.

  • Procedural default worlds are created/resolved through WorldManager; ordinary loaded Bukkit worlds are also supported.

dakingofbots

Worlds dont generate for some reason, suffocating doesnt teleport you, /backrooms give does work now but the items dont have any special effect.

📎 1 file 4,082 chars
📄
pasted-code-1786781034378.txt
txt 33 lines
▶
java.lang.IllegalAccessError: class dev.kodari.proceduraldimensions.generation.StructureCache tried to access private method 'void dev.kodari.proceduraldimensions.generation.StructureCache$NbtCompound.<init>()' (dev.kodari.proceduraldimensions.generation.StructureCache and dev.kodari.proceduraldimensions.generation.StructureCache$NbtCompound are in unnamed module of loader 'ProceduralDimensions-1.0.0 (1).jar' @785a3110)
    at ProceduralDimensions-1.0.0 (1).jar//dev.kodari.proceduraldimensions.generation.StructureCache.compound(StructureCache.java:140) ~[?:?]
    at ProceduralDimensions-1.0.0 (1).jar//dev.kodari.proceduraldimensions.generation.StructureCache.read(StructureCache.java:135) ~[?:?]
    at ProceduralDimensions-1.0.0 (1).jar//dev.kodari.proceduraldimensions.generation.StructureCache.analyze(StructureCache.java:69) ~[?:?]
    at ProceduralDimensions-1.0.0 (1).jar//dev.kodari.proceduraldimensions.generation.StructureCache.lambda$pool$3(StructureCache.java:39) ~[?:?]
    at java.base/java.util.concurrent.ConcurrentHashMap.computeIfAbsent(ConcurrentHashMap.java:1724) ~[?:?]
    at ProceduralDimensions-1.0.0 (1).jar//dev.kodari.proceduraldimensions.generation.StructureCache.lambda$pool$2(StructureCache.java:39) ~[?:?]
    at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:214) ~[?:?]
    at java.base/java.util.ArrayList.forEach(ArrayList.java:1604) ~[?:?]
    at java.base/java.util.stream.SortedOps$RefSortingSink.end(SortedOps.java:395) ~[?:?]
    at java.base/java.util.stream.Sink$ChainedReference.end(Sink.java:261) ~[?:?]
    at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:571) ~[?:?]
    at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:560) ~[?:?]
    at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:635) ~[?:?]
    at java.base/java.util.stream.AbstractPipeline.evaluateToArrayNode(AbstractPipeline.java:291) ~[?:?]
    at java.base/java.util.stream.ReferencePipeline.toArray(ReferencePipeline.java:652) ~[?:?]
    at java.base/java.util.stream.ReferencePipeline.toArray(ReferencePipeline.java:658) ~[?:?]
    at java.base/java.util.stream.ReferencePipeline.toList(ReferencePipeline.java:663) ~[?:?]
    at ProceduralDimensions-1.0.0 (1).jar//dev.kodari.proceduraldimensions.generation.StructureCache.pool(StructureCache.java:39) ~[?:?]
    at ProceduralDimensions-1.0.0 (1).jar//dev.kodari.proceduraldimensions.generation.AbstractPoolGenerator.choose(AbstractPoolGenerator.java:17) ~[?:?]
    at ProceduralDimensions-1.0.0 (1).jar//dev.kodari.proceduraldimensions.generation.RandomGenerator.plan(RandomGenerator.java:7) ~[?:?]
    at ProceduralDimensions-1.0.0 (1).jar//dev.kodari.proceduraldimensions.generation.GenerationManager.generate(GenerationManager.java:128) ~[?:?]
    at ProceduralDimensions-1.0.0 (1).jar//dev.kodari.proceduraldimensions.generation.GenerationManager.processQueue(GenerationManager.java:115) ~[?:?]
    at org.bukkit.craftbukkit.scheduler.CraftTask.run(CraftTask.java:78) ~[paper-26.2.jar:26.2-112-c9e894d]
    at org.bukkit.craftbukkit.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:474) ~[paper-26.2.jar:26.2-112-c9e894d]
    at net.minecraft.server.MinecraftServer.tickChildren(MinecraftServer.java:1767) ~[paper-26.2.jar:26.2-112-c9e894d]
    at net.minecraft.server.MinecraftServer.tickServer(MinecraftServer.java:1620) ~[paper-26.2.jar:26.2-112-c9e894d]
    at net.minecraft.server.dedicated.DedicatedServer.tickServer(DedicatedServer.java:404) ~[paper-26.2.jar:26.2-112-c9e894d]
    at net.minecraft.server.MinecraftServer.processPacketsAndTick(MinecraftServer.java:1678) ~[paper-26.2.jar:26.2-112-c9e894d]
    at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1348) ~[paper-26.2.jar:26.2-112-c9e894d]
    at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:303) ~[paper-26.2.jar:26.2-112-c9e894d]
    at java.base/java.lang.Thread.run(Thread.java:1474) ~[?:?]
Kodari AI
KodariAug 15 at 8:08 am 7
  1. Fix the StructureCache access error preventing world generation.

  2. Trace and repair the suffocation rescue trigger/teleport path.

  3. Restore the special behavior for /backrooms give items.

  1. Generation: fixed the IllegalAccessError; the NBT parser can now construct its nested compound type.

  2. Investigating the suffocation rescue path next.

  1. Suffocation rescue now accepts cancelled suffocation damage, falls back to the first configured procedural world when DefaultWorld is empty, and uses Paper’s asynchronous teleport API.

  2. Investigating the item-use flow and adding behavior for the issued item types.

  1. World generation: fixed the NBT parser crash from your stack trace. NbtCompound now has an accessible constructor, so structures can be analyzed and queued normally.

  2. Suffocation rescue: fixed the handler so it:

    • Works even when another plugin has already cancelled the suffocation event.

    • Triggers at half health or below.

    • Uses the first configured procedural world when DefaultWorld is blank.

    • Uses Paper’s teleportAsync(...) API.

  3. /backrooms give items:

    • Item IDs are now resolved case-insensitively against the configured Items entries.

    • Unknown item IDs are rejected instead of producing a generic item.

    • Non-native consumables now activate on right-click and consume one item: LiquidPain, Almonds, Firesalt, Bandages, AdrenalineSyringe, and AntiAnxietyPills.

    • Existing native food/drink items continue using PlayerItemConsumeEvent.

Kodari can make mistakes. Review important code before using.
Files
src
worlds
build.gradle
CONFIGURATION.md
settings.gradle
Code
54 2,395
src/main/java/dev/kodari/proceduraldimensions/ProceduralDimensionsPlugin.java
package dev.kodari.proceduraldimensions;

import dev.kodari.proceduraldimensions.command.BackroomsCommand;
import dev.kodari.proceduraldimensions.entity.EntityService;
import dev.kodari.proceduraldimensions.event.DimensionEventService;
import dev.kodari.proceduraldimensions.generation.GenerationManager;
import dev.kodari.proceduraldimensions.item.ItemService;
import dev.kodari.proceduraldimensions.world.WorldManager;
import lombok.Getter;
import org.bukkit.command.PluginCommand;
import org.bukkit.plugin.java.JavaPlugin;

@Getter
public final class ProceduralDimensionsPlugin extends JavaPlugin {
    private WorldManager worldManager;
    private GenerationManager generationManager;
    private EntityService entityService;
    private DimensionEventService eventService;
    private ItemService itemService;

    @Override
    public void onEnable() {
        saveDefaultConfig();
        saveResource("eventsConfig.yml", false);
        this.worldManager = new WorldManager(this);
        this.generationManager = new GenerationManager(this, worldManager);
        this.entityService = new EntityService(this, worldManager, generationManager);
        this.eventService = new DimensionEventService(this, worldManager);
        this.itemService = new ItemService(this);
        worldManager.loadAll();
        generationManager.start();
        entityService.start();
        eventService.start();
        getServer().getPluginManager().registerEvents(generationManager, this);
        getServer().getPluginManager().registerEvents(entityService, this);
        getServer().getPluginManager().registerEvents(itemService, this);
        BackroomsCommand command = new BackroomsCommand(this);
        PluginCommand backrooms = getCommand("backrooms");
        if (backrooms != null) {
            backrooms.setExecutor(command);
            backrooms.setTabCompleter(command);
        }
    }

    @Override
    public void onDisable() {
        if (generationManager != null) generationManager.shutdown();
        if (eventService != null) eventService.stop();
        if (entityService != null) entityService.stop();
    }

    public void reloadFramework() {
        reloadConfig();
        worldManager.loadAll();
        entityService.reload();
        eventService.reload();
        itemService.reload();
    }
}