Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

[SOLVED] JSON File Error Missing Required Property 'values' When Adding a Structure Forge 1.18.2

Featured Replies

Posted

So I was trying to make a custom structure with Forge 1.18.2, the reference I used was TelepathicGrunt's structure tutorial for Forge 1.18.2. The JSON files seems fine since I just modified the name to my structure's name, all the file's path are also the same. But when I open my JSON file, there's an warning showing "Missing required property 'values' ." The quick fix option implemented this at the bottom of my file:

"values": [
    
  ]

But I don't know what to put in there. This warning occured at src/main/resources/data/fariouscraft/worldgen/configured_structure_feature/shabby_tent.json

Same warning also occured at src/main/resources/data/fariouscraft/worldgen/structure_set/shabby_tent.json

At first I ignored the warning, but when I launched into game and tried generate a new world, it tells me there was an error in the datapack loaded and I must use safe mode. But the button won't respond to do anything when I press safe mode.

Here's the JSON files

src/main/resources/data/fariouscraft/worldgen/configured_structure_feature/shabby_tent.json

{
  "type": "minecraft:village",

  "config": {
    "start_pool": "fariouscraft:shabby_tent/start_pool",

    "size": 2
  },

  "biomes": "#fariouscraft:has_structure/shabby_tent",

  "adapt_noise": true
}

src/main/resources/data/fariouscraft/worldgen/structure_set/shabby_tent.json

{
  "structures": [
    {
      "structure": "fariouscraft:shabby_tent",
      "weight": 1
    }
  ],
  "placement": {
    "salt": 1464187780,

    "spacing": 12,

    "separation": 8,

    "type": "minecraft:random_spread"
  }
}

The start_pool.json and the files within the template_pool directory is fine. But the console throw me an error:

Caused by: com.google.gson.JsonParseException: Error loading registry data: Failed to parse fariouscraft:worldgen/configured_structure_feature/shabby_tent.json file: com.google.gson.stream.MalformedJsonException: Expected name at line 23 column 2 path $.adapt_noise

I basically just copy and pasted TelepathicGrunt's files and even added them in the game, his works just fine, but mine won't work for some reason.

Any help would be appreciated, thanks :) 

 

Edit: I just added the mob spawning control code to the JSON file after adapt_noise, then debugged the program. After debugging, the error just magically disappeared when I ran the program again even though I have already tried that before debugging.

Edited by Jellofish83
Problem Solved

  • Jellofish83 changed the title to [SOLVED] JSON File Error Missing Required Property 'values' When Adding a Structure Forge 1.18.2

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.