Modded blocks in config not working
Darkosto opened this issue · 12 comments
Hey!
I just setup a Rift and Monolith entry in the configs to go/to the Undergarden. All the entries seem correct but none of the modded blocks spawn in. Even the block used to enable the beacon does not properly function and minecraft:air activates the beacon. Do you think this might be a loading order issue?
{
"variants": [
{
"stairSelector": {
"entries": {
"minecraft:polished_blackstone_brick_stairs[facing=north,half=bottom,shape=straight,waterlogged=false]": 0.5,
"minecraft:blackstone_stairs[facing=north,half=bottom,shape=straight,waterlogged=false]": 0.5
},
"defaultBlock": "minecraft:blackstone_stairs[facing=north,half=bottom,shape=straight,waterlogged=false]"
},
"cornerSelector": {
"entries": {},
"defaultBlock": "minecraft:chiseled_polished_blackstone"
},
"insideSelector": {
"entries": {
"minecraft:cracked_polished_blackstone_bricks": 0.2
},
"defaultBlock": "minecraft:polished_blackstone_bricks"
},
"fenceSelector": {
"entries": {
"minecraft:blackstone_wall[east=none,north=none,south=none,up=true,waterlogged=false,west=none]": 0.33,
"minecraft:polished_blackstone_brick_wall[east=none,north=none,south=none,up=true,waterlogged=false,west=none]": 0.33,
"minecraft:polished_blackstone_wall[east=none,north=none,south=none,up=true,waterlogged=false,west=none]": 0.33
},
"defaultBlock": "minecraft:blackstone_wall[east=none,north=none,south=none,up=true,waterlogged=false,west=none]"
},
"powerBlock": "minecraft:gold_block",
"decorationBlock": "minecraft:yellow_glazed_terracotta[facing=north]",
"beamStopBlocks": [
"minecraft:obsidian"
],
"unpoweredBeamColor": {
"red": "14",
"green": "0c",
"blue": "24",
"alpha": "FF"
},
"poweredBeamColor": {
"red": "FF",
"green": "DC",
"blue": "73",
"alpha": "FF"
},
"minY": 35,
"maxY": 70,
"playerTeleportedMinY": 100,
"playerTeleportedMaxY": 130,
"spawnChance": 0.1,
"spawnDimension": "minecraft:the_nether",
"targetDimension": "minecraft:overworld"
},
{
"stairSelector": {
"entries": {
"undergarden:shiverstone_brick_stairs[facing=north,half=bottom,shape=straight,waterlogged=false]": 0.5,
"undergarden:shiverstone_stairs[facing=north,half=bottom,shape=straight,waterlogged=false]": 0.5
},
"defaultBlock": "undergarden:depthrock_brick_stairs[facing=north,half=bottom,shape=straight,waterlogged=false]"
},
"cornerSelector": {
"entries": {},
"defaultBlock": "undergarden:chiseled_shiverstone_bricks"
},
"insideSelector": {
"entries": {
"undergarden:cracked_shiverstone_bricks": 0.2
},
"defaultBlock": "undergarden:shiverstone_bricks"
},
"fenceSelector": {
"entries": {
"undergarden:shiverstone_wall[east=none,north=none,south=none,up=true,waterlogged=false,west=none]": 0.33,
"undergarden:shiverstone_brick_stairs[east=none,north=none,south=none,up=true,waterlogged=false,west=none]": 0.33,
"undergarden:shiverstone_brick_wall[east=none,north=none,south=none,up=true,waterlogged=false,west=none]": 0.33
},
"defaultBlock": "undergarden:shiverstone_wall[east=none,north=none,south=none,up=true,waterlogged=false,west=none]"
},
"powerBlock": "undergarden:cloggrum_block",
"decorationBlock": "minecraft:brown_glazed_terracotta[facing=north]",
"beamStopBlocks": [
"minecraft:obsidian"
],
"unpoweredBeamColor": {
"red": "43",
"green": "7E",
"blue": "44",
"alpha": "FF"
},
"poweredBeamColor": {
"red": "6B",
"green": "C8",
"blue": "6D",
"alpha": "FF"
},
"minY": 35,
"maxY": 70,
"playerTeleportedMinY": 100,
"playerTeleportedMaxY": 130,
"spawnChance": 0.1,
"spawnDimension": "undergarden:undergarden",
"targetDimension": "minecraft:the_nether"
}
]
}
@bessiq Okay, so I refactored my initialization logic to be like my other mods.. and yet, for some reason, it still wouldn't work even though the logic is exactly the same. No idea why. But I went ahead and added config checks during a few more world loading events, and I think it should be good now - at least, from my testing it seems to work with Quark. This fix is in the latest version, v0.3.4.
Hopefully this actually resolves the issue.
Hmm, seems like it could be. Although, that's pretty strange, because I'm pretty sure I load configs for Better Mineshafts at the exact same phase of mod loading, and it seems to work just fine. I guess it could be boiling down to a race condition. Do the logs mention anything useful?
I'll get back to you later on today! I've got a few errands to get finished up first. I'll get you as much useful info as I can find :D
I've also never been able to get modded blocks to work, and scouring my latest/debug logs for anything mentioning the blocks used, or Better Portals itself, came up empty. Vanilla blocks work fine.
To follow up on this, the client log does not seem to recognize the modded blocks used in my config. It may be due to the mod loading too soon and not having the blocks available. I think this is snippet referring to this:
[12:43:59] [modloading-worker-5/WARN] [yungsapi/]: WARNING: duplicate block Block{minecraft:air} added to BlockSelector! [12:43:59] [modloading-worker-5/ERROR] [yungsapi/]: JSON: Unable to find property east for block minecraft:air [12:43:59] [modloading-worker-5/ERROR] [yungsapi/]: JSON: Unable to find property waterlogged for block minecraft:air [12:43:59] [modloading-worker-5/ERROR] [yungsapi/]: JSON: Unable to find property south for block minecraft:air [12:43:59] [modloading-worker-5/ERROR] [yungsapi/]: JSON: Unable to find property north for block minecraft:air [12:43:59] [modloading-worker-5/ERROR] [yungsapi/]: JSON: Unable to find property west for block minecraft:air [12:43:59] [modloading-worker-5/ERROR] [yungsapi/]: JSON: Unable to find property up for block minecraft:air
Yo! Sorry for such a long wait guys. I've been so tunnel visioned on Better Dungeons that I've neglected my other mods for a while now.
It does seem that my config is loading files before other mods have registered their blocks. I'll take a look ASAP and try to find the problem. I did experiment with a new module loading architecture in this mod that none of my other mods use, so it may take me a little bit to move things around properly. Please bear with me :)
This was a problem of me never reloading the JSON configs after initialization, so it would only ever be loaded before modded blocks had the chance to be registered. v0.3.3 should fix this. Let me know if it works!
So, modded blocks are working now...kinda. If I add modded blocks to the Nether monolith and go to the Nether, the monoliths have modded blocks as expected. The new issue lies with the default rifts in the Overworld. If I create a new world and head down in spectator mode to search for modded rifts, all I can find are the default rifts. BUT, when I go to the Nether and come back to the Overworld, and explore new chunks, all the rifts I find have the modded blocks I set in the config, and I can't find any of the default rifts anymore.
I initially tested by adding a 2nd modded rift to the Overworld and leaving the default one in the config also, and then again by removing the default rift completely (making a new world each time). Incidentally, I did initially leave the default monolith in and added a 2nd modded one to the Nether, and could only find the default monolith. Once I removed the default monolith, I could only find the modded one after that. Let me know if this makes sense or you need any further info!
Note that you can only have one rift and monolith variant per dimension. Maybe that's your problem?
Hmm, that would explain the issue when I initially had the default and modded rift variant in the Overworld. But I removed the default and only kept the modded variant, and still saw some default rifts in a fresh world (also after restarting MC) - at least until I switched dimensions and came back to the Overworld. Then I only found the modded variant in new chunks.
But it was early and today has been hectic, so I will double-check later when I get a chance. I'll also test it with a smaller amount of other mods - just enough to have some modded blocks!
Hey again, I did a little more testing this morning to confirm my previous results. Logs, screenshots and BP configs can be found here: https://1drv.ms/u/s!Ah6Gka7s81VnioBrUyCSfiuA0XiYqg?e=mbNH3Z
Basically, it seems Overworld rifts are not recognizing the config until the Overworld is loaded for a second time (e.g. returning from the Nether). I replaced a few blocks with Quark blocks in the default rift and monolith, and created a new world. Below are the rifts I found near spawn (I bumped up the spawn rate to find them faster):
As you can see, they are not using the Quark blocks I added to the config. I then teleported to the Nether, and found a monolith. It was working as expected:
I teleported back to the Overworld and started searching new chunks past the rifts I had already found. The rifts in these chunks do have the modded blocks:
So, maybe the config is being loaded a little too late now? 🤷♂️
Let me know if you need anymore info. Thanks!