WildHeart 0 Report post Posted July 14, 2018 (edited) Hi, how to update the chunk if it was unloaded? Edited July 14, 2018 by WildHeart Share this post Link to post Share on other sites
jabelar 584 Report post Posted July 14, 2018 What problem are you trying to solve? Share this post Link to post Share on other sites
WildHeart 0 Report post Posted July 15, 2018 I have a mod that has a mechanism, this mechanism is enabled when it loads your chunk, but I need to remove it as on my server logs are created. It doesn't mention ChunkEvent.Unload / Load or ForgeChunkManger. So, I need more ways of loading the chunk which I don't know. Thanks! Share this post Link to post Share on other sites
diesieben07 6103 Report post Posted July 15, 2018 Accessing a block in an unloaded chunk (through World#getBlockState for example) will load that chunk (and then immediately unload it, since it is not needed). However you should avoid doing this. 6 hours ago, WildHeart said: I have a mod that has a mechanism, this mechanism is enabled when it loads your chunk, but I need to remove it as on my server logs are created. I have no idea what this is supposed to mean. A server always creates log files. Please clarify. Share this post Link to post Share on other sites
WildHeart 0 Report post Posted July 15, 2018 1 minute ago, diesieben07 said: Accessing a block in an unloaded chunk (through World#getBlockState for example) will load that chunk (and then immediately unload it, since it is not needed). However you should avoid doing this. I have no idea what this is supposed to mean. A server always creates log files. Please clarify. Oh, sry, it's a stupid translator. "I have a mod that has a mechanism, this mechanism loads chunk when is enabled". I know that it is possible to load the chunk using method getChunkFromChunkCoords, but what else like this can cause a сhunk loading or tileEntities update in the vicinity? Share this post Link to post Share on other sites
diesieben07 6103 Report post Posted July 15, 2018 You want to keep chunks loaded, regardless of players being nearby? Like various chunkloader blocks from various mods do? Look at ForgeChunkManager. Share this post Link to post Share on other sites
WildHeart 0 Report post Posted July 15, 2018 Not exactly. I know chunk loaders: ForgeChunManager, ChunkEvent.Load/Unload. But there are still vanilla ways I don't know about. That's what I'm asking. Share this post Link to post Share on other sites
diesieben07 6103 Report post Posted July 15, 2018 I have no idea what you are asking. Please state the concrete problem you are trying to solve. Share this post Link to post Share on other sites
WildHeart 0 Report post Posted July 15, 2018 How to update tileEntity when the player is not in the vicinity? Share this post Link to post Share on other sites
diesieben07 6103 Report post Posted July 15, 2018 Define "update". Do you want ITickable#update to be called on your TileEntity? Do you want to change data in the TileEntity? If so, how often and why? Share this post Link to post Share on other sites
WildHeart 0 Report post Posted July 15, 2018 I want to disable this in mod. It is necessary not only in one tileEntity but also in the nearest in a chunk Share this post Link to post Share on other sites
diesieben07 6103 Report post Posted July 15, 2018 You want to disable... what? Stop being vague, please. 7 minutes ago, WildHeart said: It is necessary not only in one tileEntity but also in the nearest in a chunk This is not even a complete sentence. What is necessary? Why? Share this post Link to post Share on other sites
WildHeart 0 Report post Posted July 15, 2018 I want to disable loading chunks in mod. Share this post Link to post Share on other sites
diesieben07 6103 Report post Posted July 15, 2018 9 minutes ago, WildHeart said: I want to disable loading chunks in mod. That is not possible. Do you want there to just be void when the player get's near such a chunk`? Share this post Link to post Share on other sites
Legenes 3 Report post Posted July 15, 2018 I think he's trying to say that: "My Entity is keeping the chunk loaded, and I don't want it to do that. How can I make it to be loaded only, if the player is within X chunks?" Share this post Link to post Share on other sites
WildHeart 0 Report post Posted July 15, 2018 (edited) Just now, Legenes said: I think he's trying to say that: "My Entity is keeping the chunk loaded, and I don't want it to do that. How can I make it to be loaded only, if the player is within X chunks?" Yes, thank u) But not entity, it's tile Edited July 15, 2018 by WildHeart Share this post Link to post Share on other sites
diesieben07 6103 Report post Posted July 15, 2018 (edited) 1 minute ago, Legenes said: I think he's trying to say that: "My Entity is keeping the chunk loaded, and I don't want it to do that. How can I make it to be loaded only, if the player is within X chunks?" Entities do not do that by default. @WildHeart If this is the case, then you are doing something to keep the chunk loaded. Stop doing whatever this is (you have not posted any code, so no more help can be provided). Edited July 15, 2018 by diesieben07 Share this post Link to post Share on other sites
WildHeart 0 Report post Posted July 15, 2018 Just now, diesieben07 said: Entities do not do that by default. @WildHeart If this is the case, then you are doing something to keep the chunk loaded. Stop doing whatever this is. Not entity, this is tileEntity Share this post Link to post Share on other sites
diesieben07 6103 Report post Posted July 15, 2018 Same answer. TileEntities also do not keep chunks loaded by default. Share this post Link to post Share on other sites
WildHeart 0 Report post Posted July 15, 2018 1 minute ago, diesieben07 said: Same answer. TileEntities also do not keep chunks loaded by default. I know, but what can be in it that can cause? Share this post Link to post Share on other sites
diesieben07 6103 Report post Posted July 15, 2018 (edited) 4 minutes ago, diesieben07 said: Stop doing whatever this is (you have not posted any code, so no more help can be provided). Edited July 15, 2018 by diesieben07 Share this post Link to post Share on other sites