Jump to content

[1.7.10] Remotely loading a chunk


FiskFille

Recommended Posts

How can I remotely load a chunk, or keep a chunk loaded? I've looked into ForgeChunkManager#forceChunk(ticket, chunk) but I can't seem to figure out how to use it. Could anyone provide an example, or point me in the right direction?

 

Thanks in advance.

I'm Fisk, but people tend to call me "you" or "the TransformersMod guy".

Link to comment
Share on other sites

Hey there in my mod I have a basic one chunk chunk loader and a complex quarry chunk loader that loads the block the quarry is in and the block it is currently digging in order to prevent massive updates when returning to the area. Here are the parts, if you need more help feel free to ask.

 

Chunk loading callback  registered in postinit in main mod class :

 @EventHandler
    public void postInit(FMLPostInitializationEvent event)
    {
    	ForgeChunkManager.setForcedChunkLoadingCallback(instance, new AdvancedUtilitiesChunkLoadCallback());

https://github.com/Sudwood/AdvancedUtilities/blob/master/java/com/sudwood/advancedutilities/AdvancedUtilitiesChunkLoadCallback.java

 

Tileentity Chunk loader :

https://github.com/Sudwood/AdvancedUtilities/blob/master/java/com/sudwood/advancedutilities/tileentity/TileEntityChunkLoader.java

 

Tile Entity quarry:

https://github.com/Sudwood/AdvancedUtilities/blob/master/java/com/sudwood/advancedutilities/tileentity/TileEntitySteamQuarry.java

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.

Announcements



×
×
  • Create New...

Important Information

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