#Sudden issues with worldgen datapack

1 messages · Page 1 of 1 (latest)

knotty flare
#

Heya, so basically I have two blocks that are duplicated—aloe vera, to be specific. Both mods have worldgen JSONs that I can reference; but unfortunately, when I attempted to edit the JSONs, I get an odd "invalid player data" issue.
Here's what I've attempted so far:

  • Create my own configured feature data in data/mypack/worldgen/configured_feature (two files)
  • Replace the JSON data of the mod with the aloe which I want to replace in data/biomeswevegone/worldgen/configured_feature/aloe_vera.json
  • Replace the JSON data of the mod with the aloe that I want to spawn in data/biomeswevegone/worldgen/configured_feature (two files)
    As for the error itself, it looks something like this:
[08Jan2025 08:30:42.954] [Server thread/ERROR] [net.minecraftforge.eventbus.EventBus/EVENTBUS]: Exception caught during firing event: Trying to access unbound value 'ResourceKey[minecraft:worldgen/configured_feature / bloomingnature:mangrove_swamp_cattails]' from registry net.minecraft.core.MappedRegistry$1@6fe64839

After which I immediately log out due to "invalid player data".

(on a separate note, I don't actually know why that feature in the log is erroring—it's a placed feature that I edited, not a worldgen one

also, I'm adding this data via KubeJS)

deft heathBOT
#

<@&1201956957406109788>

Someone will come and help soon!

💬 While you wait, take this time to provide more context and details.

🙇 If nobody has answered you by <t:1736345616:t>, feel free to use the Summon Helpers button to ping our helper team.

✅ Once your question has been resolved (or you no longer need it), please click Resolve Question or run /resolve

knotty flare
#

Here's one of the two JSONs that I edited for the mod with the aloe that I want to generate:

{
    "type": "minecraft:random_patch",
    "config": {
      "feature": {
        "feature": {
          "type": "minecraft:simple_block",
          "config": {
            "to_place": {
              "type": "minecraft:simple_state_provider",
              "state": {
                "Name": "atmospheric:aloe_vera",
                "Properties": {
                  "age": "5"
                }
              }
            }
          }
        },
        "placement": [
          {
            "type": "minecraft:block_predicate_filter",
            "predicate": {
              "type": "minecraft:all_of",
              "predicates": [
                {
                  "type": "minecraft:matching_blocks",
                  "blocks": "minecraft:air"
                },
                {
                  "type": "minecraft:matching_blocks",
                  "blocks": [
                    "minecraft:red_sand",
                    "atmospheric:red_arid_sand",
                    "biomeswevegone:cracked_red_sand",
                    "biomeswevegone:red_quicksand"
                  ],
                  "offset": [
                    0,
                    -1,
                    0
                  ]
                }
              ]
            }
          }
        ]
      },
      "tries": 96,
      "xz_spread": 7,
      "y_spread": 3
    }
  }
#

Here's the JSON of the mod with the aloe that I want to replace:

{
    "replace": true,
    "type": "minecraft:random_selector",
    "config": {
      "default": "atmospheric:patch_short_aloe_vera",
      "features": [
        {
          "chance": 0.5,
          "feature": "atmospheric:patch_tall_aloe_vera"
        }
      ]
    }
  }
#

Oh wait a second

#

the configured feature of that one log that I posted doesn't exist

#

so then that means it's similar to the other ones

#

hmmm

#

now I'm having troubles just getting into a world, which might be unrelated to this

#

:////

#

alr I can make a new world and enter it no problem

#

Let me try one more thing...

#

YAY IT WORKED! But there's just one tiny issue

#

Right now, I'm replacing already-existing configured feature data (replacing Atmospheric and BWG). Atmospheric's aloe configured feature data is set to 96 tries, while BWG originally has 6 tries, as seen below. is it possible to create my own configured feature and replace BWG's?

#

I think before, my configured features weren't being detected before BWG's data was changed.

#

that's disregarding the bloomingnature error

short knot
#

There's a lot here, I'm pretty lost

short knot
#

Make sure you're actually replacing configured features and placed features correctly. They are not interchangeable, and they are both worldgen files

knotty flare
#

but I solved the one that was unrelated

short knot
#

Ok

#

Well yes, you can replace/overwrite configured and/or placed features from a mod

knotty flare
#

ah I shouldve been more clear

#

yeah I know I can replace already-existing data

#

but if I create a new configured feature, if I replace existing data to reference the brand new configured feature, will it detect it?

#

just found the answer to my own question

#

oop

#

thats a no

short knot
#

If you make a placed feature reference a different configured feature, sure

#

I think the source of your confusion is a semantic one

#

You keep calling everything data, but not everything is data

knotty flare
#

uhhhh

short knot
#

You can replace an entire existing configured feature file, and have a placed feature reference that configured feature file instead of the original

knotty flare
#

I'm referring to all JSONs under the data pathway when I mean data :p

short knot
#

Everything in a data pack is necessarily in that directory

short knot
knotty flare
#

yeah right now here's my issue

#

gonna say it again in hopefully more clear terms

#

I'm creating two brand new configured feature files in data/mypack/worldgen/configured_feature, and I'm overwriting a configured feature file data/biomeswevegone/worldgen/configured_feature/aloe_vera.json to reference my two files

#

wait

#

WAIT

#

HOLD ON A SECOND

#

the configured feature is supposed to reference a placed feature????

short knot
#

A configured feature file (at least, for most feature types" can't reference another configured feature

knotty flare
#

OH

#

IM SO STUPID LOL

short knot
#

A placed feature can (and typically does) reference a configured feature

#

As I've said thrice now

knotty flare
#

what you said wasn't registering with me then

short knot
#

🤷🏼‍♂️

knotty flare
#

idk why or how but regardless

#

I now understand :p

short knot
#

Ok

knotty flare
#

ok so the solution here would be to create two NEW placed features to reference my configured features

short knot
#

Yes

knotty flare
#

then have aloe_vera.json reference the two placed

#

ok

#

got it

short knot
#

But just making new places features won't make them spawn

knotty flare
#

The aloe_vera.json configured feature is being referenced by other placed features within the BWG mod

#

or whatever

#

idk

short knot
#

Yes, that would be required

#

It doesn't change what I said

#

If they aren't replacing/overwriting existing ones, you need to then reference those placed features in the biomes you want them to spawn in

#

Biomes list the placed features that can spawn in them which then references the configured features that they place

#

Biome -> placed feature -> configured feature

#

Have you checked out our worldgen guide?

knotty flare
#

I have not

eager muskBOT
knotty flare
#

I'm just learning at each road block lol

short knot
#

I strongly recommend it. Worldgen is a very interconnected set of files. It's very hard to learn just one thing, because most things reference or get referenced by other things in order to work as expected

knotty flare
#

yeah seems to be very similar to structures in that regard

#

eghhgh

#

I'll make sure to check that out later, tyty!

deft heathBOT
knotty flare
#

Gotta test this out first to make sure it works 100%

#

IT WORKED! :D

#

Simply put two placed feature files referencing the configured feature files in data/mypack/worldgen/placed_feature, then I made the aloe_vera.json configured feature reference those placed features, and let the mod's other feature files handle the rest!!

#

Now, out of curiosity, before I close this ticket: right now, I put this as the code for the BWG biome mod's configured feature file:

{
    "replace": true,
    "type": "minecraft:random_selector",
    "config": {
      "default": "ourpack:patch_short_aloe_vera",
      "features": [
        {
          "chance": 0.5,
          "feature": "ourpack:patch_tall_aloe_vera"
        }
      ]
    }
  }

does this mean that there is a 50/50 chance for one of the placed features to be chosen for each try?

#

actually I'll just open up a separate ticket for this

deft heathBOT
#
Question Closed

Your question, #1326546851209412679 (Sudden issues with worldgen datapack), was resolved!

Original Message

#1326546851209412679 message

Duration open

1h13m