Posted March 2, 20187 yr as the title says im trying to get if chunk was generated for the first time i have look around in the code a bit and tryed a couple things any tips or help? thanks
March 2, 20187 yr What are you trying to achieve? Check out my tutorials here: http://jabelarminecraft.blogspot.com/
March 2, 20187 yr 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.
March 2, 20187 yr Author 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(); }
March 2, 20187 yr Author 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
March 2, 20187 yr 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? Check out my tutorials here: http://jabelarminecraft.blogspot.com/
March 2, 20187 yr Author 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
March 2, 20187 yr 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.
March 2, 20187 yr Author 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?
March 2, 20187 yr 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.
March 2, 20187 yr Author ahhh theres events for newly generated chunks? can u like give me a list or one that would seem fiting?
March 2, 20187 yr 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.
March 2, 20187 yr Author I want to use like a chunk generated event if thats a thing and check if the chunk is a new chunk
March 2, 20187 yr 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.
March 2, 20187 yr Author 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?
March 2, 20187 yr 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.
March 2, 20187 yr Author 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
March 2, 20187 yr Author 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
March 2, 20187 yr 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 March 2, 20187 yr by jabelar Check out my tutorials here: http://jabelarminecraft.blogspot.com/
March 2, 20187 yr 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 March 2, 20187 yr 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.