Bug : Datapack Generation structure customised

Started by gourmon on

Topic category: Help with modding (Data Packs)

Last seen on 18:36, 22. Feb 2024
Joined Feb 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Bug : Datapack Generation structure customised

I am encountering an issue related to custom structure generation in my Minecraft datapack. Below is a summary of the situation, errors, and attempted solutions:

  1. Structure Pool Definition:

    • Structure pool file (datapacktest:petitdonjon_pool.json) defines a structure named "datapacktest:petitdonjon" with a weight of 1 and placement details.
    {
      "structures": [
        {
          "structure": "datapacktest:petitdonjon",
          "weight": 1
        }
      ],
      "placement": {
        "type": "minecraft:random_spread",
        "spacing": 10,
        "separation": 3,
        "salt": 39100385
      }
    }
    

2 Jigsaw Block Configuration:

  • Jigsaw block file (datapacktest:petitdonjon_jigsaw.json) references the structure pool for placement, set to generate at the surface in plains biome

    {
     "type": "minecraft:jigsaw",
     "start_pool": "datapacktest:petitdonjon",
     "size": 1,
     "max_distance_from_center": 64,
     "spawn_overrides": {},
     "step": "SURFACE_STRUCTURES",
     "terrain_adaptation": "beard_box",
     "start_height": {
       "absolute": 0
     },
     "project_start_to_heightmap": "WORLD_SURFACE_WG",
     "biomes": "plains",
     "use_expansion_hack": false
    }
    

3 Structure File:

  • The structure file (datapacktest:petitdonjon.json) defines the structure details, including a block ignore processor to exclude structure blocks.

 

{
 "name": "datapacktest:petitdonjon",
 "fallback": "minecraft:empty",
 "elements": [
   {
     "weight": 1,
     "element": {
       "element_type": "minecraft:single_pool_element",
       "location": "datapacktest:petitdonjon",
       "projection": "rigid",
       "processors": {
         "processors": [
           {
             "processor_type": "minecraft:block_ignore",
             "blocks": [
               {
                 "Name": "minecraft:structure_block"
               }
             ]
           }
         ]
       }
     }
   }
 ]
}
3 Errors Encountered:
  • I have encountered the following errors during structure generation attempts:
    • "Unknown element name: SURFACE_STRUCTURES"
    • "Unknown element name: STRONGHOLDS"
    • "Failed to parse datapacktest:worldgen/structure/donjon_1fixedv_3.json"
  1. Attempts Made:
    • Adjusted the step parameter in the Jigsaw block configuration to use "SPREAD_64_ABOVE" and "SPREAD_32_ABOVE" instead of "SURFACE_STRUCTURES".
    • Verified JSON syntax and structure in all configuration files.
    • Checked the naming and references for consistency.

I am seeking assistance to identify the root cause of these errors and potential solutions. Your help is much appreciated. If you need additional information or clarification, please let me know.

Caused by: java.lang.RuntimeException: Unknown element name:SPREAD_64_ABOVE at com.mojang.serialization.DataResult.lambda$getOrThrow$5(DataResult.java:101) at com.mojang.datafixers.util.Either$Right.map(Either.java:99) at com.mojang.serialization.DataResult.getOrThrow(DataResult.java:93) at ahb.a(SourceFile:181) ... 29 more
16:30:16.647
fib
Render thread
Failed to load level data or datapacks, can't proceed with server load java.util.concurrent.ExecutionException: java.lang.IllegalStateException: Failed to load registries due to above errors
Caused by: java.lang.IllegalStateException: Failed to load registries due to above errors 
> Errors in registry minecraft:worldgen/structure: >> Errors in element datapacktest:petitdonjon: java.lang.IllegalStateException: Failed to parse datapacktest:worldgen/structure/petitdonjon.json from pack file/petitdonjon1

 

I understand that you've been experiencing this issue for two days, and you're uncertain if I've encountered a similar problem. While I don't have direct experience with your specific issue, I've provided you with a general example of source code for custom structure generation in Minecraft datapacks.

If you're still facing difficulties after trying the provided examples, I recommend checking community forums, Minecraft-related websites, or seeking help from other developers who may have encountered similar issues. Sharing your specific problem with the Minecraft community might lead to valuable insights and assistance.

If you find a solution or make progress, feel free to share your experiences and code adjustments here. I'll do my best to assist you further if needed. Good luck with resolving your Minecraft datapack issue! Tanks You !

  •  
Last seen on 18:36, 22. Feb 2024
Joined Feb 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I want to know if this is a…
Sat, 02/03/2024 - 15:54

I want to know if this is a bug in the Minecraft game or if it's players creating datapacks that generate custom structures. Also, if you have found the source of the problem, could you please let me know =)"

I hope this helps. If you have any more questions or if there's anything else I can assist you with, feel free to let me know!