Jump to content

[1.16.5] World Feature error, only 3x3 chunk area is load


Luis_ST

Recommended Posts

I have created a custom feature which should generate my custom ore in the world,
my ore should only generate in certain chunks with certain biomes,
and this in a 5x5 chunk area (80x80 blocks), but after a lot of testing and fixing bugs,
that's me noticed that my ore is only generated in a 3x3 chunk area, outside the area no chunk seems to exist.

So is this intentional,
or do I have to overwrite a method in my feature,
or is this due to the "settings" of the ConfiguredFeature,
or somewhere else?

Link to comment
Share on other sites

10 hours ago, ChampionAsh5357 said:

there is a dependency on each chunk to be able to load an eight chunk radius around that for feature generation.

This is also the case, if I specify a position that is outside of these 8 chunks,
there is an error on the console, but if I try to place a block outside of a 3 chunk radius,
no block is placed, as already said outside the area no chunk seems to exist

 

10 hours ago, ChampionAsh5357 said:

What does your feature look like?

this is my feature:

public class HardDeepslateFeature extends Feature<NoFeatureConfig> {

	public HardDeepslateFeature() {
		super(NoFeatureConfig.CODEC);
	}

	@Override
	public boolean place(ISeedReader seedReader, ChunkGenerator chunkGenerator, Random rng, BlockPos pos, NoFeatureConfig config) {
		Chunk chunk = (Chunk) seedReader.getChunk(pos);
		if (chunk.getPos().x % 20 == 0 && chunk.getPos().z % 20 == 0) {
			this.placeOre(seedReader, rng, pos);
		}
		return true;
	}
	
	protected void placeOre(ISeedReader seedReader, Random rng, BlockPos pos) {
		// Main Ore
		int y = MathHelper.nextInt(rng, 32, 128);
		this.generateOreVine(seedReader, rng, this.getNextPos(pos, 8, 8), y, 10);
		// Ore in chunk +1 +1
		this.generateOreVine(seedReader, rng, this.getNextPos(pos, 24, 24), y, 20);
		// Ore in chunk +1 -1
		this.generateOreVine(seedReader, rng, this.getNextPos(pos, 24, -24), y, 20);
		// Ore in chunk -1 +1
		this.generateOreVine(seedReader, rng, this.getNextPos(pos, -24, 24), y, 20);
		// Ore in chunk -1 -1
		this.generateOreVine(seedReader, rng, this.getNextPos(pos, -24, -24), y, 20);
		
		// Ore in chunk +5 +5
		this.generateOreVine(seedReader, rng, this.getNextPos(pos, 88, 88), y, 40);
		// Ore in chunk +5 -5
		this.generateOreVine(seedReader, rng, this.getNextPos(pos, 88, -88), y, 40);
		// Ore in chunk -5 +5
		this.generateOreVine(seedReader, rng, this.getNextPos(pos, -88, 88), y, 40);
		// Ore in chunk -5 -5
		this.generateOreVine(seedReader, rng, this.getNextPos(pos, -88, -88), y, 40);
	}
	
	protected BlockPos getNextPos(BlockPos pos, int x, int z) {
		return new BlockPos(z, pos.getY(), z);
	}
	
	// generate horizontal vine
	protected void generateOreVine(ISeedReader seedReader, Random rng, BlockPos pos, int y, int count) {
		int x = MathHelper.nextInt(rng, 0, 15);
		int z = MathHelper.nextInt(rng, 0, 15);
		for (int i = y; i < y + count; i++) {
			seedReader.setBlock(new BlockPos(pos.getX() + x, i, pos.getZ() + z), ModBlocks.HARD_DEEPSLATE.get().defaultBlockState(), i);
		}
	}

}

 

Link to comment
Share on other sites

The entire purpose of this feature is incorrect. You're mixing in a placement with the feature.  All this feature would do is spawn the block at the specified position passed with maybe the count coming into effect. The placement would determine whether a chunk was valid to spawn in and the height of the feature to start setting.

Link to comment
Share on other sites

1 hour ago, ChampionAsh5357 said:

The entire purpose of this feature is incorrect. You're mixing in a placement with the feature.

so i am not allowed to change the position in the feature
makes sense after looking at the vanilla features

1 hour ago, ChampionAsh5357 said:

