Fixed Slow Rift Regeneration and Various Improvements #173

Merged
SenseiKiwi merged 12 commits from master into master 2014-07-11 20:12:08 +00:00
SenseiKiwi commented 2014-07-11 20:03:11 +00:00 (Migrated from github.com)

Fixed slow rift regeneration in dimensions with many rifts by implementing scheduled regeneration. NewDimData tracks which links exist in each chunk. When a chunk is loaded, the links in a chunk are all queued for regeneration. The same mechanism is used when rifts are replaced with other blocks and when dimensional doors are broken - with a shorter waiting time in the latter case.

I also streamlined some of the code in minor ways by moving boilerplate checks around certain functions into the functions themselves, and I removed unnecessary functions. The most noteworthy among those side changes is that blocks schedule their regeneration through the breakBlock() event, instead of relying on overriding invalidate() in our tile entities. That change was meant to reduce the checks needed to decide whether to schedule regeneration, but I later realized it eliminated only one or two checks, so the gains were small.

Fixed slow rift regeneration in dimensions with many rifts by implementing scheduled regeneration. NewDimData tracks which links exist in each chunk. When a chunk is loaded, the links in a chunk are all queued for regeneration. The same mechanism is used when rifts are replaced with other blocks and when dimensional doors are broken - with a shorter waiting time in the latter case. I also streamlined some of the code in minor ways by moving boilerplate checks around certain functions into the functions themselves, and I removed unnecessary functions. The most noteworthy among those side changes is that blocks schedule their regeneration through the breakBlock() event, instead of relying on overriding invalidate() in our tile entities. That change was meant to reduce the checks needed to decide whether to schedule regeneration, but I later realized it eliminated only one or two checks, so the gains were small.
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: apex/DimDoors#173
No description provided.