https://linen.dev logo
Advanced generator not working
# cobblegen
r
Copy code
{
  "cobbleGen": [
  ],
  "stoneGen": [
    "minecraft:bedrock": [
        {
          "id": "minecraft:diorite",
          "weight": 100.0
        },
        {
          "id": "minecraft:andesite",
          "weight": 100.0
        },
        {
          "id": "minecraft:granite",
          "weight": 100.0
        }
      ]
  ],
  "basaltGen": [
    // You can leave this empty if you don't need them
  ],
  "customGen": {
          "minecraft:bedrock": [
        {
          "id": "minecraft:diorite",
          "weight": 100.0
        },
        {
          "id": "minecraft:andesite",
          "weight": 100.0
        },
        {
          "id": "minecraft:granite",
          "weight": 100.0
        }
      ]
  },
  // ----------------------------------
  // What you need is these part below:
  // Advanced Custom Generator (Custom Fluid Interaction)
  "advanced": {
    // Make sure to use still version of the fluid for this one,
    // - "minecraft:lava" not "minecraft:flowing_lava"
    // - "milk:still_milk" not "milk:flowing_milk"
    // How the fluid's ID is constructed depends on how the corresponding mod creator does things.
    "kubejs:molten_signalum": {
      // replicates minecraft cobblestone and stone generator
      // This one can be flowing or still version of the fluid, if still doesn't work try flowing.
      "minecraft:water": {
        // stone generator
        "resultsFromTop": {
          "*": [  // wildcard, accept any block as modifier
            {
              "id": "minecraft:stone",
              "weight": 100.0,
            }
          ]
        },
        // cobblestone generator
        "results": {
          "*": [  // wildcard, accept any block as modifier
            {
              "id": "minecraft:cobblestone",
              "weight": 100.0,
            }
          ]
        }
      },
    }
  }
}
https://cdn.discordapp.com/attachments/1513644488600588409/1513644646847479999/image.png?ex=6a287aed&is=6a27296d&hm=537487c4a4d294562004cd3696c04c95b24e1b104e3b42426540e1096496d963&
a
Sorry for late response, can you send the logs? Also what version + mod loader you're using?
Looking at your config, "stoneGen" seems to be the culprit, you're using customGen format in it, remove the
"minecraft:bedrock": [
part if you want to use what's defined inside it. https://cdn.discordapp.com/attachments/1513644488600588409/1514149055201149020/image.png?ex=6a2a50b2&is=6a28ff32&hm=cd9b210ac1b19b9393cf4d9dab38cc9b6e08bed99f8cac9ed48a8ba2fce085bc&
r
I'll try this out...
but I was under the impression I could use StoneGen under CustomGen to be using a custom modifier but do stone outputs
and the bedrock ones do work, it's just the advanced one that doesn't work
a
You could, but the format is slightly different:
Copy code
json
{
"stoneGen": [
  {
    "id": "minecraft:diorite",
    "weight": 100.0
  },
  {
    "id": "minecraft:andesite",
    "weight": 100.0
  },
  {
    "id": "minecraft:granite",
    "weight": 100.0
  }
],
}
vs:
Copy code
json
{
// define custom gen (generator with modifier)
"customGen": {
  "stoneGen": {  // define a stone gen, water touched by lava from above
    "minecraft:bedrock": [  // modifier
      {
        "id": "minecraft:diorite",
        "weight": 100.0
      },
      {
        "id": "minecraft:andesite",
        "weight": 100.0
      },
      {
        "id": "minecraft:granite",
        "weight": 100.0
      }
    ]
  }
}
}
"`customGen->stoneGen`" accepts modifier while while just "`stoneGen`" don't. The mod revert back to default config (or last working config) because the format was invalid
The bedrock one being working is probably a false positive since it revert to default (or last working) config
r
ahhh I see
thanks I'll try this later today and report back
Copy code
json
{
"customGen": {
        "cobbleGen": {
            "minecraft:quartz_block": [
                {
                    "id": "minecraft:diorite",
                    "weight": 100.0,
                },
            ],
            "minecraft:smooth_basalt": [
                {
                    "id": "minecraft:andesite",
                    "weight": 100.0,
                },
            ],
        },
    },
}
Tried this standalone from a different support thread, aswell as the one you showed me, neither worked. The advanced generator did work flawlessly without either of the customGens, though. Logs tell me absolutely nothing, only saying something caused an error. Tried to turn on experimental features, maybe that would work, didn't.
Copy code
[00:04:06] [Server thread/INFO] [minecraft/MinecraftServer]: [owemris: Reloading!]
[00:04:06] [Server thread/INFO] [CobbleGen/]: [CobbleGen] Reloading generators...
[00:04:06] [Server thread/INFO] [CobbleGen/]: [CobbleGen] Reloading plugin from [cobblegen]
[00:04:06] [Server thread/INFO] [CobbleGen/]: [CobbleGen] Create mod detected, loading integration...
[00:04:06] [Server thread/INFO] [CobbleGen/]: [CobbleGen] Reloaded plugin from [cobblegen]
[00:04:06] [Server thread/INFO] [CobbleGen/]: [CobbleGen] Reloading plugin from [cobblegen]
[00:04:06] [Server thread/INFO] [CobbleGen/]: [CobbleGen] Reloading built-in plugin...
[00:04:06] [Server thread/INFO] [CobbleGen/]: [CobbleGen] Trying to reload 'generator' config file...
[00:04:06] [Render thread/INFO] [minecraft/ChatComponent]: [CHAT] Reloading!
[00:04:06] [Server thread/ERROR] [CobbleGen/]: [CobbleGen] There was an error while reloading 'generator' config file!
io.github.null2264.shadowed.jankson.api.SyntaxError: Found spurious '{' while parsing an object.
[00:04:06] [Server thread/WARN] [CobbleGen/]: [CobbleGen] Falling back to previously working config...
[00:04:06] [Server thread/INFO] [CobbleGen/]: [CobbleGen] 5 generators has been added from config
[00:04:06] [Server thread/INFO] [CobbleGen/]: [CobbleGen] Reloaded plugin from [cobblegen]
[00:04:06] [Server thread/INFO] [CobbleGen/]: [CobbleGen] 7 generators has been reloaded
[00:04:06] [Server thread/INFO] [KubeJS/]: Added bindings for script type SERVER from mod 'almostunified': [AlmostUnified]
[00:04:06] [Server thread/INFO] [KubeJS Server/]: src/misc.js#195: Loaded Java class 'com.simibubi.create.content.processing.burner.BlazeBurnerBlock'
@abundant-engineer-56746
The codeblock is the whole file btw nothing else
a
> The advanced generator did work flawlessly without either of the customGens, though. Yeah... cuz the format is invalid for Json > Logs tell me absolutely nothing, only saying something caused an error. Tried to turn on experimental features, maybe that would work, didn't. It did tells you that the format is invalid so it revert back to last working config as you can see from this line:
Copy code
[00:04:06] [Server thread/ERROR] [CobbleGen/]: [CobbleGen] There was an error while reloading 'generator' config file!
io.github.null2264.shadowed.jankson.api.SyntaxError: Found spurious '{' while parsing an object.
Not sure which config causes that, but I recommend putting it inside https://json-5.com/ first to check if the formatting valid or not.
r
You gotta be kidding me
okay well thats worked
thanks
solved
@abundant-engineer-56746 okay so the code works now but ive found a bug in the obsidian generation code
Copy code
java
public Optional<BlockState> tryGenerate(LevelAccessor level, BlockPos pos, FluidState source, FluidState neighbour) {
        if (Generator.getStillFluid(neighbour) == getFluid()) {
            if (source.getType() == Fluids.LAVA && source.isSource()) {
                if (ConfigMetaData.INSTANCE.enableExperimentalFeatures)
                    return getBlockCandidate(level, pos, getObsidianOutput(), Blocks.OBSIDIAN, ConfigMetaData.INSTANCE.lenientModifier);
                return Optional.of(Blocks.OBSIDIAN.defaultBlockState());
            }

            return getBlockCandidate(level, pos, getOutput(), null, ConfigMetaData.INSTANCE.lenientModifier);
        }
        return Optional.empty();
    }
https://github.com/null2264/CobbleGen/blob/root/cobblegen/src/main/java/io/github/null2264/cobblegen/data/generator/CobbleGenerator.java#L109C52-L109C58
youre checking exclusively if the block is lava
which makes it so the custom obsidian doesnt work.. unless its lava
i dont know java though so idk if my asssesment is correct
maybe im looking at the wrong thing but from what ive tested it seems to be correct
why does it stop working entirely when im trying to show proof that it only works for lava
Copy code
json
{
  "customGen": {
    "stoneGen": {
      "minecraft:bedrock": [
        {"id": "minecraft:diorite", "weight": 100},
        {"id": "minecraft:andesite", "weight": 100},
        {"id": "minecraft:granite", "weight": 100}
      ]
    }
  },
  "advanced": {
        "minecraft:lava": {
            "minecraft:water": {
                "obsidian": {
                    "*": [{"id": "minecraft:crying_obsidian","weight": 100.0}]
                },
                "results": {
                    "*": [{"id": "minecraft:sand","weight": 100.0}]
                }
            }
        }
    }

}
EVERYTHING here works except for the crying obsidian (this is just as a test)
if i set the fluid to what i actually want
kubejs:molten_signalum
then the obsidian recipe makes sand, which is expected, but that means the obsidian gen isnt getting processed
and yes the json is fine ive changed the blocks and reloaded it numerous times without issue
dancing frog pro blem dude im dying
a
Oh, you're right, I forgot to remove that check
2 Views