Hei man, great work seriously! It is sad that this thread doesnt get more attention you certainly deserve it. You are doing something that has never been done before and i hope you can finish through with it. I am working on a mod and i want it to be fully compatible with your mod, if you finish up could you make a small list of things that need to be watched out for in order to make mods fully compatible with your mod? If this mod finishes it could be a much needed game changer and should wake up Microsoft and Mojang(because modders do more than the devs).
Also one thing, dont cubic chungs tend to break lighting? like a big cave that is out of render distance would let light flow in right? Do you have any possibile ways of fixing this? leaving blocks in a pseude rendered state where they just block the light? just curious.
Hei man, great work seriously! It is sad that this thread doesnt get more attention you certainly deserve it. You are doing something that has never been done before and i hope you can finish through with it. I am working on a mod and i want it to be fully compatible with your mod, if you finish up could you make a small list of things that need to be watched out for in order to make mods fully compatible with your mod? If this mod finishes it could be a much needed game changer and should wake up Microsoft and Mojang(because modders do more than the devs).
Also one thing, dont cubic chungs tend to break lighting? like a big cave that is out of render distance would let light flow in right? Do you have any possibile ways of fixing this? leaving blocks in a pseude rendered state where they just block the light? just curious.
For compatibility, most of it is obvious things. Like "don't assume world height 0-256". If you don't see how some part of code could work with heights below y=0 or with cubic chunks in general, it most likely doesn't. There is also a bit of (partially outdated but still relavant) information on wiki pages on github.
Lighting:
First the way it's intended to work, and the core parts needed fo it are there and working: Lighting is based on any parts of terrain that have ever been generated in a given world. If you spawn at the bottom of a huge cave and the top isn't generated, it will be fully lit. The moment you generate the top of the cave, it should become dark.
The way it currently is: height tracking for it works correctly, but keeping track of where lighting needs to be recalculated isn't finished. To work around it, cubic chunks will, by default, choose one (kind of) random loaded block from 16x16 column per tick, and update lighting in it. This ensures that even if initially lighting is broken, it will fix itself over time (even if it takes very long time).
Currently height tracking also tends to use a good chunk of memory, and more memory the more vertical space is generated. This will be fixed eventually, but it's not very high priority as the overhead isn't too unreasonable in common cases. You should be able to keep everything within the default 1GB of RAM assigned with default view distance.
i need to ask something about this, there is even a option to raise the floor(usually 64, "water level") to a higher and make the underground 128 block deep instead of the 64block?(i mean to generate caves and ores, like the old dynamic height mod).
PS: why u ask, because i want the caves and ores generate deeper, and not only stone below y=0
i need to ask something about this, there is even a option to raise the floor(usually 64, "water level") to a higher and make the underground 128 block deep instead of the 64block?(i mean to generate caves and ores, like the old dynamic height mod).
PS: why u ask, because i want the caves and ores generate deeper, and not only stone below y=0
Water level can be changed, yes.
Normal CC behavior is to continue the caves all the way down. To stop it at a certain Y, you would have to make a separate layer in the preset JSON that was below the level desired and generated no caves.
i need to ask something about this, there is even a option to raise the floor(usually 64, "water level") to a higher and make the underground 128 block deep instead of the 64block?(i mean to generate caves and ores, like the old dynamic height mod).
PS: why u ask, because i want the caves and ores generate deeper, and not only stone below y=0
Hmm, I didn't get that you wanted to have deeper caves in your RTG world as well.
I guess in that case, the only thing in Cubic Chunks that can possibly help you is exstending the generation of caves downwards, I guess?
@BaccarWozat, would you happen to know more about this?
"I let people see how horrendous my code is specifically so it can become less bad." ~ Spirit 2018-10-18
"Never, ever, EVER give a maid a bazooka..." ~ CaerMaster 2018-02-10
"When in doubt read Zsashas' Signature " ~ Vadis365 2016-09-09
"Your post count reflects your uncertainty more than it does your knowledge." ~ Me
Water level can be changed, yes.
Normal CC behavior is to continue the caves all the way down. To stop it at a certain Y, you would have to make a separate layer in the preset JSON that was below the level desired and generated no caves.
oh, so yes it generates caves downwards passing y=0? i haved worleys caves in, so passing y=0 only generates stone, but i still dont have ores, only stone.
Hmm, I didn't get that you wanted to have deeper caves in your RTG world as well.
I guess in that case, the only thing in Cubic Chunks that can possibly help you is exstending the generation of caves downwards, I guess?
@BaccarWozat, would you happen to know more about this?
yes, extending ore/cave gen downwards will work for me, but as i said above , no ore and no cave gen passing y=0(worleys caves on the modpack, so maybe thats a problem)
oh, so yes it generates caves downwards passing y=0? i haved worleys caves in, so passing y=0 only generates stone, but i still dont have ores, only stone.
what i can do?
yes, extending ore/cave gen downwards will work for me, but as i said above , no ore and no cave gen passing y=0(worleys caves on the modpack, so maybe thats a problem)
Thee way it currently works is that there are 2 "modes": compatibility and cubic chunks world type.
Compatibility mode will let you use any vanilla generator, but nothing really useful will generate beyond vanilla height range. And this is what is used when you enable cubic chunks in default world type.
The other mode is actual cubic chunks world type. CubicWorldGen provides 2 such world types: CustomCubic (equivalent of vanilla CUSTOMIZED world type) and FlatCubic, equivalent of vanilla superflat. These generators have all the features at any height, but almost nothing from mods will generate there, and some features are still missing.
There are plans to add "mixed mode" where it would use compatibility generator for vanilla height range, and a real cubic chunks generator outside of that range.
For the parts outside of vanilla height range it would still have all the downsides of the generator used there (including no modded stuff there) but vanilla height range would have everything as normal.
Thee way it currently works is that there are 2 "modes": compatibility and cubic chunks world type.
Compatibility mode will let you use any vanilla generator, but nothing really useful will generate beyond vanilla height range. And this is what is used when you enable cubic chunks in default world type.
The other mode is actual cubic chunks world type. CubicWorldGen provides 2 such world types: CustomCubic (equivalent of vanilla CUSTOMIZED world type) and FlatCubic, equivalent of vanilla superflat. These generators have all the features at any height, but almost nothing from mods will generate there, and some features are still missing.
There are plans to add "mixed mode" where it would use compatibility generator for vanilla height range, and a real cubic chunks generator outside of that range.
For the parts outside of vanilla height range it would still have all the downsides of the generator used there (including no modded stuff there) but vanilla height range would have everything as normal.
so what are u saying is that, CC have a mode to take over vanilla gen(and not that yes option on "more world options"), and make caves and ores(from vanilla) below the vanilla rangue(y=256 and y=0)?
:/ is even worleys caves work "fine" in those circunstances?
so what are u saying is that, CC have a mode to take over vanilla gen(and not that yes option on "more world options"), and make caves and ores(from vanilla) below the vanilla rangue(y=256 and y=0)?
:/ is even worleys caves work "fine" in those circunstances?
Mods need to be rewritten in order to generate outside of the ranges hardcoded into them; for example, this is how vanilla sets the coordinates of a cave, which results in a random starting altitude from 0-126 being chosen (the distribution is nonlinear; even just increasing the ground depth to 128 won't really work well since only 1/6 of all caves generate above normal sea level):
double x = (double)(chunkX * 16 + this.rand.nextInt(16));
double y = (double)this.rand.nextInt(this.rand.nextInt(120) + 8);
double z = (double)(chunkZ * 16 + this.rand.nextInt(16));
To get around this, Cubic Chunks replaces vanilla world generators with custom ones, including ones that can work with cubic chunks (among other things, the cave generator works by scanning a +/-8 chunk radius to "follow" any caves that start within that area so it can carve out the middle chunk if any intersect it. This presents a major issue if you make the height effectively infinite, as this also means that an effectively infinite number of caves can start in any chunk column along the y-axis - you also have to split the range up vertically, so now it checks a 17x17x17 cube of cubic chunks, which still presents an issue since you need to perform 17 times the checking of a 17x17 area). Plus, the vanilla cave generator (and most modded derivatives) actually works with an array (instead of accessing chunks in the normal manner), which is assumed to be 16x256x16 in size, which needs to be 16x16x16 instead:
/** The number of Chunks to gen-check in any given direction. */
protected int range = 8;
public void generate(IChunkProvider par1IChunkProvider, World par2World, int par3, int par4, byte[] par5ArrayOfByte)
{
int var6 = this.range;
this.worldObj = par2World;
this.rand.setSeed(par2World.getSeed());
long var7 = this.rand.nextLong();
long var9 = this.rand.nextLong();
for (int var11 = par3 - var6; var11 <= par3 + var6; ++var11)
{
for (int var12 = par4 - var6; var12 <= par4 + var6; ++var12)
{
long var13 = (long)var11 * var7;
long var15 = (long)var12 * var9;
this.rand.setSeed(var13 ^ var15 ^ par2World.getSeed());
this.recursiveGenerate(par2World, var11, var12, par3, par4, par5ArrayOfByte);
}
}
}
@BaccarWozat, would you happen to know more about this?
Multi-layer presets are perhaps the coolest feature in CC, as you can have all kinds of terrain gen in just 1 overworld. However, despite Minecrak and myself's work on maps for our servers (and a couple of others who've done layers), there's still very little documentation and we don't know everything that can be done with this exciting feature. The CC discord has the most information and people willing to help.
Mods need to be rewritten in order to generate outside of the ranges hardcoded into them; for example, this is how vanilla sets the coordinates of a cave, which results in a random starting altitude from 0-126 being chosen (the distribution is nonlinear; even just increasing the ground depth to 128 won't really work well since only 1/6 of all caves generate above normal sea level):
double x = (double)(chunkX * 16 + this.rand.nextInt(16));
double y = (double)this.rand.nextInt(this.rand.nextInt(120) + 8);
double z = (double)(chunkZ * 16 + this.rand.nextInt(16));
To get around this, Cubic Chunks replaces vanilla world generators with custom ones, including ones that can work with cubic chunks (among other things, the cave generator works by scanning a +/-8 chunk radius to "follow" any caves that start within that area so it can carve out the middle chunk if any intersect it. This presents a major issue if you make the height effectively infinite, as this also means that an effectively infinite number of caves can start in any chunk column along the y-axis - you also have to split the range up vertically, so now it checks a 17x17x17 cube of cubic chunks, which still presents an issue since you need to perform 17 times the checking of a 17x17 area). Plus, the vanilla cave generator (and most modded derivatives) actually works with an array (instead of accessing chunks in the normal manner), which is assumed to be 16x256x16 in size, which needs to be 16x16x16 instead:
/** The number of Chunks to gen-check in any given direction. */
protected int range = 8;
public void generate(IChunkProvider par1IChunkProvider, World par2World, int par3, int par4, byte[] par5ArrayOfByte)
{
int var6 = this.range;
this.worldObj = par2World;
this.rand.setSeed(par2World.getSeed());
long var7 = this.rand.nextLong();
long var9 = this.rand.nextLong();
for (int var11 = par3 - var6; var11 <= par3 + var6; ++var11)
{
for (int var12 = par4 - var6; var12 <= par4 + var6; ++var12)
{
long var13 = (long)var11 * var7;
long var15 = (long)var12 * var9;
this.rand.setSeed(var13 ^ var15 ^ par2World.getSeed());
this.recursiveGenerate(par2World, var11, var12, par3, par4, par5ArrayOfByte);
}
}
}
The base cubic chunks mod also doesn't actually replace any vanilla worldgen and just invokes vanilla generator, and splits the result into 16x16x16 chunk sections (which is trivial because vanilla mostly does that for me, I just have to put it into Cubes instead of Chunks). The actual cubic chunks generation is done by CubicWorldGen.
And as I said, this has the issue that nothing useful generates beyond vanilla height range. And currently there is no workaround for that.
But for a long time I'm planning to make CubicWorldGen be able to take over generation beyond vanilla height range. This is technically easy to do but also very hard to do in general enough way that is also controllable by the user (where do you even put a GUI to control that? Also you would probably want to make it an option saved with the world. Where do you store the generator settings of the other generator? Because now you have 2 generators, each with it's own settings. How exactly do you expose that in API without breaking compatibility?)
I just wondered is there a way to make this mod compatible with world edit?
so i can use world edit to build above 256, thanks in advance!
No. WorldEdit limits itself to 0-255 height range, and there is nothing this mod can do about it. Bur Orbis mod has similar features and works with any height .
The Meaning of Life, the Universe, and Everything.
Location:
127.0.0.1
Join Date:
8/22/2012
Posts:
217
Location:
127.0.0.1
Minecraft:
Barteks2x
Xbox:
null
PSN:
null
Member Details
Actaually, WorldEdit is getting closer to being compatible with cubic chunks. The most recent builds should work above y=256, there is a test build that works below y=0, and there are plans to make all of WorldEdit work correctly with cubic chunks.
Currently this mos is alpha version. All by itself it has some known issues. Mod compatiblity could be better.
A lot of it is likely to change in future Minecraft versions. 1.13.2 should be a big step for world generation compatibility. While progress on mod compatibility is slow, more mods become compatible over time. Eventually there may be time when you can just put cubic chunks into an average modpack and it will work.
Right now if you want a modpack with cubic chunks, you really have to design around it, and avoid mods that cause issues.
Use OptiFine E2. And you are probably going to need newer forge too.
Cubic chunks discord server
Thanks for telling me. Now Minecraft finally loaded with the cubic chunks mod.
Excuse me, How to convert 1.12 normal world into a cubic chunk world ?
There's a converter on the Discord. Or just download it from this link.
To use it, run it, it's not a mod.
Cubic Chunks mod: https://discord.gg/kMfWg9m
Mental Block server: https://discord.gg/AssnrXr
Hei man, great work seriously! It is sad that this thread doesnt get more attention you certainly deserve it. You are doing something that has never been done before and i hope you can finish through with it. I am working on a mod and i want it to be fully compatible with your mod, if you finish up could you make a small list of things that need to be watched out for in order to make mods fully compatible with your mod? If this mod finishes it could be a much needed game changer and should wake up Microsoft and Mojang(because modders do more than the devs).
Also one thing, dont cubic chungs tend to break lighting? like a big cave that is out of render distance would let light flow in right? Do you have any possibile ways of fixing this? leaving blocks in a pseude rendered state where they just block the light? just curious.
For compatibility, most of it is obvious things. Like "don't assume world height 0-256". If you don't see how some part of code could work with heights below y=0 or with cubic chunks in general, it most likely doesn't. There is also a bit of (partially outdated but still relavant) information on wiki pages on github.
Lighting:
First the way it's intended to work, and the core parts needed fo it are there and working: Lighting is based on any parts of terrain that have ever been generated in a given world. If you spawn at the bottom of a huge cave and the top isn't generated, it will be fully lit. The moment you generate the top of the cave, it should become dark.
The way it currently is: height tracking for it works correctly, but keeping track of where lighting needs to be recalculated isn't finished. To work around it, cubic chunks will, by default, choose one (kind of) random loaded block from 16x16 column per tick, and update lighting in it. This ensures that even if initially lighting is broken, it will fix itself over time (even if it takes very long time).
Currently height tracking also tends to use a good chunk of memory, and more memory the more vertical space is generated. This will be fixed eventually, but it's not very high priority as the overhead isn't too unreasonable in common cases. You should be able to keep everything within the default 1GB of RAM assigned with default view distance.
Cubic chunks discord server
i need to ask something about this, there is even a option to raise the floor(usually 64, "water level") to a higher and make the underground 128 block deep instead of the 64block?(i mean to generate caves and ores, like the old dynamic height mod).
PS: why u ask, because i want the caves and ores generate deeper, and not only stone below y=0
Water level can be changed, yes.
Normal CC behavior is to continue the caves all the way down. To stop it at a certain Y, you would have to make a separate layer in the preset JSON that was below the level desired and generated no caves.
Cubic Chunks mod: https://discord.gg/kMfWg9m
Mental Block server: https://discord.gg/AssnrXr
Hmm, I didn't get that you wanted to have deeper caves in your RTG world as well.
I guess in that case, the only thing in Cubic Chunks that can possibly help you is exstending the generation of caves downwards, I guess?
@BaccarWozat, would you happen to know more about this?
If you're new to troubleshooting Minecraft Crashes, or just interested, please read my guide on reading crash reports and reporting crashes.
"I let people see how horrendous my code is specifically so it can become less bad." ~ Spirit 2018-10-18
"Never, ever, EVER give a maid a bazooka..." ~ CaerMaster 2018-02-10
"When in doubt read Zsashas' Signature " ~ Vadis365 2016-09-09
"Your post count reflects your uncertainty more than it does your knowledge." ~ Me
oh, so yes it generates caves downwards passing y=0? i haved worleys caves in, so passing y=0 only generates stone, but i still dont have ores, only stone.
what i can do?
yes, extending ore/cave gen downwards will work for me, but as i said above , no ore and no cave gen passing y=0(worleys caves on the modpack, so maybe thats a problem)
Thee way it currently works is that there are 2 "modes": compatibility and cubic chunks world type.
Compatibility mode will let you use any vanilla generator, but nothing really useful will generate beyond vanilla height range. And this is what is used when you enable cubic chunks in default world type.
The other mode is actual cubic chunks world type. CubicWorldGen provides 2 such world types: CustomCubic (equivalent of vanilla CUSTOMIZED world type) and FlatCubic, equivalent of vanilla superflat. These generators have all the features at any height, but almost nothing from mods will generate there, and some features are still missing.
There are plans to add "mixed mode" where it would use compatibility generator for vanilla height range, and a real cubic chunks generator outside of that range.
For the parts outside of vanilla height range it would still have all the downsides of the generator used there (including no modded stuff there) but vanilla height range would have everything as normal.
Cubic chunks discord server
so what are u saying is that, CC have a mode to take over vanilla gen(and not that yes option on "more world options"), and make caves and ores(from vanilla) below the vanilla rangue(y=256 and y=0)?
:/ is even worleys caves work "fine" in those circunstances?
Mods need to be rewritten in order to generate outside of the ranges hardcoded into them; for example, this is how vanilla sets the coordinates of a cave, which results in a random starting altitude from 0-126 being chosen (the distribution is nonlinear; even just increasing the ground depth to 128 won't really work well since only 1/6 of all caves generate above normal sea level):
To get around this, Cubic Chunks replaces vanilla world generators with custom ones, including ones that can work with cubic chunks (among other things, the cave generator works by scanning a +/-8 chunk radius to "follow" any caves that start within that area so it can carve out the middle chunk if any intersect it. This presents a major issue if you make the height effectively infinite, as this also means that an effectively infinite number of caves can start in any chunk column along the y-axis - you also have to split the range up vertically, so now it checks a 17x17x17 cube of cubic chunks, which still presents an issue since you need to perform 17 times the checking of a 17x17 area). Plus, the vanilla cave generator (and most modded derivatives) actually works with an array (instead of accessing chunks in the normal manner), which is assumed to be 16x256x16 in size, which needs to be 16x16x16 instead:
TheMasterCaver's First World - possibly the most caved-out world in Minecraft history - includes world download.
TheMasterCaver's World - my own version of Minecraft largely based on my views of how the game should have evolved since 1.6.4.
Why do I still play in 1.6.4?
Multi-layer presets are perhaps the coolest feature in CC, as you can have all kinds of terrain gen in just 1 overworld. However, despite Minecrak and myself's work on maps for our servers (and a couple of others who've done layers), there's still very little documentation and we don't know everything that can be done with this exciting feature. The CC discord has the most information and people willing to help.
Cubic Chunks mod: https://discord.gg/kMfWg9m
Mental Block server: https://discord.gg/AssnrXr
I actually didn't notice that vanilla cave distribution is nonlinear until now! This explains so much about why it "feels" different, with seemingly less caves, despite there being technically the same amount of them. Thanks for bringing it up. I guess I never noticed the nested use of random, so I basically did this to choose where to generate caves: https://github.com/OpenCubicChunks/CubicWorldGen/blob/f404a7e79036438b3b10053a329b9e13bd850a7f/src/main/java/io/github/opencubicchunks/cubicchunks/cubicgen/customcubic/structure/CubicCaveGenerator.java#L163-L165. This has been an issue for about 2-3 years now! So there another option that is going to be added to CWG.
And cubic chunks actually does one more trick to make cave generation faster: cave generation is in a way done on 32x32x32-blocks chunk scale. While each 16x16x16 chunk is generated individually, caves can only start in 32x32x32 chunk sections, which reduces the amount of work to do by 8 almost 8 times in case there aren't a lot of caves (see: https://github.com/OpenCubicChunks/CubicWorldGen/blob/f404a7e79036438b3b10053a329b9e13bd850a7f/src/main/java/io/github/opencubicchunks/cubicchunks/cubicgen/customcubic/structure/CubicStructureGenerator.java#L72-L110)
The base cubic chunks mod also doesn't actually replace any vanilla worldgen and just invokes vanilla generator, and splits the result into 16x16x16 chunk sections (which is trivial because vanilla mostly does that for me, I just have to put it into Cubes instead of Chunks). The actual cubic chunks generation is done by CubicWorldGen.
And as I said, this has the issue that nothing useful generates beyond vanilla height range. And currently there is no workaround for that.
But for a long time I'm planning to make CubicWorldGen be able to take over generation beyond vanilla height range. This is technically easy to do but also very hard to do in general enough way that is also controllable by the user (where do you even put a GUI to control that? Also you would probably want to make it an option saved with the world. Where do you store the generator settings of the other generator? Because now you have 2 generators, each with it's own settings. How exactly do you expose that in API without breaking compatibility?)
Cubic chunks discord server
:/, well after 2 hours of searching a have a workaround, Custom preset with
This will generate a 128 blocks heigh base world with the corresponding ores, worleys caves work with this(u need to tweak a bit the settings).
I didnt tested BOP with Geographicraft(GC works).
Hey, Great work on this mod!
I just wondered is there a way to make this mod compatible with world edit?
so i can use world edit to build above 256, thanks in advance!
No. WorldEdit limits itself to 0-255 height range, and there is nothing this mod can do about it. Bur Orbis mod has similar features and works with any height .
Cubic chunks discord server
WE almost doesn't work, Nothing really required works, so just throw it out from your modpack.
Actaually, WorldEdit is getting closer to being compatible with cubic chunks. The most recent builds should work above y=256, there is a test build that works below y=0, and there are plans to make all of WorldEdit work correctly with cubic chunks.
Currently this mos is alpha version. All by itself it has some known issues. Mod compatiblity could be better.
A lot of it is likely to change in future Minecraft versions. 1.13.2 should be a big step for world generation compatibility. While progress on mod compatibility is slow, more mods become compatible over time. Eventually there may be time when you can just put cubic chunks into an average modpack and it will work.
Right now if you want a modpack with cubic chunks, you really have to design around it, and avoid mods that cause issues.
Cubic chunks discord server