Skip to content

Instantly share code, notes, and snippets.

@cpw
Created September 21, 2012 03:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cpw/3759575 to your computer and use it in GitHub Desktop.
Save cpw/3759575 to your computer and use it in GitHub Desktop.
@ForgeSubscribe
event(ForcedChunkLoad evt)
{
for (ForcedChunkTicket ticket : evt.getTickets())
{
NBTTag data = ticket.getData();
ChunkCoordIntPair chunk = ... figure out chunk from data
MinecraftForge.claim(ticket, chunk);
}
}
registerNewChunk(ChunkCoordIntPair chunk)
{
ForcedChunkTicket ticket = MinecraftForge.getForcedChunkTicket(myModObject, <some nbt data>);
MinecraftForge.claim(ticket, chunk);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment