Jump to content

How to create a new world?


Proxxo

Recommended Posts

Hi modders,

 

I want to be able to "clone" parts of the world the player currently stand in. The cloned world should be saved as a new map on the client.

First of, I just want to create a new single player map file. Is this possible with Forge?

I have looked into the article of WorldSavedData but as far as I can say its intention is not to be used to create new worlds.

Also, creating a new world generator does not seem to fit my scenario. I want the new map to be created while the player is in game.

 

Does anyone know how to start? Thanks.

Link to comment
Share on other sites

Here's a hint.

You're working in a language that has access to the file system.

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Link to comment
Share on other sites

Hi Draco,

 

thank you for taking the time to read and post to my question.

Of course I know that I could just copy and paste files with java - do you assume that devs posting questions here don't know that?

 

Perhaps my question was not clear enough.

I am looking for the Forge-way to copy the current and nearby chunks of a player into a new world file.

Is there something like chunk.saveToDisk() or an API to save into .dat or .mca files?

 

Link to comment
Share on other sites

2 hours ago, Proxxo said:

do you assume that devs posting questions here don't know that?

You have no idea what kind of people come here expecting that making a mod is just pushing a few magic buttons in a GUI.

 

2 hours ago, Proxxo said:

I am looking for the Forge-way to copy the current and nearby chunks of a player into a new world file.

Is there something like chunk.saveToDisk() or an API to save into .dat or .mca files?

Chunk saving happens via IChunkLoader::saveChunk, which is implemented in AnvilChunkLoader. You can probably get away with instantiating your own, pointing it at whatever directory you want and then saving the chunks you need. 

  • Like 1
Link to comment
Share on other sites

2 hours ago, Proxxo said:

Of course I know that I could just copy and paste files with java - do you assume that devs posting questions here don't know that?

Ahahahahahahahahaha.

 

Yes.

  • Like 1

Follow these rules when talking to me, and we'll get along fine.

1).I know Java fairly well. I don't know as much about modding. They are not the same, don't compare them.

2). I consider myself to always be learning. I make mistakes, you make mistakes. Who doesn't?

3). Insult me, and I will leave the thread. I have a real life, I don't have time to throw petty insults in a Minecraft Modding forum.

 

ModMCdl - Co-Founder and Director of Design for Artemis Game Studios

Link to comment
Share on other sites

11 hours ago, diesieben07 said:

Chunk saving happens via IChunkLoader::saveChunk, which is implemented in AnvilChunkLoader.

Thanks, that really looks like what I need. :)

 

11 hours ago, ModMCdl said:

Ahahahahahahahahaha.

Yeah, I am probably spoiled by stackoverflow.com.

 

Link to comment
Share on other sites

9 minutes ago, Proxxo said:

Thanks, that really looks like what I need. :)

 

Yeah, I am probably spoiled by stackoverflow.com.

 

Some people dont seem to understand you need Java knowledge before being able to program Java, but we dont need to forget to respect everyone who tries to learn java at least, and i am helping people not only with things i know, but i use the things i know to solve others problems, they all seem to forget this is a helping For rhe Forgde sources and not for java, they can better go to codecademy, stackoverflow or sololearn, and also stackoverflow will help them. Creating errors helps you prograss further in programming, never be scared of some typ of code and be never scared of asking a question: No question ever was stupid.

 

why am i writing this? well, because i want to let evryone know that this forum needs java knowledge but you aint dumb if you ask questions about forge

  • Like 2
Link to comment
Share on other sites

  • 4 years later...

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
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

    • You have a mod trying to load client classes on the server. The error message does not say which mod. I can see oculus mentioned previously which is a client side mod not needed on the server. You probably have others?
    • Use a mod like https://www.curseforge.com/minecraft/mc-mods/spark to diagnose what is taking time on the server thread.
    • In my mod, I need to make a special kind of damage. I put the value of it into a custom DamageSource class that extends the original one, then I applied it on entities with LivingHurtEvent in an event handler. In 1.19.3, the constructor of the DamageSource was simple. All you needed was a simple String. It worked pretty well. But in 1.19.4, Mojang added something like tons of DamageTypes and Holders. I checked the source code of net.minecraft.world.damagesource.DamageSources, but I cannot understand it at all. So my question is:  How can I create custom DamageSources in 1.19.4? (I'm not a native English speaker, and I'm new to forge modding and this forum. If there are any mistakes, please correct me!)  
    • The game crashed whilst unexpected error Error: java.lang.NullPointerException: Unexpected error ---- Minecraft Crash Report ---- WARNING: coremods are present:   llibrary (llibrary-core-1.0.11-1.12.2.jar)   TransformLoader (DynamicSurroundings-1.12.2-3.6.1.0.jar)   Inventory Tweaks Coremod (InventoryTweaks-1.63.jar)   XaeroWorldMapPlugin (XaerosWorldMap_1.29.2_Forge_1.12.jar)   OpenModsCorePlugin (OpenModsLib-1.12.2-0.12.2.jar)   LoadingPlugin (ResourceLoader-MC1.12.1-1.5.3.jar)   CTMCorePlugin (CTM-MC1.12.2-1.0.2.31.jar)   XaeroMinimapPlugin (Xaeros_Minimap_23.2.0_Forge_1.12.jar) Contact their authors BEFORE contacting forge // I feel sad now :( Time: 3/25/23 2:27 PM Description: Unexpected error java.lang.NullPointerException: Unexpected error     at xaero.map.core.XaeroWorldMapCore.onMinecraftRunTick(XaeroWorldMapCore.java:192)     at net.minecraft.client.Minecraft.func_71411_J(Minecraft.java:1073)     at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:398)     at net.minecraft.client.main.Main.main(SourceFile:123)     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)     at java.lang.reflect.Method.invoke(Method.java:497)     at net.minecraft.launchwrapper.Launch.launch(Launch.java:135)     at net.minecraft.launchwrapper.Launch.main(Launch.java:28) A detailed walkthrough of the error, its code path and all known details is as follows: --------------------------------------------------------------------------------------- -- System Details -- Details:     Minecraft Version: 1.12.2     Operating System: Windows 10 (amd64) version 10.0     Java Version: 1.8.0_51, Oracle Corporation     Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation     Memory: 464818384 bytes (443 MB) / 1073741824 bytes (1024 MB) up to 8589934592 bytes (8192 MB)     JVM Flags: 8 total; -XX:HeapDumpPath=MojangTricksIntelDriversForPerformance_javaw.exe_minecraft.exe.heapdump -Xmx8G -XX:+UnlockExperimentalVMOptions -XX:+UseG1GC -XX:G1NewSizePercent=20 -XX:G1ReservePercent=20 -XX:MaxGCPauseMillis=50 -XX:G1HeapRegionSize=32M     IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0     FML: MCP 9.42 Powered by Forge 14.23.5.2859 43 mods loaded, 43 mods active     States: 'U' = Unloaded 'L' = Loaded 'C' = Constructed 'H' = Pre-initialized 'I' = Initialized 'J' = Post-initialized 'A' = Available 'D' = Disabled 'E' = Errored     | State | ID                 | Version                  | Source                                        | Signature                                |     |:----- |:------------------ |:------------------------ |:--------------------------------------------- |:---------------------------------------- |     | L     | minecraft          | 1.12.2                   | minecraft.jar                                 | None                                     |     | L     | mcp                | 9.42                     | minecraft.jar                                 | None                                     |     | L     | FML                | 8.0.99.99                | forge-1.12.2-14.23.5.2859.jar                 | e3c3d50c7c986df74c645c0ac54639741c90a557 |     | L     | forge              | 14.23.5.2859             | forge-1.12.2-14.23.5.2859.jar                 | e3c3d50c7c986df74c645c0ac54639741c90a557 |     | L     | xaerominimap_core  | 1.12.2-1.0               | minecraft.jar                                 | None                                     |     | L     | xaeroworldmap_core | 1.12.2-1.0               | minecraft.jar                                 | None                                     |     | L     | openmodscore       | 0.12.2                   | minecraft.jar                                 | None                                     |     | L     | ambientenvironment | 1.0.1                    | AmbientEnvironment-1.0.2.jar                  | None                                     |     | L     | appleskin          | 1.0.14                   | AppleSkin-mc1.12-1.0.14.jar                   | None                                     |     | L     | biomesoplenty      | 7.0.1.2445               | BiomesOPlenty-1.12.2-7.0.1.2445-universal.jar | None                                     |     | L     | chameleon          | 1.12-4.1.3               | Chameleon-1.12-4.1.3.jar                      | None                                     |     | L     | clumps             | 3.1.2                    | Clumps-3.1.2.jar                              | None                                     |     | L     | collective         | 3.0                      | collective-1.12.2-3.0.jar                     | None                                     |     | L     | ctm                | MC1.12.2-1.0.2.31        | CTM-MC1.12.2-1.0.2.31.jar                     | None                                     |     | L     | customspawner      | 3.11.4                   | CustomMobSpawner-3.11.5.jar                   | None                                     |     | L     | mocreatures        | 12.0.5                   | DrZharks MoCreatures Mod-12.0.5.jar           | None                                     |     | L     | dsurround          | 3.6.1.0                  | DynamicSurroundings-1.12.2-3.6.1.0.jar        | None                                     |     | L     | fastleafdecay      | v14                      | FastLeafDecay-v14.jar                         | None                                     |     | L     | fastbench          | 1.7.4                    | FastWorkbench-1.12.2-1.7.4.jar                | None                                     |     | L     | fossil             | 8.0.5                    | fossilsarcheology-8.0.6.jar                   | None                                     |     | L     | cfm                | 6.3.0                    | furniture-6.3.2-1.12.2.jar                    | None                                     |     | L     | hats               | 7.1.1                    | Hats-1.12.2-7.1.1.jar                         | None                                     |     | L     | waila              | 1.8.26                   | Hwyla-1.8.26-B41_1.12.2.jar                   | None                                     |     | L     | ichunutil          | 7.2.2                    | iChunUtil-1.12.2-7.2.2.jar                    | None                                     |     | L     | inventorypets      | 2.0.15                   | inventorypets-1.12-2.0.15.jar                 | None                                     |     | L     | inventorytweaks    | 1.63+release.109.220f184 | InventoryTweaks-1.63.jar                      | None                                     |     | L     | jei                | 4.16.1.1001              | jei_1.12.2-4.16.1.1001.jar                    | None                                     |     | L     | mantle             | 1.12-1.3.3.55            | Mantle-1.12-1.3.3.55.jar                      | None                                     |     | L     | mca                | 6.1.0                    | MCA-1.12.2-6.1.0-universal.jar                | None                                     |     | L     | openblocks         | 1.8.1                    | OpenBlocks-1.12.2-1.8.1.jar                   | None                                     |     | L     | openmods           | 0.12.2                   | OpenModsLib-1.12.2-0.12.2.jar                 | None                                     |     | L     | harvestcraft       | 1.12.2zb                 | Pam's+HarvestCraft+1.12.2zg.jar               | None                                     |     | L     | simplerecipes      | 1.12.2c                  | Pam's+Simple+Recipes+1.12.2c.jar              | None                                     |     | L     | reskin             | 1.2.0                    | reskin-1.2.0.jar                              | None                                     |     | L     | resourceloader     | 1.5.3                    | ResourceLoader-MC1.12.1-1.5.3.jar             | None                                     |     | L     | simpleminingdrills | 1.4.0                    | simpleminingdrills+1.12.2.jar                 | None                                     |     | L     | tconstruct         | 1.12.2-2.13.0.183        | TConstruct-1.12.2-2.13.0.183.jar              | None                                     |     | L     | tinkersjei         | 1.2                      | tinkersjei-1.2.jar                            | None                                     |     | L     | travelersbackpack  | 1.0.35                   | TravelersBackpack-1.12.2-1.0.35.jar           | None                                     |     | L     | twilightforest     | 3.11.1021                | twilightforest-1.12.2-3.11.1021-universal.jar | None                                     |     | L     | xaerominimap       | 23.2.0                   | Xaeros_Minimap_23.2.0_Forge_1.12.jar          | None                                     |     | L     | xaeroworldmap      | 1.29.2                   | XaerosWorldMap_1.29.2_Forge_1.12.jar          | None                                     |     | L     | llibrary           | 1.7.20                   | llibrary-1.7.20-1.12.2.jar                    | None                                     |     Loaded coremods (and transformers):  llibrary (llibrary-core-1.0.11-1.12.2.jar)   net.ilexiconn.llibrary.server.core.plugin.LLibraryTransformer   net.ilexiconn.llibrary.server.core.patcher.LLibraryRuntimePatcher TransformLoader (DynamicSurroundings-1.12.2-3.6.1.0.jar)    Inventory Tweaks Coremod (InventoryTweaks-1.63.jar)   invtweaks.forge.asm.ContainerTransformer XaeroWorldMapPlugin (XaerosWorldMap_1.29.2_Forge_1.12.jar)   xaero.map.core.transformer.ChunkTransformer   xaero.map.core.transformer.NetHandlerPlayClientTransformer   xaero.map.core.transformer.EntityPlayerTransformer   xaero.map.core.transformer.AbstractClientPlayerTransformer   xaero.map.core.transformer.WorldClientTransformer   xaero.map.core.transformer.PlayerListTransformer   xaero.map.core.transformer.SaveFormatTransformer   xaero.map.core.transformer.BiomeColorHelperTransformer   xaero.map.core.transformer.MinecraftTransformer OpenModsCorePlugin (OpenModsLib-1.12.2-0.12.2.jar)   openmods.core.OpenModsClassTransformer LoadingPlugin (ResourceLoader-MC1.12.1-1.5.3.jar)   lumien.resourceloader.asm.ClassTransformer CTMCorePlugin (CTM-MC1.12.2-1.0.2.31.jar)   team.chisel.ctm.client.asm.CTMTransformer XaeroMinimapPlugin (Xaeros_Minimap_23.2.0_Forge_1.12.jar)   xaero.common.core.transformer.ChunkTransformer   xaero.common.core.transformer.NetHandlerPlayClientTransformer   xaero.common.core.transformer.EntityPlayerTransformer   xaero.common.core.transformer.AbstractClientPlayerTransformer   xaero.common.core.transformer.WorldClientTransformer   xaero.common.core.transformer.EntityPlayerSPTransformer   xaero.common.core.transformer.PlayerListTransformer   xaero.common.core.transformer.SaveFormatTransformer   xaero.common.core.transformer.GuiIngameForgeTransformer   xaero.common.core.transformer.GuiBossOverlayTransformer   xaero.common.core.transformer.ModelRendererTransformer     GL info: ' Vendor: 'ATI Technologies Inc.' Version: '4.6.0 Compatibility Profile Context 23.3.2.230315' Renderer: 'Radeon RX 560 Series'     Launched Version: 1.12.2-forge-14.23.5.2859     LWJGL: 2.9.4     OpenGL: Radeon RX 560 Series GL version 4.6.0 Compatibility Profile Context 23.3.2.230315, ATI Technologies Inc.     GL Caps: Using GL 1.3 multitexturing. Using GL 1.3 texture combiners. Using framebuffer objects because OpenGL 3.0 is supported and separate blending is supported. Shaders are available because OpenGL 2.1 is supported. VBOs are available because OpenGL 1.5 is supported.     Using VBOs: Yes     Is Modded: Definitely; Client brand changed to 'fml,forge'     Type: Client (map_client.txt)     Resource Packs:      Current Language: English (US)     Profiler Position: N/A (disabled)     CPU: 12x Intel(R) Core(TM) i5-10400 CPU @ 2.90GHz Idk what to do pls help
    • Hi I’m running same mod on a server and realized they are spawning in chests which I don’t want, if I were to edit this data pack to disable them spawning in chests how would I do that? Explain to me like I’m 8
  • Topics

×
×
  • Create New...

Important Information

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