Posted June 4, 20205 yr Hi, I want to spawn some structures when a player enters my dimension, however, I don't really see the point of using the forge Structure class instead of just looping over all blocks I want to set and using setBlockState. From what I see in the Structure class, it still uses setBlockState, so it should not perform better than just doing it myself? I also want to put some data in the TileEntities after placing them and that would be harder using the Structure class as well. I currently already have everything working with setBlockState, should I change this to use the Structure method?
June 4, 20205 yr Because worldgen is threaded and just because you've been given access to one chunk does not mean you have access to another chunk. 19 minutes ago, wefewdsad said: the forge Structure class That's not a Forge class. 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.
June 4, 20205 yr Author 33 minutes ago, Draco18s said: Because worldgen is threaded and just because you've been given access to one chunk does not mean you have access to another chunk. Ah well that makes sense, so far it didn't cause any problems though, maybe because the world is completely empty so the worldgen completes really fast? How do I know I have access to a specific chunk?
June 4, 20205 yr Its passed in the addComponentParts method as a parameter. Well, the chunkpos is, but that's sufficient. And the point of buildComponent and addComponentParts is to figure out what chunks your entire structure is in. I'm not entirely sure what the limitations are (e.g. if a single part can be larger than a chunk, how rigidly you need to stay inside the chunk, etc) but that's what those methods are for: letting the game figure out which chunks need to be available on a single thread for feature decoration. Edited June 4, 20205 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.
June 5, 20205 yr Author 13 hours ago, Draco18s said: Its passed in the addComponentParts method as a parameter. Well, the chunkpos is, but that's sufficient. And the point of buildComponent and addComponentParts is to figure out what chunks your entire structure is in. Thank you for the explanation, that really helps! I have one more question though, what if I want to build a bridge between 2 points? There is no way I can do that with the structure class right?
June 5, 20205 yr You need to declare (with buildComponent and addComponentParts) the volume that that bridge occupies. I just don't know if you can do it in one part (I haven't delved deep enough into the 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.
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.