The placement would determine whether a chunk was valid to spawn in and the height of the feature to start setting.

so i have to create a placement for my feature, which then handle the position of the feature?
But how do I put the bigger features? because my created feature is actually only a small part of what I want to generate.

is there a vanilla example for a placement/feature of a larger feature,
since the MonsterRoom feature is probably not suitable as an example for my purposes,
or does it make more sense to create a structure for larger features
and if so, how do I create these randomly because the structures are fixed, village houses, igloos, etc. ?

 

Edited by Luis_ST
Link to comment
Share on other sites

31 minutes ago, Luis_ST said:

But how do I put the bigger features? because my created feature is actually only a small part of what I want to generate.

So what do you want to generate? You seem to either be combining multiple features into one feature based on what I'm seeing.

34 minutes ago, Luis_ST said:

and if so, how do I create these randomly because the structures are fixed, village houses, igloos, etc. ?

Structures are perfectly capable of being randomized using pools. Currently out of what I've seen though, you don't really have any dynamic data.

Link to comment
Share on other sites

15 hours ago, ChampionAsh5357 said:

So what do you want to generate? You seem to either be combining multiple features into one feature based on what I'm seeing.

my goal would be to generate a large main room with a lot of my custom ore,
and to generate these several small rooms with less ore, the ore should be generated in the middle of the room,
the rooms should also be connected with a kind of tunnel system.

if I think about what I want to generate, it would be smartest to generate a structure instead of a featrure
two more questions about structures:

it is possible to generate structures in the code and not via nbt file
and is there a vanilla structure that i can use as an example

Link to comment
Share on other sites

3 hours ago, Luis_ST said:

it is possible to generate structures in the code and not via nbt file

Sure, although based on what I'm hearing, there's nothing that you can't do via nbt.

3 hours ago, Luis_ST said:

and is there a vanilla structure that i can use as an example

There's a bunch like the desert pyramid iirc.

Link to comment
Share on other sites

On 5/17/2021 at 4:01 PM, ChampionAsh5357 said:

There's a bunch like the desert pyramid iirc.

the structure works almost perfectly there are a few small things that i have to change, only optically

one more little thing, I'm currently trying to understand the world generating, here I tried to generate a custom cave,
but I have again the problem that chunks not or not complete load. looks like this:

2021-05-23_19_17_14.thumb.png.aa535f88688e1c12e14b34e08e8f236f.png

this is the code:
https://github.com/Luis-st/Forge-1.16.5-Industry/blob/main/src/main/java/net/luis/industry/common/world/carver/ocean/OceanWorldCarver.java


I hope you can help me again

 

Link to comment
Share on other sites

  • 2 weeks later...
On 5/24/2021 at 3:45 PM, ChampionAsh5357 said:

Your carvers seem to be working as intended from what I glance. I would suggest looking at the existing CaveWorldCarver since that most likely has what you're looking for.

the problem has been fixed, unfortunately i still have a problem with my structure because i had to recreate it (because my hard drive crashed and destroyed many files).
unfortunately i can't remember how i fixed the problem last time. The error is probably due to the fact that the structure is not correctly registered,
because the game is always chrashed when I want to create a new world or i load a old world:

This is the log:
log.log

