-
-
Notifications
You must be signed in to change notification settings - Fork 241
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: Structures spawning on top of oceans #5146
Comments
I’m noticing in 1.19.2 that any dungeon spawns on top of the ocean or even on land too. I actually noticed this right after I added ice and fire. One of my staff members said this is actually a bug that’s existed for a few years due to ice and fire, and they were hoping it would be patched out of 1.19.2+. The world does not mess up structure generation in any way unless the ice and fire mod is installed. I don’t really know why? And it seems to be only dungeons. |
@norfaremc see my comment on the other issue |
@ffuentesm you'll have to post your biome configs and the biomes this happened in in the default configs graveyard cannot spawn in water-related biomes |
@SiverDX When running that command with minecraft:ocean in place of , I get this list: Apparently the dragon skeleton was on top of the water on a river that passed throughout a savanna biome. minecraft:windswept_savana |
and the content of |
though that biome config looks more like |
Well, I see the tag, but when running the command, the iceandfire:has_structure/graveyard appears in the minecraft:ocean. So it somehow is passing the filters. |
has_structure is just is_overworld it's not the actual biomes it can spawn in when the game wants to spawn a structure it checks against the configured values and determines if it's actually going to spawn or not (this is not how vanilla or other mods do it btw) |
@TheBv I think this Ice_and_Fire/src/main/java/com/github/alexthe666/iceandfire/world/structure/IafStructure.java Lines 45 to 55 in 8d1f70a
can lead to false positives This is what the structure usually uses to get the biome: private static boolean isValidBiome(Structure.GenerationStub pStub, Structure.GenerationContext pContext) {
BlockPos blockpos = pStub.position();
return pContext.validBiome.test(pContext.chunkGenerator.getBiomeSource().getNoiseBiome(QuartPos.fromBlock(blockpos.getX()), QuartPos.fromBlock(blockpos.getY()), QuartPos.fromBlock(blockpos.getZ()), pContext.randomState.sampler()));
} I think the current code needs to switch to that (in terms of getting the biome) Example of the problem:
Used this to get the single biome entry: pContext.biomeSource().getNoiseBiome(QuartPos.fromBlock(blockPos.getX()), QuartPos.fromBlock(blockPos.getY()), QuartPos.fromBlock(blockPos.getZ()), pContext.randomState().sampler()); |
Alternative: Drop the biome config for structures and let it be handled in the "vanilla" way by defining proper biomes in the biome tag for |
What happened?
The skeleton of dragons is spawning on top of the water, I assume it should be at the bottom of the ocean, or not be spawning in those areas at all.
Minecraft Version
1.20.1
Ice and Fire version
iceandfire-2.1.13-1.20.1-beta-2
Citadel version
citadel-2.4.9-1.20.1
Relevant log output
No response
Other Information
The text was updated successfully, but these errors were encountered: