Role: You are an Elite Java Developer and Senior PaperMC/Spigot Plugin Architect specializing in Custom World Generation.
My plugin name:- custom nether Generation
Project Context:
I am developing a massive custom Nether Overhaul plugin (similar to Incendium). I have the source data/structures, but I need you to write the Java plugin code from scratch. This is strictly a PaperMC Plugin, NOT a datapack.
CRITICAL CONSTRAINTS (DO NOT VIOLATE):
Zero Custom Items/Tools/Armor: Absolutely no code for custom items, weapons, or tools.
Zero Custom Mobs: Do not create or register any custom entities or custom AI.
Pure World-Gen Focus: The plugin must solely focus on Custom Biomes, Custom Block Designs (Terrain/Decorations), and Massive Custom Structures (Populators/Jigsaw).
Extreme Version Compatibility: The plugin must support a wide range of versions. The minimum baseline is 1.16.5 (The Nether Update), and it must be forward-compatible up to the absolute maximum latest versions (e.g., 1.21 through 1.26.2+ limits).
Act as an Expert Minecraft Server Developer.
I am building a custom Minecraft system. I need you to write the complete, fully functional code for "Stage 1: Core Logic & Commands".
Please follow these strict requirements exactly:
- Single File Constraint:
Write ALL the code for this entire stage in ONE single file. Do not split it into multiple modules or files.
- Auto-Generating Config System (Crucial):
The code MUST contain startup logic. The moment the server starts or the script/plugin is loaded, it must automatically generate a highly customizable file (like config.yml) inside the server's plugin folder.
- Complete Customization:
I need to be able to customize everything from that generated file. Put all chat prefixes, welcome messages, broadcast timers, and boolean toggles (true/false) inside this config. I should never have to open your source code again to change a message.
- Reload Command:
Create a custom admin command (e.g., /coreadmin reload). When I change something in the config file, this command should apply the new changes in-game instantly without restarting the whole server.
- Events & Game Loops:
Inside that same single file, include:
A 'Player Join' event that reads the welcome message from the config file and sends it.
A repeating 'Game Loop' (e.g., running every 1 or 5 minutes) that reads a timer interval from the config and broadcasts a message or performs an action.
Output format: You can write this in Skript (preferred for single-file config generation) or Java (Spigot/Paper API). Provide the complete code block and briefly tell me exactly which folder to put it in.
Plan:
Create one self-contained Java plugin class for config generation, reload handling, join messaging, and the configurable repeating loop.
Keep the implementation Paper/Bukkit API-only and free of custom items, mobs, or version-fragile world-generation APIs.
Created the Stage 1 plugin.
Files:
src/main/java/com/kodari/customnethergeneration/CustomNetherGeneration.javasrc/main/resources/plugin.yml
Place the project in a standard Paper plugin project and build the JAR. Copy the resulting JAR into the server’s plugins/ folder.
On first startup, it automatically creates:
plugins/CustomNetherGeneration/config.yml
Features included:
Configurable player join welcome message
Configurable message prefix
Configurable repeating broadcast loop
Enable/disable toggles
Configurable broadcast interval in seconds
/coreadmin reloadPermission:
customnethergeneration.adminPlaceholder support:
{player}{online}{world}{time}
The implementation contains no custom items, tools, armor, mobs, entities, or AI.
Act as an Expert Minecraft Server Developer.
I am building Phase 2 of my custom Minecraft server plugin/system for . This phase completely shifts focus away from traditional item modifiers.
Please write the complete, fully functional code/JSON configurations for "Phase 2: World Generation, Custom Structures, & Structure Loot".
You MUST strictly follow these conditions and exclusions:
- STRICT EXCLUSIONS (Do NOT include any of these):
NO custom items or renamed items.
NO custom weapons or armor.
NO custom mobs, bosses, or entities.
NO magic, spells, or custom powers.
NO custom bots or NPCs.
Absolutely NO modifications to player combat mechanics.
- INCLUSIONS & CORE FOCUS (What you MUST include):
Custom Biome Settings: Provide the setup or code to modify or create a unique biome (e.g., modifying terrain shape, surface blocks, or sky/water colors).
Custom Structures: Provide the logic/setup for spawning custom structures specifically within this modified biome. Explain how the structure generation is registered.
Customized Structure Loot (Crucial): Provide a highly randomized and modified Loot Table specifically for the chests inside these custom structures. The loot should use existing vanilla items but randomized in unique quantities or variations to make exploring rewarding.
- Output Format & Structure:
Since this involves world generation and loot tables, please provide the exact Datapack JSON folder structure (e.g., data/minecraft/...) OR the exact Skript/Java code required to achieve this. Detail every file path clearly so I can copy-paste your code directly into my server files. Provide a brief explanation of how the loot randomization works.
Inspect the existing plugin and build setup to determine the supported Paper APIs and current single-file constraints.
Implement the Phase 2 world-generation and loot configuration without custom items, mobs, entities, or combat changes.
Add the exact datapack/resource paths or Java integration needed to register the biome, structures, and randomized vanilla loot.
The project has no stable Bukkit API for registering a new biome or runtime loot-table key across 1.16.5 through current Paper versions. I’m implementing the compatible plugin-side approach: a configurable Nether biome profile using BiomeGrid plus custom terrain/surface generation, deterministic structure population in that biome, and a config-backed randomized vanilla loot table. The generated world can be created with the custom generator or selected through bukkit.yml.
Implemented Phase 2 in the existing single Java file.
Modified files
src/main/java/com/kodari/customnethergeneration/CustomNetherGeneration.javasrc/main/resources/plugin.yml
Included functionality
Configurable Nether terrain generator
Configurable terrain height and noise variation
Configurable lava level
Configurable floor, surface, subsurface, and bedrock materials
Vanilla Nether biome profile through
BiomeGridCustom citadel-style structure generation using a
BlockPopulatorStructure spawning chance, height limits, and block materials configurable
Vanilla chest generation
Randomized configurable loot using only existing Minecraft items
/coreadmin reload/coreadmin createExisting join messages and timed broadcasts retained
No custom items, weapons, armor, mobs, entities, NPCs, magic, or combat changes
Generated configuration location
After startup:
plugins/CustomNetherGeneration/config.yml
The configuration contains sections such as:
world-generation:
enabled: true
world-name: custom_nether
auto-create: false
custom-biome:
enabled: true
source-biome: BASALT_DELTAS
terrain:
base-height: 62
height-variation: 24
noise-scale: 0.055
lava-level: 32
floor: NETHERRACK
surface: SOUL_SOIL
sub-surface: BLACKSTONE
bedrock: BEDROCK
structures:
enabled: true
chance-per-chunk: 0.035
min-y: 20
max-y: 110
foundation: BLACKSTONE
wall: BASALT
trim: POLISHED_BLACKSTONE
lamp: GLOWSTONE
chest: CHEST
World creation
Use:
/coreadmin create
The configured world is created as a Nether world using the custom generator. Alternatively, the generator can be selected through bukkit.yml:
worlds:
custom_nether:
generator: CustomNetherGeneration
The generator only affects newly generated chunks. Existing chunks are not automatically regenerated.
Loot randomization
Loot is configured under:
structure-loot-table:
Each loot entry supports:
material: GOLD_INGOT
weight: 8
min: 2
max: 8
chance: 1.0
rollscontrols how many randomized selections each chest receives.weightcontrols relative selection frequency.minandmaxrandomize stack quantities.chancecontrols whether the selected entry is actually inserted.All generated loot uses standard vanilla materials.
Compatibility note
The stable Bukkit/Paper API does not provide a cross-version method for registering a truly new biome with custom registry colors across 1.16.5 through future versions. This implementation uses a configurable vanilla biome profile through BiomeGrid, while custom terrain and surface generation create the distinct environment.
A genuinely registered biome with custom sky, fog, water, and grass colors requires version-specific NMS or a datapack using version-specific biome JSON files.
Act as an Expert Minecraft Server Developer.
I am building Phase 3 of my custom Minecraft server system for . This phase focuses strictly on Loot Tables for Custom Nether World Generation.
Please write the complete, fully functional Datapack JSON configurations (or Skript/Java code if applicable) for "Phase 3: Custom Nether Structure Loot Systems".
You MUST strictly follow my established constraints and specific requirements:
- STRICT EXCLUSIONS (Do NOT include any of these):
NO custom items with custom model data or changed names.
NO custom weapons, armor, or magic powers.
NO custom mobs, bosses, or entities.
DO NOT modify Overworld or End dimensions. This is strictly for the NETHER.
- INCLUSIONS & CORE FOCUS (What you MUST write):
Nether-Specific Focus: The loot tables must be designed for chests hidden inside new, custom-generated structures within custom Nether biomes.
Vanilla Item Balancing: Use ONLY standard vanilla items (e.g., Gold Ingots, Netherite Scraps, Ancient Debris, Enchanted Books, Potions, Obsidian, Glowstone).
High Randomization & Tiers: Create highly randomized loot pools. Use weights, rolls, and conditions so that some chests have common exploration items, while hidden "treasure" chests have very rare vanilla rewards.
Bartering (Optional but preferred): If possible without adding custom items, provide a modified Piglin Bartering loot table that balances the vanilla drops in a new, interesting way.
- Output Format:
Provide the exact file structure needed for a Datapack (e.g., data/<namespace>/loot_tables/chests/...). Write out the complete JSON code for at least two different chest types (e.g., a "Common Ruin Chest" and a "Rare Vault Chest"). Add brief comments explaining how the random rolls and probabilities work in your code.
Plan:
Add two Nether-only vanilla loot-table JSONs: common ruin and rare vault.
Wire the existing custom structure chests to those datapack tables with a configurable rare-chest chance.
Add the datapack metadata and document the exact installation path.
Implemented Phase 3 with two Nether structure loot tables and Java integration.
Datapack structure
custom-nether-loot-datapack/
├── pack.mcmeta
└── data/
└── customnethergeneration/
└── loot_tables/
└── chests/
├── common_ruin.json
└── rare_vault.json
Install the custom-nether-loot-datapack folder into:
<world-folder>/datapacks/
For the generated custom Nether world:
world/custom_nether/datapacks/custom-nether-loot-datapack/
Then enable or reload it:
/datapack list
/reload
Java integration
The custom structure chest now selects one of the loot tables:
structure-loot-table:
common-key: customnethergeneration:chests/common_ruin
rare-key: customnethergeneration:chests/rare_vault
rare-chance: 0.12
Each generated structure chest has a:
88% chance to use
common_ruin12% chance to use
rare_vault
The plugin assigns the loot table to the chest, and Minecraft generates the contents when the chest is first opened.
Common Ruin Chest
common_ruin.json contains 3–6 rolls with weighted vanilla rewards:
Gold Ingots
Nether Quartz
Glowstone Dust
Obsidian
Crying Obsidian
Fire Charges
Nether Bricks
Rare Netherite Scraps
The Netherite Scrap entry has an additional 8% random chance.
Rare Vault Chest
rare_vault.json contains 4–7 rolls with higher quantities and rarer rewards:
Gold Ingots
Obsidian
Crying Obsidian
Glowstone Dust
Ancient Debris
Netherite Scraps
Gold Blocks
Diamonds
Additional rare-entry chances:
Ancient Debris: 35%
Netherite Scrap: 45%
Gold Block: 50%
Diamond: 20%
All rewards are standard vanilla items. No custom names, model data, weapons, armor, entities, mobs, combat modifications, or Overworld/End changes were added.
Files updated or created:
src/main/java/com/kodari/customnethergeneration/CustomNetherGeneration.javacustom-nether-loot-datapack/pack.mcmetacustom-nether-loot-datapack/data/customnethergeneration/loot_tables/chests/common_ruin.jsoncustom-nether-loot-datapack/data/customnethergeneration/loot_tables/chests/rare_vault.json
Act as an Expert Minecraft Datapack & World Generation Developer.
I need you to write the highly detailed, complete JSON configurations for a Custom Nether World Generation datapack.
- Core Style & Inspiration (Crucial):
You must analyze and mimic the exact design philosophy of top-tier Nether overhaul datapacks (similar to the complex structure of "Incendium"). The generation should not be simple. I need advanced, multi-layered terrain, highly atmospheric biomes (like an "Ash Barrens" or "Toxic Heap" equivalent), volumetric fog/particles, and unique terrain shaping.
- What You MUST Generate (Complete JSON Code & File Paths):
Please provide the exact file paths (e.g., data/<namespace>/worldgen/...) and the complete JSON code for the following components to create ONE fully fleshed-out, highly detailed custom Nether biome:
Biome JSON (worldgen/biome): Define the biome's properties perfectly. Include custom sky colors, fog colors, water colors, particle probabilities (like falling ash), ambient sounds, and biome music.
Surface Rules (worldgen/noise_settings or surface rule injections): Write the advanced block logic that dictates what blocks generate on the surface based on height and noise (e.g., layered blackstone, basalt, or bone blocks covering the terrain).
Features (worldgen/configured_feature & worldgen/placed_feature): Create at least 2-3 custom terrain features using vanilla blocks. For example: massive spikes, hanging stalactites, toxic fluid pools, or custom "trees/fungi" made out of bone or deepslate.
- Strict Constraints:
Do NOT use or require any custom resource packs, custom items, or mods. Use ONLY vanilla blocks creatively to build these complex environments.
Make the terrain shape distinct from the vanilla Nether wastes. Provide the exact mathematical noise routing or feature density needed to make it feel massive and immersive.
Do NOT add any server names or branding to the files or namespaces. Use a generic namespace like custom_nether.
Output the JSON blocks clearly, ensuring they are valid for the latest Minecraft datapack formats, and explain briefly how the surface rules layer the blocks.
Plan:
Add a standalone generic
custom_netherdatapack with a custom Nether dimension and fixed Ash Barrens biome.Add multi-scale density noise and layered surface rules using only vanilla blocks.
Add three placed terrain features—basalt spires, bone reefs, and lava vents—and explain installation/version scope.
Implemented a standalone vanilla datapack at:
custom-nether-worldgen-datapack/
It includes:
custom_nether:ash_barrensbiomeCustom Ash Barrens Nether dimension
Multi-octave terrain noise
Separate terrain and surface noise
Layered bedrock, soul soil, basalt, blackstone, and netherrack surface rules
Basalt spires
Bone reef formations
Lava vents
Ash particles
Basalt Deltas ambient sounds and music
Nether-only generation with no Overworld or End modifications
Important compatibility note
The files use the modern 1.21.x datapack registry format and:
"pack_format": 61
They target a modern Java Edition server. Datapack world-generation JSON is version-sensitive; do not use these files unchanged on 1.20.x or 1.16.x.
Installation
Copy:
custom-nether-worldgen-datapack/
into the datapacks directory of the world where the dimension should be available:
<world-folder>/datapacks/custom-nether-worldgen-datapack/
Then run:
/reload
The custom dimension is registered at:
custom_nether:ash_barrens
It can be accessed with:
/execute in custom_nether:ash_barrens run teleport @s 0 80 0
A new world or ungenerated region is required for terrain changes to appear.
Generation design
The terrain uses two custom noise definitions:
data/custom_nether/worldgen/noise/ash_shape.json
data/custom_nether/worldgen/noise/ash_surface.json
The density function combines:
A vertical gradient from approximately Y=0 to Y=128
Large-scale terrain noise at
xz_scale: 0.72Vertical terrain variation at
y_scale: 0.82Smaller surface breakup noise at
xz_scale: 1.8
This produces broad elevated formations with irregular secondary ridges rather than a flat Nether-wastes profile.
Surface layering
The surface rule sequence is evaluated from top to bottom:
Bedrock forms at the bottom five blocks.
Bedrock forms at the top five blocks.
Low surface-noise areas receive soul soil.
The next layer receives basalt.
Deeper surface layers receive blackstone.
Ceiling surfaces receive basalt.
Remaining terrain uses netherrack.
Feature placement
custom_nether:basalt_spires
Four attempts per chunk
Placed between Y=38 and Y=112
Uses basalt
custom_nether:bone_reefs
Two attempts per chunk
Placed between Y=25 and Y=104
Replaces netherrack, basalt, or blackstone with bone blocks
custom_nether:lava_vents
Approximately one attempt every twelve chunks
Placed between Y=18 and Y=72
Uses lava with basalt as the barrier state
No custom items, model data, renamed items, weapons, armor, mobs, bosses, entities, magic, resource packs, mods, or combat changes were added.
Act as an Expert Minecraft plugin & Jigsaw Structure Developer.
I need you to write the highly detailed, complete JSON configurations for "Phase 5: Advanced Custom Structures & Jigsaw Generation" for a custom Nether datapack.
- Core Concept & Inspiration (Crucial):
I am building massive, modular structures (like Castles, Dungeons, Ruined Labs, and Trap-filled Towers) using the Jigsaw generation system (similar to bastions or strongholds, inspired by top-tier datapacks like "Incendium"). The generation must be dynamic and randomized, combining different NBT piece files.
- STRICT EXCLUSIONS (Do NOT include any of these under any circumstances):
NO custom blocks, custom items, custom entities, or custom mobs.
NO mods or external plugins. Use 100% Vanilla datapack capabilities.
NO server names, branding, or specific player names anywhere in the code or namespaces. Use a generic namespace like custom_nether_structures.
NO Overworld or End structures. This is strictly for the Nether dimension.
- What You MUST Generate (Complete JSON Code & File Paths):
Please provide the exact file paths and the complete JSON configurations for the following specific components to register a massive, multi-part "Ruined Nether Citadel" structure:
Template Pool (worldgen/template_pool): Write the JSON for at least two connected pools (e.g., a "starting point/tower" pool and a "corridor/trap room" pool). Explain how the elements (NBT files) are weighted and linked together.
Structure (worldgen/structure): Define the starting pool, the generation step (e.g., surface_structures), the biomes it is allowed to spawn in, the terrain adaptation (e.g., beard_thin), and the max depth/size of the jigsaw generation.
Structure Set (worldgen/structure_set): Define the exact spacing and separation logic. Ensure it is rare and does not overlap awkwardly with vanilla fortresses or bastions.
Processor List (worldgen/processor_list - Highly Important): Provide a complex processor list JSON that modifies the NBT blocks as they spawn. For example, a processor that randomly replaces 30% of normal Blackstone with Cracked/Gilded Blackstone, turns some lava into magma blocks, or replaces specific blocks with hidden traps (like TNT under pressure plates or trapped chests).
- Output Requirements:
Output all JSON code blocks clearly with their exact data/ folder paths. Add brief comments within or after the JSON to explain how the Jigsaw connection logic (target pools and joint types) connects the different NBT pieces. Provide professional, production-ready code.
Plan:
Inspect the existing custom Nether datapack’s version and structure-generation files.
Add the Citadel template pools, structure, structure set, processor list, and required vanilla NBT template placeholders.
Keep generation Nether-only and document the jigsaw weights, connections, rarity, and processor behavior.
The registry JSON can be completed directly. One datapack limitation matters here: jigsaw pieces are binary compressed .nbt files, not JSON, so JSON alone cannot create the requested rooms or connector blocks. I’m correcting the vanilla block ID and adding the structure-set exclusion against the Nether complex set; the final output will identify the exact .nbt paths and connector data those JSON pools expect.Implemented the Phase 5 JSON registry configuration in:
custom-nether-structures-datapack/
Added files
custom-nether-structures-datapack/
├── pack.mcmeta
└── data/
├── custom_nether_structures/
│ ├── tags/
│ │ └── worldgen/
│ │ └── biome/
│ │ └── has_structure/
│ │ └── ruined_nether_citadel.json
│ └── worldgen/
│ ├── processor_list/
│ │ └── citadel_ruin.json
│ ├── structure/
│ │ └── ruined_nether_citadel.json
│ ├── structure_set/
│ │ └── ruined_nether_citadel.json
│ └── template_pool/
│ └── citadel/
│ ├── start.json
│ ├── corridors.json
│ └── rooms.json
Generation behavior
The structure:
custom_nether_structures:ruined_nether_citadel
is configured to:
Generate only in
custom_nether:ash_barrensRun during the
surface_structuresgeneration stepUse
beard_thinterrain adaptationGenerate up to eight jigsaw expansion levels
Start between Y=38 and Y=78
Project the starting piece to
WORLD_SURFACE_WGReach up to 128 blocks from the structure center
Use
custom_nether_structures:citadel/startas its starting pool
Template pool weights
The starting pool contains:
Piece | Weight | Approximate chance |
|---|---|---|
Central tower | 5 | 50% |
Gateway | 3 | 30% |
Ash spire | 2 | 20% |
The corridor pool contains:
Piece | Weight | Approximate chance |
|---|---|---|
Blackstone corridor | 5 | 50% |
Ash corridor | 3 | 30% |
Lava bridge | 2 | 20% |
The room pool contains:
Piece | Weight | Approximate chance |
|---|---|---|
Trap chamber | 4 | 50% |
Lava laboratory | 3 | 37.5% |
Vault | 1 | 12.5% |
The pieces are connected through jigsaw blocks inside their NBT templates. A jigsaw block in a starting piece should use:
target_pool: custom_nether_structures:citadel/corridors
Corridor jigsaw blocks should generally target:
custom_nether_structures:citadel/corridors
or:
custom_nether_structures:citadel/rooms
A connector using:
target_pool: minecraft:empty
terminates that branch.
Use matching connector names and target names, for example:
name: custom_nether_structures:corridor_connector
target: custom_nether_structures:corridor_connector
Structure spacing
The structure set uses:
"spacing": 48,
"separation": 32
This makes the citadel uncommon while preventing nearby candidate placements from generating too close together. It also excludes locations within twelve chunks of the vanilla Nether complex structure set:
"exclusion_zone": {
"other_set": "minecraft:nether_complexes",
"chunk_count": 12
}
This reduces awkward overlap with Nether fortresses and bastion remnants.
Processor behavior
The processor list applies randomized vanilla block damage and decoration:
30% of blackstone becomes cracked polished blackstone bricks
8% of eligible blackstone becomes gilded blackstone
18% of basalt becomes polished basalt
12% of netherrack becomes blackstone
22% of lava becomes magma blocks
25% of soul sand becomes soul soil
All processor outputs are vanilla blocks.
Required NBT templates
Jigsaw pools require binary structure templates. JSON alone cannot define the actual geometry of the rooms. The following .nbt files must exist under:
custom-nether-structures-datapack/data/custom_nether_structures/structures/
Expected paths:
structures/
└── citadel/
├── start/
│ ├── central_tower.nbt
│ ├── gateway.nbt
│ └── ash_spire.nbt
├── corridors/
│ ├── blackstone_corridor.nbt
│ ├── ash_corridor.nbt
│ └── lava_bridge.nbt
└── rooms/
├── trap_chamber.nbt
├── lava_lab.nbt
└── vault.nbt
These templates need to be saved with Minecraft structure blocks and must contain correctly configured jigsaw blocks. The registry JSON files are complete, but the structure cannot physically generate until those binary NBT templates are supplied.
The datapack uses only vanilla blocks and the existing custom_nether:ash_barrens Nether biome.
Act as an Expert Minecraft Plugin Developer (Spigot/Paper API).
CRITICAL CORRECTION & RESET: I am building a custom Server Plugin, absolutely NOT a Datapack. Please discard, ignore, and mentally "delete" any previous instructions or files related to Datapacks, JSON structures, or the data/ folder. We are strictly using Java for a Spigot/Paper environment (or Skript, if more efficient).
Please write the highly detailed, complete code for "Phase 6: Player Progression, Quests & Custom Achievements".
- Core Architecture (Multiple Files Allowed):
You are free to split the code into multiple logical files/classes (e.g., Main, QuestManager, PlayerListeners, and a quests.yml configuration file). The system must function as a true, lightweight server plugin.
- System Features & Logic (What you MUST write):
Event Listeners: Create robust listeners that detect when a player achieves specific milestones using vanilla mechanics. For example: entering a newly generated biome environment, discovering a structure, or defeating a standard vanilla boss (like the Wither or Warden).
Data Tracking: Create a system (using quests.yml or PersistentDataContainer) to track player progress so quests don't reset when they log out.
Reward & Feedback Execution: When a task is completed, the plugin must execute exciting feedback: send a Title/Subtitle to the screen, play a level-up sound, and grant vanilla rewards (like XP, in-game currency, or vanilla items).
- STRICT EXCLUSIONS (Do NOT include these):
NO Datapack JSON files whatsoever.
NO custom items, custom textures, or custom mobs. Keep it 100% vanilla-item friendly.
NO specific server names, branding, or watermarks in the code or configurations. Keep namespaces and prefixes completely generic.
- Output Requirements:
Provide the exact Plugin folder structure (e.g., src/main/java/com/customplugin/quests/... or plugins/Skript/scripts/...). Write out the complete, production-ready code for every class/file required. Include detailed comments explaining how I can easily add new quests or achievements into the configuration file later without touching the core code.
Inspect the existing Java plugin layout and build configuration.
Implement configurable progression, quest/achievement tracking, persistence, listeners, and reward feedback.
Add
quests.yml, plugin registration, and exact setup paths while excluding all datapack/data-folder artifacts from the implementation.
The progression module is in place. I’m correcting the command registration and one invalid vanilla reward material before finalizing, so the generated configuration remains valid on the project’s API baseline.
Implemented Phase 6 as a Java Spigot/Paper progression system.
Project structure
src/
├── main/
│ ├── java/
│ │ └── com/
│ │ └── kodari/
│ │ └── customnethergeneration/
│ │ ├── CustomNetherGeneration.java
│ │ └── progression/
│ │ ├── ProgressCommand.java
│ │ ├── ProgressionDataStore.java
│ │ ├── ProgressionType.java
│ │ ├── QuestDefinition.java
│ │ └── QuestManager.java
│ └── resources/
│ ├── plugin.yml
│ └── quests.yml
Implemented functionality
Persistent player progression stored in:
Plain Textplugins/CustomNetherGeneration/player-data.ymlConfigurable quests and achievements in:
Plain Textsrc/main/resources/quests.ymlBiome-entry detection
Nether fortress discovery through vanilla advancement completion
Wither defeat detection
Warden defeat detection
Repeatable and one-time objectives
Progress tracking across logouts and restarts
Vanilla experience rewards
Configurable internal currency rewards
Vanilla item rewards
Inventory overflow drops items safely at the player’s location
Completion title and subtitle
Vanilla level-up sound
Configurable completion messages
/progresscommand/questsaliasAutomatic
quests.ymlcreation in the plugin data folderReload support through the existing
/coreadmin reloadcommand
Available progression types
type: BIOME_ENTER
type: STRUCTURE_DISCOVER
type: BOSS_DEFEAT
Adding a new quest
Add another entry under either quests: or achievements: in quests.yml:
quests:
soul_sand_walker:
type: BIOME_ENTER
target: SOUL_SAND_VALLEY
goal: 1
repeatable: false
display-name: '&6Soul Sand Walker'
description: '&7Enter a Soul Sand Valley.'
rewards:
experience: 150
currency: 15
title: '&6New Region'
subtitle: '&e{quest}'
message: '&aCompleted: &f{quest}&a.'
items:
- material: GOLD
amount: 4
No Java changes are required for additional entries.
For multiple boss kills:
achievements:
repeated_wither_hunter:
type: BOSS_DEFEAT
target: WITHER
goal: 3
repeatable: false
display-name: '&5Wither Hunter'
description: '&7Defeat three Withers.'
rewards:
experience: 2000
currency: 250
title: '&5Boss Hunter'
subtitle: '&d{quest}'
message: '&aYou defeated three Withers.'
items:
- material: DIAMOND
amount: 5
Set repeatable: true to reset progress after completion and award the reward each time.
The implementation uses only vanilla entities, vanilla advancement events, vanilla biomes, vanilla sounds, vanilla experience, vanilla item materials, and YAML persistence. No datapack JSON, custom items, custom textures, custom mobs, or external plugins were added.
Act as an Expert Minecraft Plugin Developer (Spigot/Paper API or Skript).
I am building a custom Server Plugin. I need you to write the highly detailed, complete code for "Phase 7: Conditions, Event Filters & Tag Grouping (Utility Methods)".
- Core Concept (Plugin Architecture):
In datapacks, this would be predicates and tags. However, since this is a Plugin, I need you to create a robust Utility/Helper class (or Skript functions/aliases) that handles complex condition checking and grouping for the rest of my plugin to use.
- What You MUST Write (Features & Logic):
State Checkers (Predicates): Write optimized methods/functions to check specific player states and world conditions. Examples to include: checking if a player is sneaking, if a player is standing in the rain, if they are holding a specific vanilla item type, or if they are in a specific biome.
Material & Entity Grouping (Tags): Instead of JSON tags, write the Java code (using Sets, Enums, or Spigot's built-in Tag API) or Skript Aliases to group items together. Create a group for "All Custom Nether Biome Blocks", a group for "All Undead Entities", and a group for "Fragile Blocks" (like glass, leaves).
Event Filters: Create a sample event listener that uses these utility methods (e.g., An event that cancels fall damage ONLY IF the player is sneaking AND holding a specific vanilla item from your grouped list).
- STRICT EXCLUSIONS (Do NOT include these):
NO Datapack JSON files (No data/ folder structures). Everything must be coded as a Plugin.
NO custom items with custom model data, NO custom mobs, and NO custom blocks. Use 100% vanilla materials.
NO specific server names, branding, or watermarks. Keep namespaces generic.
- Output Requirements:
Provide the exact Plugin folder structure for your code (e.g., src/main/java/com/customplugin/utils/... or plugins/Skript/scripts/...). Write out the complete, production-ready code. Add detailed comments explaining how I can call these utility methods from other parts of my plugin to keep my code clean and efficient.
Add reusable
ConditionUtilstate and world checks with null-safe, cross-version-friendly behavior.Add immutable vanilla grouping sets for Nether blocks, undead entities, and fragile blocks.
Add a registered sample listener that filters fall damage by sneaking plus a grouped held item.
Wire the listener into the existing plugin without adding datapack files or custom content.
Implemented Phase 7 as a reusable Java utility layer.
Added structure
src/main/java/com/kodari/customnethergeneration/
├── CustomNetherGeneration.java
└── util/
├── ConditionUtil.java
└── ConditionEventListener.java
ConditionUtil
Provides reusable methods for:
isSneaking(Player)isStandingInRain(Player)isHoldingMaterial(Player, String)isHoldingMaterialFromGroup(Player, Set<Material>)isInBiome(Player, String)isCustomNetherBiomeBlock(Material)isCustomNetherBiomeBlock(ItemStack)isUndead(Entity)isFragileBlock(Material)parseMaterial(String)
Material parsing uses XSeries and safely ignores materials unavailable on older server versions.
Vanilla groups
ConditionUtil.Groups.CUSTOM_NETHER_BIOME_BLOCKS
ConditionUtil.Groups.UNDEAD_ENTITY_NAMES
ConditionUtil.Groups.FRAGILE_BLOCKS
The groups are immutable and include vanilla materials/entities only.
Example usage from another class:
if (ConditionUtil.isInBiome(player, "SOUL_SAND_VALLEY")
&& ConditionUtil.isStandingInRain(player)) {
player.sendMessage("&aThe conditions are satisfied.");
}
Or:
if (ConditionUtil.isUndead(entity)) {
entity.setFireTicks(100);
}
Registered sample event filter
ConditionEventListener is registered during onEnable().
It cancels fall damage only when:
The damage cause is fall damage.
The entity is a player.
The player is sneaking.
The player is holding a material from
CUSTOM_NETHER_BIOME_BLOCKSin either hand.
The listener uses:
ConditionUtil.isHoldingMaterialFromGroup(
player,
ConditionUtil.Groups.CUSTOM_NETHER_BIOME_BLOCKS
);
No datapack files, data/ folders, custom items, custom mobs, custom textures, or custom blocks were added.
Act as an Expert Spigot/Paper API Java Developer.
I have a project dump that incorrectly mixed a Java plugin with three external JSON Datapacks (custom-nether-loot-datapack, custom-nether-worldgen-datapack, custom-nether-structures-datapack).
Your task is to completely refactor this project to be a 100% standalone Java Plugin. You must delete all Datapack JSONs but KEEP EVERY SINGLE FEATURE by hardcoding their logic natively into the Java classes using the Spigot/Paper API.
Please rewrite the core Java files (specifically CustomNetherGeneration.java and any necessary helpers) following these strict requirements:
- Delete All Datapack Dependencies:
Acknowledge that all data/ folder JSONs (biomes, dimension, jigsaw template pools, and loot tables) are now deleted. Do not reference vanilla Datapack registries.
- Native Java World Generation (Replacing the WorldGen Datapack):
Update the existing NetherGenerator inside CustomNetherGeneration.java. Instead of relying on the external ash_barrens.json, use the Paper API's BiomeProvider and ChunkGenerator to procedurally create the Ash Barrens aesthetic. Handle the noise generation, surface rules (placing Soul Soil, Basalt, and Blackstone), and biome environment (fog, particles) natively in Java.
- Native Java Structures (Replacing the Jigsaw Datapack):
Update the existing CitadelPopulator. Do not use Jigsaw blocks or the ruined_nether_citadel.json. Instead, expand the Java logic to procedurally build the structure (or load a schematic programmatically) using nested loops, BlockData, and Spigot's Block API. Ensure the traps and cracked block variations are handled via Java Random logic.
- Native Java Loot System (Replacing the Loot Datapack):
In the CitadelPopulator, update the applyLootTable method. Stop trying to fetch a LootTable from Bukkit.getLootTable(key) which relies on the deleted datapacks. Instead, make it exclusively use the fillLoot(Inventory, Random) method that reads the highly customized LootEntry system already present in the config.yml.
- Preserve the Good Code:
Do NOT touch or break QuestManager.java, ConditionUtil.java, or any of the player progression and utility code. They are perfect as they are. Just focus on fixing the generation/loot integration.
Provide the completely updated CustomNetherGeneration.java file (and any new helper classes needed for worldgen) so I can compile it as a single, standalone plugin without any external datapacks
Inventory the current generator, populator, configuration, build, and datapack files.
Replace datapack-backed world generation with native Java biome/chunk generation and structure placement.
Replace Bukkit loot-table lookup with the configured Java loot-entry system.
Delete datapack JSONs and leave progression/utility classes untouched.
The current plugin already contains partial Java replacements, but its live loot path still calls Bukkit.getLootTable, and the structure populator does not reproduce the datapack processor/trap behavior. I’m reading the remaining feature definitions so the rewrite preserves the actual terrain features rather than only the filenames.
One compatibility correction is needed before finalizing: the project’s XSeries convention places particles in its particles package, not the root package. I’m also checking the Paper generator signatures used by the rewrite so the standalone class matches the project’s 1.16 API baseline.
Implemented the standalone Java refactor.
Updated
src/main/java/com/kodari/customnethergeneration/CustomNetherGeneration.java
The plugin now contains native Java replacements for:
Custom Nether terrain generation
Configurable noise-based terrain height
Soul Soil, Blackstone, Basalt, Netherrack, Bedrock, and Lava terrain
Native biome provider using the configured vanilla biome
Java-generated basalt spires
Java-generated bone reefs
Java-generated lava vents
Procedurally built citadels
Cracked Polished Blackstone and Gilded Blackstone variations
Polished Basalt and other processor-style block replacements
Random magma and lava traps
Configurable Java-based chest loot
Item stack splitting for materials exceeding their maximum stack size
Ash particles and basalt-delta ambient sounds
Existing quest, progression, and condition systems preserved
Loot changes
The plugin no longer references:
Bukkit.getLootTable(...)
NamespacedKey
LootTable
Chest#setLootTable(...)
Citadel loot now exclusively uses:
applyLootTable(...)
fillLoot(...)
lootEntries(...)
Loot is read from:
plugins/<plugin-folder>/config.yml
Example configuration:
structure-loot-table:
rolls: 5
entries:
diamond:
material: DIAMOND
weight: 1
min: 1
max: 3
chance: 0.2
Additional entries can be added without modifying Java code.
Deleted datapack files
All files inside these datapack directories were removed:
custom-nether-loot-datapack/
custom-nether-worldgen-datapack/
custom-nether-structures-datapack/
This includes all:
Loot table JSON files
Biome JSON files
Dimension JSON files
Noise settings
Density functions
Configured and placed features
Structure definitions
Structure sets
Template pools
Processor lists
Datapack metadata files
The progression classes and utility classes were not modified.
API limitation
The public Spigot/Paper API cannot register a completely new biome with custom fog, biome effects, or custom client-side ambience. The implementation therefore uses the configured vanilla biome, such as BASALT_DELTAS, for environment behavior and adds native Java ash particles and ambient sounds around players. No datapack biome registry is used.
Act as an Expert Spigot/Paper API Java Developer (Performance & WorldGen Specialist).
I am building a massive, standalone Java-native custom Nether generator plugin (CustomNetherGeneration). I need you to combine strict safety locks with high-performance, TerraformGenerator-level chunk generation, multiple custom biomes, and multiple custom structures.
CRITICAL RULE: NO JSON DATAPACKS. ZERO. Everything (Biomes, Structures, Loot, Noise) MUST be coded 100% natively in Java.
Please write/refactor the core plugin files to implement the following systems:
- The Safety & bukkit.yml Lock (Anti-Chunk Mixing):
The plugin MUST NOT generate the world unless configured explicitly in bukkit.yml (worlds: custom_nether: generator: CustomNetherGeneration).
In onEnable(), check if the target world folder exists. If it exists but is NOT using our generator (i.e., it's an old vanilla world), throw a massive getLogger().severe() warning telling the admin to delete the old world folder. Temporarily disable the generator to prevent chunk-border mixing.
- High-Performance / Lag-Free Generation (Terraform-like):
The terrain generation must be buttery smooth. Do not block the main thread.
Optimize the ChunkGenerator by using fast mathematical noise (e.g., Simplex/Perlin noise implementations) instead of heavy java.util.Random calls.
Ensure the code is compliant with Paper's Asynchronous Chunk Generation system. Pre-calculate chunk data efficiently so that when a player flies fast, chunks load instantly without server TPS drops.
- Beautiful, Multi-Biome System (Native Java):
Implement a custom BiomeProvider that uses 3D noise to map multiple breathtaking custom biomes.
Create at least 3 distinct custom biomes (e.g., Ash Barrens, Soul Canyons, and Crimson Dunes).
Map them to vanilla biomes for the client (for fog colors), but completely change their block palettes, heights, and terrain shapes in your Java generateChunkData logic.
- Multiple Custom Structures & Distinct Loot:
Expand beyond a single citadel. Create an abstract/base structure populator system.
Implement at least 3 unique, detailed custom structures (e.g., Ruined Nether Citadel, Ash Spire Tower, and Lava Catacombs).
Build them procedurally using Java logic (nested loops, varying rooms).
Map specific, highly balanced, vanilla-item loot tables to each structure type (e.g., the Vault gets Diamonds/Debris, the Catacombs get Gold/Bones) using the plugin's config.yml (no datapack lookups).
- Output Requirements:
Review the entire architecture. Ensure the progression/quest system (QuestManager, ConditionUtil) remains intact. Provide the highly detailed, heavily commented, production-ready Java code for the core generation classes (CustomNetherGeneration.java, your BiomeProvider, your updated ChunkGenerator, and the StructurePopulators).
Audit the current plugin entrypoint, generator, populators, config, build target, and world-registration flow.
Add strict
bukkit.ymlgenerator-lock validation and safe disable behavior.Implement native multi-biome async-friendly terrain generation with vanilla client biome mapping.
Add a reusable structure-populator framework with three procedural structures and config-driven loot.
Register everything without modifying
QuestManagerorConditionUtil, then remove any remaining datapack references.
The audit shows the current project has no checked-in datapacks or build file; world generation is concentrated in one 932-line class, and the existing implementation is still single-biome/single-structure. I’ll keep the progression and utility files unchanged, split generation into thread-safe helper classes, and make the main class retain its current commands/configuration behavior.
The new generation layer is in place. Before wiring it into the entrypoint, I’m tightening two correctness points: generators must use an immutable settings snapshot rather than YAML during async work, and the structure salts must remain valid Java literals. The next patch removes the old nested single-biome/single-citadel implementation and exposes only the safe integration methods needed by the new classes.
Implemented the native Java generation refactor.
Added core generation classes
src/main/java/com/kodari/customnethergeneration/
├── CustomNetherGeneration.java
├── GenerationSettings.java
├── NativeNoise.java
├── CustomBiome.java
├── CustomBiomeProvider.java
├── NativeNetherGenerator.java
├── AbstractStructurePopulator.java
├── CitadelPopulator.java
├── AshSpirePopulator.java
└── LavaCatacombsPopulator.java
Safety lock
CustomNetherGeneration#getDefaultWorldGenerator(...) now returns a generator only when:
worlds:
custom_nether:
generator: CustomNetherGeneration
is present in the server’s bukkit.yml.
The plugin also checks the target world folder during startup. If the folder already exists but is not configured for this generator, it:
Logs a prominent safety warning.
Sets the generator into a disabled lock state.
Refuses automatic world creation.
Refuses to return a generator.
Prevents vanilla/custom chunk mixing.
The server-side configuration should contain:
worlds:
custom_nether:
environment: nether
generator: CustomNetherGeneration
bukkit.yml should remain in the server root and should not be packaged inside the plugin JAR.
Native terrain generation
Added deterministic allocation-light noise using NativeNoise:
2D fractal value noise for terrain height.
3D climate noise for biome selection.
No per-column
Randomallocation.Immutable
GenerationSettingssnapshots for generation threads.Configurable height, scale, lava level, seed offset, and palettes.
Bedrock ceiling and floor generation.
Vanilla
Biomemappings for client-side rendering.
Custom biome profiles
Implemented three Java-side biome profiles:
CustomBiome.ASH_BARRENS
CustomBiome.SOUL_CANYONS
CustomBiome.CRIMSON_DUNES
They map to vanilla client biomes:
ASH_BARRENS -> BASALT_DELTAS
SOUL_CANYONS -> SOUL_SAND_VALLEY
CRIMSON_DUNES -> CRIMSON_FOREST
The public Spigot/Paper API cannot register new client-visible biome registry entries with custom fog independently of vanilla biomes. The terrain, palettes, height profiles, and structure rules are custom Java logic; vanilla biomes provide client rendering and environmental effects.
Native structures
Added a shared AbstractStructurePopulator with deterministic structure seeds, material processing, chest placement, and loot handling.
Implemented:
CitadelPopulatorBlackstone foundation.
Basalt walls.
Polished-blackstone towers.
Glowstone lamps.
Random magma and lava traps.
Citadel-specific loot.
AshSpirePopulatorTall irregular basalt towers.
Glowstone caps.
Optional spire chests.
Ash Barrens-only placement.
LavaCatacombsPopulatorThree connected chamber sections.
Nether-brick shell.
Polished-blackstone trim.
Magma floor channels.
Lava core.
Gold and bone-focused loot.
All structures remain within their originating chunk bounds to avoid cross-chunk placement conflicts.
Loot system
Loot is entirely configuration-driven and does not use Bukkit loot-table registries.
Supported paths include:
structure-loot-table:
structure-loot-table.citadel:
structure-loot-table.catacombs:
structure-loot-table.spire:
The loot system supports:
Weighted entries.
Minimum and maximum stack amounts.
Per-entry chance.
Structure-specific loot pools.
Automatic stack splitting.
Invalid-material filtering.
No calls remain to:
Bukkit.getLootTable(...)
LootTable
NamespacedKey
Chest#setLootTable(...)
Preserved code
These files were left untouched:
src/main/java/com/kodari/customnethergeneration/progression/QuestManager.java
src/main/java/com/kodari/customnethergeneration/util/ConditionUtil.java
The existing progression listeners, commands, quests, and utility condition system remain integrated.
The repository currently contains no datapack JSON files or data/ folders, and the new implementation contains no datapack registry dependencies.
Act as an Expert Spigot/Paper API Java Developer (Plugin Architect & WorldGen Specialist).
We are finalizing the CustomNetherGeneration Java plugin. You must take all the previous requirements (Strict bukkit.yml Safety Locks, Async FastMath Chunk Generation, Native Java Structures, and Loot) and upgrade the codebase with the following 5 CRITICAL NEW SYSTEMS.
- Maximum Configurability (The "Ultimate config.yml"):
The user wants to be able to change everything without touching the Java code. In your addMissingDefaults() method, you must expose variables for literally everything:
Toggles for every single biome and structure.
Noise scale, height variation, and base height settings.
Trap spawn chances, ruined block variants percentages (e.g., chance of cracked blackstone).
Complete loot tables (weights, min, max, material).
Mob spawn modifiers (if applicable).
- The Anti-Bug & Failsafe System (Resilience):
Implement robust try-catch blocks around config loading, chunk generating, and structure populating.
If the user makes a typo in config.yml (e.g., typing a string instead of a number, or an invalid Material name), the plugin MUST NOT crash the server or break chunk generation. It must gracefully fallback to a hardcoded default value, log a polite warning in the console, and continue working perfectly.
- 100% Vanilla Preservation (Ores & Mobs):
Do NOT wipe out vanilla Nether features.
In your ChunkGenerator implementation, you MUST override methods like shouldGenerateDecorations(), shouldGenerateCaves(), and shouldGenerateMobs() and return true (or handle them in a way that preserves vanilla generation).
Ancient Debris, Nether Quartz, Nether Gold, and standard Nether biomes/mobs MUST generate at their normal vanilla Y-levels alongside your new custom terrain/structures. Do not break the vanilla Nether ecosystem.
- Anti-Remove Item & Seamless Gameplay (Non-Interference):
Ensure your code does NOT interfere with player inventories. When a player travels to this custom Nether via portal or command, their inventory must remain 100% untouched.
Do not add any restrictive BlockPlaceEvent or BlockBreakEvent listeners unless absolutely necessary for a specific custom feature. Players must be able to build and break blocks normally.
- Zero External Dependencies:
The plugin must be 100% standalone. No WorldEdit, No ProtocolLib, No Vault.
Ensure the plugin.yml has NO depend: or softdepend: requirements.
Output: Provide the fully updated, highly commented, production-ready Java code for the entire plugin (Main class, Generator, Populators, Config/Utility classes). Make sure the config.yml generation code is massive and covers all tunable variables!
Audit the current main, generator, noise/biome, structure, settings, and resource files.
Refactor configuration into validated, immutable settings covering terrain, biome/structure toggles, traps, variants, loot, and mob modifiers.
Add resilient generation/population boundaries with safe material parsing and fallback logging.
Preserve vanilla decoration, caves, mobs, Nether ores, and normal player gameplay without inventory or protection listeners.
Update
config.yml/plugin.ymland wire the validated settings into the generator and structures.
The existing code has two important gaps: most generation values are still read directly from mutable YAML, and structures still hardcode chances/material variants. I’m moving those values into an immutable validated snapshot; malformed values will be warned about once during load and replaced per-field, while async chunk work will only read that snapshot. Vanilla-preservation hooks will remain hard-coded true so a config typo or toggle cannot disable Nether ores, caves, decorations, structures, or mobs.
The validated snapshot is now wired into terrain, biome selection, structure toggles, trap probabilities, block variants, and Java loot pools. I’m doing the final compatibility pass now: preserving legacy internal field references, ensuring configured source biomes are honored when custom profiles are disabled, and adding a hard fallback if snapshot construction itself encounters an unexpected API/config exception.
Implemented the configurability and resilience upgrade.
Added
New immutable
GenerationSettingssnapshot for thread-safe async generation.New
GenerationConfigutility with validated configuration loading.Full toggles for:
Ash Barrens
Soul Canyons
Crimson Dunes
Citadel
Ash Spire
Lava Catacombs
Configurable terrain:
Base height
Height variation
Noise scales
Noise octave counts
Climate noise
Canyon/dune shaping
Lava level
Floor Y
Seed offset
Every terrain material
Configurable structures:
Spawn chances
Y limits
Materials
Trap chance
Lava trap chance
Cracked blackstone chance
Gilded blackstone chance
Polished basalt chance
Spire chest chance
Fully native Java loot tables:
Per-structure rolls
Material
Weight
Minimum amount
Maximum amount
Chance
Configurable mob modifier values are exposed without disabling vanilla mob generation.
Safe fallback behavior for:
Invalid booleans
Invalid integers
Invalid decimal values
Invalid material names
Invalid biome names
Broken loot entries
Broken
bukkit.ymlUnexpected configuration exceptions
Chunk generation exceptions
Structure population exceptions
Vanilla preservation
NativeNetherGenerator now explicitly preserves:
shouldGenerateDecorations() -> true
shouldGenerateCaves() -> true
shouldGenerateMobs() -> true
shouldGenerateStructures() -> true
The plugin does not register block-break, block-place, inventory, portal, or item-removal listeners. Player inventories and normal gameplay remain untouched.
Important correction
Loot, structures, and terrain now use the immutable settings snapshot rather than reading YAML during generation. This avoids unsafe mutable configuration access during asynchronous Paper chunk generation.
Progression preserved
QuestManager, ConditionUtil, progression commands, quest listeners, and progression data storage were not modified.
Dependency status
plugin.yml remains dependency-free. No WorldEdit, ProtocolLib, Vault, datapacks, loot registries, or external runtime dependencies were added.
Act as an Expert Spigot/Paper API Java Developer.
I tested the compiled CustomNetherGeneration plugin on my server, but it crashed immediately during onEnable() with the following error: java.lang.IllegalAccessError: class com.kodari.customnethergeneration.GenerationSettings$Builder tried to access private method 'void com.kodari.customnethergeneration.GenerationSettings.<init>(com.kodari.customnethergeneration.GenerationSettings$Builder)' The Issue:
At GenerationSettings.java:208, the nested Builder class is trying to instantiate GenerationSettings using its private constructor. Due to JVM versioning or nestmate access rules, this is throwing an IllegalAccessError.
The Fix Required:
Please provide the corrected Java code for GenerationSettings.java. You need to change the access modifier of the GenerationSettings constructor (the one that accepts the Builder) from private to public (or package-private).
Also, please quickly scan the rest of the file to ensure no other nested classes are trying to access private fields/methods in a way that would trigger this same strict access error. Output the completely fixed GenerationSettings.java class.
Updated GenerationSettings.java:
Changed the
GenerationSettings(Builder)constructor fromprivatetopublic.Reviewed nested
Builder,LootTable, andLootEntryclasses.No other nested-class access patterns require changes; their accessed fields and constructors are already safely accessible.
package com.kodari.customnethergeneration;
import com.cryptomorin.xseries.XMaterial;
import com.cryptomorin.xseries.XSound;
import com.cryptomorin.xseries.particles.XParticle;
import com.kodari.customnethergeneration.progression.ProgressCommand;
import com.kodari.customnethergeneration.progression.QuestManager;
import com.kodari.customnethergeneration.util.ConditionEventListener;
import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
import org.bukkit.Material;
import org.bukkit.World;
import org.bukkit.WorldCreator;
import org.bukkit.command.CommandSender;
import org.bukkit.configuration.ConfigurationSection;
import org.bukkit.configuration.file.YamlConfiguration;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import org.bukkit.event.Listener;
import org.bukkit.event.player.PlayerCommandPreprocessEvent;
import org.bukkit.event.player.PlayerJoinEvent;
import org.bukkit.event.server.ServerCommandEvent;
import org.bukkit.generator.ChunkGenerator;
import org.bukkit.inventory.Inventory;
import org.bukkit.inventory.ItemStack;
import org.bukkit.plugin.java.JavaPlugin;
import org.bukkit.scheduler.BukkitTask;
import java.io.File;
import java.time.LocalTime;
import java.time.format.DateTimeFormatter;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Locale;
import java.util.Random;
/**
* Standalone Java implementation of the custom Nether world.
*
* <p>No method in this class loads a datapack registry, loot table, template
* pool, dimension JSON, or structure JSON. A Bukkit custom generator can
* provide terrain and a vanilla biome, but it cannot register a new biome
* with custom fog in the public API. The configured vanilla biome therefore
* supplies the client-side environment, while the scheduled ash effect below
* supplies the extra atmosphere without requiring a datapack.</p>
*/
public final class CustomNetherGeneration extends JavaPlugin implements Listener {
private static final DateTimeFormatter TIME_FORMAT = DateTimeFormatter.ofPattern("HH:mm:ss");
private File configurationFile;
private YamlConfiguration configuration;
private BukkitTask gameLoopTask;
private BukkitTask atmosphereTask;
private QuestManager questManager;
private volatile GenerationSettings generationSettings;
private CustomBiomeProvider biomeProvider;
private boolean generatorLocked;
@Override
public void onEnable() {
if (!loadAndCreateConfiguration()) {
getLogger().severe("The configuration could not be created or loaded. Disabling plugin.");
getServer().getPluginManager().disablePlugin(this);
return;
}
generationSettings = createGenerationSettings();
if (!validateGeneratorLock()) {
generatorLocked = true;
getLogger().severe("============================================================");
getLogger().severe("CUSTOM NETHER GENERATION HAS BEEN SAFETY-DISABLED");
getLogger().severe("The target world folder already exists without this generator.");
getLogger().severe("Delete the old world folder, then set this generator in bukkit.yml:");
getLogger().severe("worlds: " + configuredWorldName() + ": generator: CustomNetherGeneration");
getLogger().severe("Do not allow vanilla and custom chunks to mix across a border.");
getLogger().severe("============================================================");
}
Bukkit.getPluginManager().registerEvents(this, this);
questManager = new QuestManager(this);
if (!questManager.load()) {
getLogger().severe("The progression configuration could not be loaded. Disabling plugin.");
getServer().getPluginManager().disablePlugin(this);
return;
}
Bukkit.getPluginManager().registerEvents(questManager, this);
Bukkit.getPluginManager().registerEvents(new ConditionEventListener(), this);
if (getCommand("progress") != null) {
getCommand("progress").setExecutor(new ProgressCommand(questManager));
}
scheduleGameLoop();
scheduleAtmosphere();
if (!generatorLocked) {
createConfiguredWorld();
}
getLogger().info("Standalone custom Nether generation enabled.");
}
@Override
public void onDisable() {
cancelGameLoop();
if (atmosphereTask != null) {
atmosphereTask.cancel();
atmosphereTask = null;
}
if (questManager != null) {
questManager.shutdown();
}
}
/**
* Bukkit calls this only for worlds that explicitly name this plugin in
* bukkit.yml. The second check is intentional: returning null is safer
* than silently allowing a vanilla generator to create mixed chunks.
*/
@Override
public ChunkGenerator getDefaultWorldGenerator(String worldName, String id) {
if (configuration == null || generationSettings == null || generatorLocked
|| !generationSettings.enabled || !isGeneratorConfiguredInBukkitYml(worldName)) {
return null;
}
if (generatorLocked) {
return null;
}
String configuredWorld = configuration.getString("world-generation.world-name", "custom_nether");
if (configuredWorld != null && !configuredWorld.trim().isEmpty()
&& !configuredWorld.equalsIgnoreCase(worldName)) {
return null;
}
return new NativeNetherGenerator(this, generationSettings);
}
@EventHandler
public void onPlayerJoin(PlayerJoinEvent event) {
if (configuration.getBoolean("events.player-join.enabled", true)) {
sendConfigured(event.getPlayer(), "messages.welcome.text", event.getPlayer(),
"&aWelcome to the Nether, {player}! Explore safely.");
}
}
@EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)
public void onPlayerCommand(PlayerCommandPreprocessEvent event) {
if (handleAdminCommand(event.getPlayer(), event.getMessage())) {
event.setCancelled(true);
}
}
@EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)
public void onServerCommand(ServerCommandEvent event) {
if (handleAdminCommand(event.getSender(), event.getCommand())) {
event.setCancelled(true);
}
}
private boolean handleAdminCommand(CommandSender sender, String rawCommand) {
if (rawCommand == null) {
return false;
}
String commandLine = rawCommand.trim();
if (commandLine.startsWith("/")) {
commandLine = commandLine.substring(1).trim();
}
if (commandLine.isEmpty()) {
return false;
}
String[] arguments = commandLine.split("\\s+");
String configuredName = configuration.getString("command.name", "coreadmin");
if (configuredName == null || !arguments[0].equalsIgnoreCase(configuredName)) {
return false;
}
String permission = configuration.getString("command.permission", "customnethergeneration.admin");
if (sender instanceof Player && permission != null && !permission.isEmpty()
&& !sender.hasPermission(permission)) {
sendConfigured(sender, "messages.command.no-permission", null,
"&cYou do not have permission to use this command.");
return true;
}
if (arguments.length < 2) {
sendConfigured(sender, "messages.command.usage", null,
"&eUsage: /coreadmin reload or /coreadmin create");
return true;
}
if (arguments[1].equalsIgnoreCase("reload")) {
if (reloadConfiguration()) {
sendConfigured(sender, "messages.command.reload-success", null,
"&aConfiguration reloaded successfully.");
} else {
sendConfigured(sender, "messages.command.reload-failure", null,
"&cConfiguration reload failed. Check the console.");
}
return true;
}
if (arguments[1].equalsIgnoreCase("create")) {
createConfiguredWorld(sender);
return true;
}