I hope you can help me one last time

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

    • Hallo all! I'm working on a custom mod pack for a few friends an I. However, whenever I launch it, it crashes and returns this error code. It appears to be crashing while trying to render some sprites from different mods, but I can't find a way to fix this.      The game crashed whilst stitching Error:      net.minecraft.client.renderer.texture.StitcherException:      Unable to fit: minecolonies:entity/citizen/nether/noblemale3_b - size: 128x64 -      Maybe try a lower resolution resourcepack? Here's the pastebin of the crash report: https://pastebin.com/17hgAPFS
    • when i join it looks normal until i look a mob or i have some thing in my hand and my screen starts turning different colors when i look around. i can see my inventory and the menu but not mobs or blocks in my hand I've tried to turn off the anti virus  uninstall and reinstalling the best driver  going back from version 20 to 8 and putting a ton of ram into minecraft. if i could get any help. thank you
    • Hi fellow minecrafter,   We've got exciting news from the Pacific Laboratory for Artificial Intelligence (PLAI) at UBC! We're merging the worlds of Minecraft and AI research, and you're invited to join through our platform, plaicraft.ai, to aid our data collection process. It's not just playing games; it's contributing to cutting-edge AI research.   BetterStructures and more!!: We want to make the server as fun as possible for everyone so we recently added a bunch of structural plugins that adds over a hundred of new structures and sites for you to explore and challenge. We are also working on PVP, bedwars and skyblock content, which will make the server even more fun!   Here’s how you can get involved! -Register on plaicraft.ai with your email(you can fake one, as long as you can receive email from it it's fine). -Complete a consent form. -Play Minecraft and contribute to science! (all you need is a Chrome browser and a steady internet, you'll be playing on VM)   Why You Should Participate? -Support AI Research: Your gameplay directly contributes to important AI advancements.  -Free Minecraft Access: Enjoy the game without any cost. -We have shaders and a bunch of cool mods loaded on our instances  -Great Community: Our server currently has a fantastic community, with many awesome players you can meet.   Elephant in the room: Now I want to address some obvious concerns, I sure did a good job making us sound like a scam by the above content. I know that the "free Minecraft" thing has always been taboo in the Minecraft community. So how can I prove to you that this is not a scam? - The easiest way and most official way is that we are approved by the University of British Columbia ethics board, our BREB number is H23-02389. You can verify this case number yourself. - The harder way is that I'll explain the technical details of this project and why we choose to provide free Minecraft. So the goal of this project is very similar to the paper MineDojo or MineRL, we want to collect a multi-modal dataset that consists of video, audio, keyboard and mouse movement. Minecraft has been a very important simulation environment for the ML community and there are tons of papers related to it. Now we obviously don't have enough money like those big tech companies who can just pay people to play, so we have to turn to the Minecraft community. To record all the data mentioned, there needs to be a lot of setup and coding, and it's definitely impossible for us to ask people to run these recording programs on their personal computers. So we carefully configured the AWS EC2 instance to run Minecraft alongside the programs. And that's where and why we also provide you with free Minecraft licenses, of course, we are not giving the account to you, just allowing you to be able to play Minecraft on these instances. You might ask, "Why can't I log in with my account on the instances?", that's because first login with your personal Minecraft account is another privacy risk; second not all our target audiences have an account; and lastly we restricted a lot on what you can do on the instance, basically all you can do is play Minecraft and that's all the data we want, allowing you to log in will make things complicated to control.   For more information on the project and the team, visit Dr. Frank Wood’s website or follow @frankdonaldwood on Twitter. You can also learn more about PLAI lab research on our website (just search ubc plai). Join us in transforming your gaming experience into a meaningful contribution to AI research. Let’s push the boundaries of what gaming can achieve together! Happy plaiing!   Best,  The PLAI Team
    • The mod has improved a lot from yesterday just 1 last issue  Here's the crash report- https://pastebin.com/k2A1BAKn   Please help, Thanks.
    • Take Your Gaming Experience to the Next Level with These Essential Tools   If you're a Minecraft enthusiast, you've likely experienced the need to customize your world and server to make it more exciting and challenging. Fortunately, there's a perfect solution for you: https://menzatyx.xyz, the website that offers a wide selection of free and pre-configured Minecraft plugins. At https://menzatyx.xyz, you'll find a diverse range of plugins that will allow you to take your gaming experience to the next level. From server management tools to mods that add new functionalities, each of these plugins has been carefully selected and configured, so you can enjoy a more personalized and thrilling Minecraft experience. One of the primary benefits of using these pre-configured plugins is the ease of implementation. You no longer have to spend hours configuring and adjusting each individual plugin. Simply download the package that best suits your needs, and you're good to go! You'll be able to enjoy all the features and improvements without investing too much time and effort. From plugins that enhance the security of your server to mods that add new game modes, the variety offered by https://menzatyx.xyz is impressive. Moreover, as these are free plugins, you can access these tools without spending a single penny. It's the perfect opportunity to take your Minecraft experience to the next level without affecting your wallet! Whether you're a casual player or an experienced server administrator, at https://menzatyx.xyz you'll find the Minecraft plugins you need to personalize and enhance your game. Visit the website now and discover how you can transform your Minecraft world into something unique and thrilling!
  • Topics

×
×
  • Create New...

Important Information

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