Skip to content
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

StackOverflowError #4

Open
sargunv opened this issue Dec 11, 2016 · 2 comments
Open

StackOverflowError #4

sargunv opened this issue Dec 11, 2016 · 2 comments

Comments

@sargunv
Copy link

sargunv commented Dec 11, 2016

I get a stack overflow when trying to replace stone with netherrack and granite/andesite/diorite with lava.

worlds:
  world_other:
      copy: world
      chunk_generate:
        replace:
          class: ReplacePopulator
          replace:
            stone|0: netherrack
            stone|1: stationary_lava
            stone|3: stationary_lava
            stone|5: stationary_lava
[05:41:21 INFO]: Preparing start region for level 3 (Seed: -3237620260814576141)
[05:41:41 WARN]: [MagicWorlds] Task #4 for MagicWorlds v1.4-SNAPSHOT generated an exception
java.lang.StackOverflowError
	at net.minecraft.server.v1_11_R1.ChunkProviderServer.getChunkAt(ChunkProviderServer.java:120) ~[server.jar:git-Spigot-f950f8e-0a81101]
	at net.minecraft.server.v1_11_R1.ChunkProviderServer.getChunkAt(ChunkProviderServer.java:116) ~[server.jar:git-Spigot-f950f8e-0a81101]
	at net.minecraft.server.v1_11_R1.World.getChunkAt(World.java:329) ~[server.jar:git-Spigot-f950f8e-0a81101]
	at net.minecraft.server.v1_11_R1.World.getChunkAtWorldCoords(World.java:325) ~[server.jar:git-Spigot-f950f8e-0a81101]
	at net.minecraft.server.v1_11_R1.World.getType(World.java:806) ~[server.jar:git-Spigot-f950f8e-0a81101]
	at net.minecraft.server.v1_11_R1.WorldServer.a(WorldServer.java:556) ~[server.jar:git-Spigot-f950f8e-0a81101]
	at net.minecraft.server.v1_11_R1.WorldServer.a(WorldServer.java:542) ~[server.jar:git-Spigot-f950f8e-0a81101]
	at net.minecraft.server.v1_11_R1.BlockFlowing.onPlace(BlockFlowing.java:264) ~[server.jar:git-Spigot-f950f8e-0a81101]
	at net.minecraft.server.v1_11_R1.Chunk.a(Chunk.java:512) ~[server.jar:git-Spigot-f950f8e-0a81101]
	at net.minecraft.server.v1_11_R1.World.setTypeAndData(World.java:374) ~[server.jar:git-Spigot-f950f8e-0a81101]
	at net.minecraft.server.v1_11_R1.BlockFlowing.flow(BlockFlowing.java:160) ~[server.jar:git-Spigot-f950f8e-0a81101]
	at net.minecraft.server.v1_11_R1.BlockFlowing.b(BlockFlowing.java:142) ~[server.jar:git-Spigot-f950f8e-0a81101]
	at net.minecraft.server.v1_11_R1.WorldServer.a(WorldServer.java:559) ~[server.jar:git-Spigot-f950f8e-0a81101]
	at net.minecraft.server.v1_11_R1.WorldServer.a(WorldServer.java:542) ~[server.jar:git-Spigot-f950f8e-0a81101]
	...

The stack trace goes on for a long time (because it's a stack overflow).

@NathanWolf
Copy link
Member

I tried this out myself, and it's somewhat related to your other issue. It seems like no matter what I do, I can't prevent lava from flowing when setting it.

In this case, it triggers some weird kind of recursion issue, where the lava block flows into another chunk, causing that chunk to load, stone gets replaced with lava, flows into next chunk and so forth.

So it seems like, basically and unfortunately, you can't replace blocks with flowing blocks (lava, water, etc).

I realize this is kind of a shame... TBH there may be other plugins out there that handle this better, MagicWorlds is not exactly a first-class world generator :)

@sargunv
Copy link
Author

sargunv commented Dec 14, 2016

Thanks for looking into it. I've decided to write my own worldgen for my server as a Forge mod.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants