Jump to content

[1.6.4] [SOLVED(?)] Structure "cut off" at chunk borders


SanAndreaP

Recommended Posts

I have a really hard time trying to fix this. I basically generate a structure in the world with a custom IWorldGenerator. Sometimes it happens when the structure is generated, it gets cut off at chunk borders.

I tried to force-load the chunks the structure is being built into, but this doesn't work either.

 

I will be grateful for any hint / advice for solving this.

 

Here's a screenshot of how the structure gets cut off:

http://puu.sh/7UX4K.jpg

 

Here's the IWorldGenerator class:

https://github.com/SanAndreasP/EnderStuffPlus/blob/code-cleanup/java/sanandreasp/mods/EnderStuffPlus/world/EnderStuffWorldGenerator.java

 

And here's the actual class where the structure gen is happening:

https://github.com/SanAndreasP/EnderStuffPlus/blob/code-cleanup/java/sanandreasp/mods/EnderStuffPlus/world/WorldGenEndLeak.java

Don't ask for support per PM! They'll get ignored! | If a post helped you, click the "Thank You" button at the top right corner of said post! |

mah twitter

This thread makes me sad because people just post copy-paste-ready code when it's obvious that the OP has little to no programming experience. This is not how learning works.

Link to comment
Share on other sites

I have this exact same problem and still have not found a perfect solution.

 

I was able to ameliorate it somewhat, however, by doing my generation on the final PopulateChunkEvents that post every time: GLOWSTONE for the Nether, and ICE for the overworld. LAKE actually is posted last, but it's not posted for every chunk.

 

If you want, you can see what I did here.

 

It's far from perfect, and in fact some of my secret rooms do still get chopped up by chunk borders; if your structure is less than 16x16 in area, as a last resort you can make sure it only ever generates in the center of a chunk; again, not ideal, but it should work.

 

Let me know if you ever come up with a better solution! This problem has been haunting me for months >.<

Link to comment
Share on other sites

I have this exact same problem and still have not found a perfect solution.

 

I was able to ameliorate it somewhat, however, by doing my generation on the final PopulateChunkEvents that post every time: GLOWSTONE for the Nether, and ICE for the overworld. LAKE actually is posted last, but it's not posted for every chunk.

 

If you want, you can see what I did here.

 

It's far from perfect, and in fact some of my secret rooms do still get chopped up by chunk borders; if your structure is less than 16x16 in area, as a last resort you can make sure it only ever generates in the center of a chunk; again, not ideal, but it should work.

 

Let me know if you ever come up with a better solution! This problem has been haunting me for months >.<

 

I've never noticed an event like this existed... It is actually a better solution, since dungeons themselves get also generated "at population".

I will tinker with it and observe the results, Thanks!

Don't ask for support per PM! They'll get ignored! | If a post helped you, click the "Thank You" button at the top right corner of said post! |

mah twitter

This thread makes me sad because people just post copy-paste-ready code when it's obvious that the OP has little to no programming experience. This is not how learning works.

Link to comment
Share on other sites

So it seems the events fixed my problem, awesome!

Also I actually found the "true-last" event fired during population: PopulateChunkEvent.Post, but note that this is fired in the EVENT_BUS and not in the TERRAIN_GEN_BUS! I don't know if it's still the case in 1.7, though.

 

So here's my modified code:

WorldGenerator (it's now completely event-driven, IMO it's better than the IWorldProvider):

https://github.com/SanAndreasP/EnderStuffPlus/blob/code-cleanup/java/sanandreasp/mods/EnderStuffPlus/world/EnderStuffWorldGenerator.java

 

And this is the Common Proxy, where I basically register the generator:

https://github.com/SanAndreasP/EnderStuffPlus/blob/code-cleanup/java/sanandreasp/mods/EnderStuffPlus/registry/CommonProxy.java#L42-L44

 

Thanks again, coolAlias for the tip!

Don't ask for support per PM! They'll get ignored! | If a post helped you, click the "Thank You" button at the top right corner of said post! |

mah twitter

This thread makes me sad because people just post copy-paste-ready code when it's obvious that the OP has little to no programming experience. This is not how learning works.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • Ok, so my friend has been trying to enter my minecraft modded server but he keeps getting these errors: Internal Exception: java.lang.StringIndexOutOfBoundsException: offset 108, count 101, length 141 and Internal exception: net.minecraft.class_151: Non [a-z0-9/._-] Character in path of location: minecraft:daf\uFFFD\uFFFD\uFFFD\uFFFD\\U\uFFFD\u00115\u0011\uFFFDzK\uFFFDQo, \uFFFD\uFFFD)\uFFFd\uFFFD( Logs: https://mclo.gs/AQjtPE8
    • I figured out that the issues was due to using the wrong version of https://www.curseforge.com/minecraft/mc-mods/werewolves-become-a-beast  thank you Ughar for telling me that I sent the logs wrong, I will keep that in mind for next time I experience an issue
    • can someone help me out I'm trying to figure out why I cannot mind nothing with a pickaxe I tried every type of pickaxe and i'm still not get any material on mine a block plz help ps and i add Load My F***ing Tags and still nothing  
    • Hi! This is my first time creating a mod in Minecraft. It will be for personal use, and the goal is to play creepy/scary music at night. I want it to play without overlapping with Minecraft music (C418, etc.). I have almost finished it, but I don't know how to detect if Minecraft music is playing. I tried accessing a "currentMusic" variable in the MusicManager class via reflection, but it doesn't work.   Class<?> musicManagerClass = musicManager.getClass(); java.lang.reflect.Field currentMusicField = musicManagerClass.getDeclaredField("currentMusic"); currentMusicField.setAccessible(true); currentMusic = (SoundInstance) currentMusicField.get(musicManager); Does anyone know how to do it?
    • Please I need help if anyone can I will leave the log below         [15jun2024 18:11:44.134] [main/INFO] [cpw.mods.modlauncher.Launcher/MODLAUNCHER]: ModLauncher running: args [--username, {MINECRAFT_USERNAME}, --version, 1.16.5, --gameDir, C:\Users\{COMPUTER_USERNAME}\AppData\Roaming\com.modrinth.theseus\profiles\xD, --assetsDir, C:\Users\{COMPUTER_USERNAME}\AppData\Roaming\com.modrinth.theseus\meta\assets, --assetIndex, 1.16, --uuid, {MINECRAFT_UUID}, --accessToken, ????????, --userType, msa, --versionType, release, --width, 854, --height, 480, --launchTarget, fmlclient, --fml.forgeVersion, 36.2.39, --fml.mcVersion, 1.16.5, --fml.forgeGroup, net.minecraftforge, --fml.mcpVersion, 20210115.111550] [15jun2024 18:11:44.136] [main/INFO] [cpw.mods.modlauncher.Launcher/MODLAUNCHER]: ModLauncher 8.1.3+8.1.3+main-8.1.x.c94d18ec starting: java version 1.8.0_412 by Azul Systems, Inc. [15jun2024 18:11:44.525] [main/INFO] [net.minecraftforge.fml.loading.FixSSL/CORE]: Added Lets Encrypt root certificates as additional trust [15jun2024 18:11:44.574] [main/INFO] [mixin/]: SpongePowered MIXIN Subsystem Version=0.8.4 Source=file:/C:/Users/{COMPUTER_USERNAME}/AppData/Roaming/com.modrinth.theseus/meta/libraries/org/spongepowered/mixin/0.8.4/mixin-0.8.4.jar Service=ModLauncher Env=CLIENT [15jun2024 18:11:46.205] [main/INFO] [cpw.mods.modlauncher.LaunchServiceHandler/MODLAUNCHER]: Launching target 'fmlclient' with arguments [--version, 1.16.5, --gameDir, C:\Users\{COMPUTER_USERNAME}\AppData\Roaming\com.modrinth.theseus\profiles\xD, --assetsDir, C:\Users\{COMPUTER_USERNAME}\AppData\Roaming\com.modrinth.theseus\meta\assets, --uuid, {MINECRAFT_UUID}, --username, {MINECRAFT_USERNAME}, --assetIndex, 1.16, --accessToken, ????????, --userType, msa, --versionType, release, --width, 854, --height, 480] [15jun2024 18:11:46.676] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1052]: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException [15jun2024 18:11:46.677] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1052]:     at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:39) [15jun2024 18:11:46.677] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1052]:     at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:54) [15jun2024 18:11:46.677] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1052]:     at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:72) [15jun2024 18:11:46.677] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1052]:     at cpw.mods.modlauncher.Launcher.run(Launcher.java:82) [15jun2024 18:11:46.678] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1052]:     at cpw.mods.modlauncher.Launcher.main(Launcher.java:66) [15jun2024 18:11:46.678] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1061]: Caused by: java.lang.reflect.InvocationTargetException [15jun2024 18:11:46.678] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1061]:     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [15jun2024 18:11:46.678] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1061]:     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) [15jun2024 18:11:46.678] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1061]:     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [15jun2024 18:11:46.679] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1061]:     at java.lang.reflect.Method.invoke(Method.java:498) [15jun2024 18:11:46.679] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1061]:     at net.minecraftforge.fml.loading.FMLClientLaunchProvider.lambda$launchService$0(FMLClientLaunchProvider.java:37) [15jun2024 18:11:46.679] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1061]:     at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:37) [15jun2024 18:11:46.679] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1061]:     ... 4 more [15jun2024 18:11:46.679] [main/INFO] [STDERR/]: [java.lang.Throwable:printStackTrace:644]: Caused by: java.lang.NoSuchMethodError: org.apache.logging.log4j.core.impl.ThrowableProxy.formatExtendedStackTraceTo(Ljava/lang/StringBuilder;Ljava/util/List;Lorg/apache/logging/log4j/core/pattern/TextRenderer;Ljava/lang/String;Ljava/lang/String;)V [15jun2024 18:11:46.680] [main/INFO] [STDERR/]: [java.lang.Throwable:printStackTrace:644]:     at cpw.mods.modlauncher.log.TransformingThrowablePatternConverter.generateEnhancedStackTrace(TransformingThrowablePatternConverter.java:87) [15jun2024 18:11:46.680] [main/INFO] [STDERR/]: [java.lang.Throwable:printStackTrace:644]:     at net.minecraftforge.fml.CrashReportExtender.generateEnhancedStackTrace(CrashReportExtender.java:65) [15jun2024 18:11:46.680] [main/INFO] [STDERR/]: [java.lang.Throwable:printStackTrace:644]:     at net.minecraftforge.fml.CrashReportExtender.generateEnhancedStackTrace(CrashReportExtender.java:55) [15jun2024 18:11:46.680] [main/INFO] [STDERR/]: [java.lang.Throwable:printStackTrace:644]:     at net.minecraft.crash.CrashReport.func_71498_d(CrashReport.java:119) [15jun2024 18:11:46.680] [main/INFO] [STDERR/]: [java.lang.Throwable:printStackTrace:644]:     at net.minecraft.crash.CrashReport.func_71502_e(CrashReport.java:135) [15jun2024 18:11:46.681] [main/INFO] [STDERR/]: [java.lang.Throwable:printStackTrace:644]:     at net.minecraft.crash.CrashReport.func_230188_h_(CrashReport.java:248) [15jun2024 18:11:46.681] [main/INFO] [STDERR/]: [java.lang.Throwable:printStackTrace:644]:     at net.minecraft.client.main.Main.main(Main.java:122) [15jun2024 18:11:46.681] [main/INFO] [STDERR/]: [java.lang.Throwable:printStackTrace:644]:     ... 10 more    
  • Topics

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.