Jump to content

Recommended Posts

Posted

Tell us what you want the player to see happen.

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.

Posted
9 minutes ago, jabelar said:

What are you trying to achieve?

like where in minecrafts code is when chunks are first generated so i can finger something out to add code to it or something, example

 

if(newChunkGenerated && mc.player.onGround){

mc.player.jump();

}

Posted
Just now, Draco18s said:

Tell us what you want the player to see happen.

like for example on a new chunk being generated for the first time make the player jump, im not exactly sure what i want the player to do yet

Posted
2 minutes ago, jabelar said:

I mean why do you want this? What are you wanting to do by knowing it is a new chunk? Do you really just want to make it jump continuously on a new chunk?

i want it to jump and say on screen saying if a new chunk generated which i know how to do i just dont know how to get newly generated chunks

Posted

Chunks being generated happens so far away from the player that that behavior doesn't even make sense.

 

What if the player is falling / flying at the time? Teleporting? Riding in a minecart or on a horse? In a boat?

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.

Posted
5 minutes ago, Draco18s said:

Chunks being generated happens so far away from the player that that behavior doesn't even make sense.

 

What if the player is falling / flying at the time? Teleporting? Riding in a minecart or on a horse? In a boat?

i guess you have a point, i was going do that for testing but i can it can show something on screen if newly chunks generated, i wana make a mod for like new updates so you know your in new chunks so you can start looking for newly generated stuff in the update, but where in the code does newly generated in code?

Posted

There's an event for it, but actually there's several events for it. That's why we want to know what you're doing, so we can point you at the most appropriate one.

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.

Posted

It depends on what you want to do.

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.

Posted

If the chunk was just generated* then....

...it will be a new chunk.

 

*There are, of course, multiple stages of chunk generation and may not occur immediately one after the other...

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.

Posted
5 minutes ago, Draco18s said:

If the chunk was just generated* then....

...it will be a new chunk.

 

*There are, of course, multiple stages of chunk generation and may not occur immediately one after the other...

so i looked at a chunk event and its kinda working but not really, by new chunk i mean a new chunk first time being generated(it wasent already loaded before) do you know how to check for that?

Posted

ChunkGeneratorEvent (of which there are 3 sub events, one of which is the PopulateChunkEvent which has its own 3 sub events)

DecorateBiomeEvent (of which there are 3 sub events) which is involved in chunk generation

OreGenEvent (of which there are 4 sub events) which is involved in chunk generation

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.

Posted
25 minutes ago, Draco18s said:

ChunkGeneratorEvent (of which there are 3 sub events, one of which is the PopulateChunkEvent which has its own 3 sub events)

DecorateBiomeEvent (of which there are 3 sub events) which is involved in chunk generation

OreGenEvent (of which there are 4 sub events) which is involved in chunk generation

Thanks i see that, but is there like a way if(chunk.wasAlreadyLoaded){

}

or something that i can determine if a chunk was already generated before the player generating it now

Posted
7 hours ago, diesieben07 said:

As already pointed out by Draco:

Chunks are not generated multiple times. If a chunk is being generated, it is a new chunk by definition.

sorry i dont fully understand what you  guys are saying, im probably being a pain the the but but, i was looking at a forums post from 3 years ago u helped a guy and u said this

 

ChunkProviderGenerate for example always reports true from chunkExists, where as ChunkProviderServer checks if the chunk is loaded into memory.

And World.getChunkProvider always gives you a ChunkProviderServer (resp. a ChunkProviderClient).

 

how can i use ChunkProviderServer to check if a chunk is/was loaded into memory

Posted (edited)

I think they're saying that if the event fires then the chunk is new. You don't need to further check.

 

Now I think you want the player to know which chunks are "new" in terms of generated since the last game load. I that case I would probably just make a List of ChunkPos elements that I add to each time there is a Populate event and then as the player moves around I would check if they've entered a chunk on that List. If they have, then they are exploring a newly generated chunk. Basically I'm saying you can make your own method for checking for newly generated chunks simply by keeping them in a list and then checking the list.

Edited by jabelar

Check out my tutorials here: http://jabelarminecraft.blogspot.com/

Posted (edited)
1 hour ago, IKnowImEZ said:

sorry i dont fully understand what you  guys are saying

Ok look. We're going to play black jack.

 

I have dealt you two cards. They are a five and a three.

<ChunkGeneratorEvent fired: five>

<ChunkGeneratorEvent fired: three>

 

Do you want a third?

Quote

yes, I would like a new card

Here you go here is a third card. It is new and it is a seven.

<ChunkGeneratorEvent fired: seven>

Would you like another card?

Quote

Ok, but I'm looking at my cards now and I want to know if the five is a new card.

...

Edited by Draco18s

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.

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.

Announcements



×
×
  • Create New...

Important Information

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