Realistic Terrain Generation

Realistic Terrain Generation

3M Downloads

Scattered features (temples, witch huts, etc) not generating

whichonespink44 opened this issue ยท 16 comments

commented

Despite adding some code from @Choonster, scattered features still aren't generating in vanilla biomes.

I think it might have something to do with the vanilla biomes not extending BiomeGenBase, but I'm not sure.

commented

Sweet, I've been looking at this for hours now. Never thought to include the temple generation code directly.

Would you be able to submit a pull request, or share the code here?

If it's working, I'll blitz through the rest of the vanilla re-organisation stuff and release v0.0.3 today.

commented

It is working same for jungle, tho i only tested it via forced output single biome.

I tried to pull request but i don't know how this works.
You could see my fork for the change.

commented

It's working!! :) I've just tested Deserts - just gonna go through the other biomes and make sure they're generating there before pushing to master.

Does this mean that witch huts should spawn as well? Are they considered 'temples' ?

commented

Yes, witch huts (SwampHut in the code) are part of the scattered feature generation. My code will generate them in any biome tagged as SWAMP.

commented

@Choonster - I thought I'd integrated your code correctly, but it didn't seem to be doing anything until I added Ezoteric's stuff in the latest commit (746a61e).

Is it a case of your code and his code working together? Or maybe I've not integrated your stuff correctly?

In any case, scattered features are generating in the relevant vanilla biomes now - just need to test to see if they're generating in modded biomes.

Here's the latest release: https://github.com/whichonespink44/Realistic-Terrain-Generation/releases/tag/v0.0.3

commented

My code was designed for the vanilla chunk provider. Your chunk provider wasn't actually generating scattered features (@Ezoteric fixed that), so my code was never being called.

commented

Of course, makes sense now. Gonna close this one for now, but may need to open it up again for modded biomes.

commented

I fixed the problem for you, as RWG/RTG uses it own generation you also had to add the generation for temples in the chunk generation file.

Did this after i tested it with the source and compiled myself (as your latest release is older)

PS: only tested desert so far not desert hills and the jungles and you dont have spwamp yet so cant test that anyway :P

commented

Closing this again for now. I've tested a world and confirmed scattered features are generating in every relevant biome.

commented

This isnt working when you disable a forced output biome.
When generating a map it stops generating and saying:

0] [Server thread/WARN] [FML]: ****************************************
[17:32:00] [Server thread/WARN] [FML]: * There is an attempt to load a chunk (-95,78) in dimension 0 that is already being loaded. This will cause weird chunk breakages.
[17:32:00] [Server thread/WARN] [FML]: * at net.minecraft.world.gen.ChunkProviderServer.originalLoadChunk(ChunkProviderServer.java:154)
[17:32:00] [Server thread/WARN] [FML]: * at mcp.mobius.pregen.exec.PregenExec.exec(PregenExec.java:131)
[17:32:00] [Server thread/WARN] [FML]: * at mcp.mobius.pregen.TickHandler.foo(TickHandler.java:16)
[17:32:00] [Server thread/WARN] [FML]: * at cpw.mods.fml.common.eventhandler.ASMEventHandler_107_TickHandler_foo_ServerTickEvent.invoke(.dynamic)
[17:32:00] [Server thread/WARN] [FML]: * at cpw.mods.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:54)
[17:32:00] [Server thread/WARN] [FML]: * at cpw.mods.fml.common.eventhandler.EventBus.post(EventBus.java:138)...
[17:32:00] [Server thread/WARN] [FML]: ****************************************
[17:32:00] [Server thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:748]: net.minecraft.util.ReportedException: Exception preparing structure feature

If you go there you get kicked cause of crash.

Now i also had this problem in RWG and somehow fixed it by adding the IDs in them but then only 1 kind of temple spawns instead of all 3, in one case i even had all 3 fused into one haha

Anyway this code still isnt good enough to work so..
@Choonster can you take a look and see if you know whats the problem ? plzz ;)

commented

What do you mean by "forced output biome"?

Could you post the full FML log on Gist? It looks like there was an exception in the structure code on the last line you posted.

I'll look into it further tomorrow.

commented

With regards to 'forced output biome', he's referring to a portion of debug code within \rtg\world\ChunkManagerRealistic.java (around line 371) which allows you to force the world to generate as a single biome. He was just saying that the error was caused when running a normal world, not one that was forced to generate as a single biome.

I didn't get this crash when I tested before I published the last release, but I'm going to try again now.

commented

Yeah im new to github lol anyway in the meantime he uploaded it, same crash ;)

commented

Think i fixed it.

commented

Btw the code that actually made the problem was :

public static class WeightedRandomScatteredFeature extends WeightedRandom.Item {
public final StructureComponent feature;

    public WeightedRandomScatteredFeature(StructureComponent feature, int itemWeightIn) {
        super(itemWeightIn);
        this.feature = feature;
    }
}

When you add the itemweight it crashes.
I tried to add it like this:

this.components.add(new WeightedRandomScatteredFeature(swamphut, 100));

No error in eclipse but it does crash ;)