Fixed a bug I introduced during my previous commit that caused solo
rifts to spread and rifts with neighbors not to spread. Also cleaned up
the code a bit to cut back on the number of mysterious random rolls we
were using and commented the code.
Gateway is generating, finally, but it has some... issues. Inquire
within.
Just generate a new world, and use an unstable door to warp to the first
that gens.
--Changed BlockRift to use ITileEntityProvider instead of BlockContainer
--Reorganized some of the code in TileEntityRift to improve performance
and readability
Cleaned up the code in TileEntityRift. Fixed up some spacing and changed
as many functions and fields to private as possible. Added a performance
improvement by doing the random roll for Enderman spawning before
searching for nearby Endermen.
Changed rifts to using world.destroyBlock() instead of
world.setBlockToAir(). That has the advantage of causing block
destruction animations and sound effects instead of blocks vanishing
silently.
Changed MazeDesigner to prune out some unnecessary doorways at random by
removing edges from the room graph. Previous mazes allowed all side
paths to exist, which resulted in a kind of circular layout. Although
that was disorienting to people at first, if you realized it was a
circle, it became simple to navigate through the maze. This update makes
branching paths more common.
Doorways are now placed in different ways, depending on the dimensions
of the walls that they're on. This includes that large walls get two
doorways connecting to the same room.
Fixed a bug in MazeDesigner that would connect some rooms with duplicate
doorways. The problem was in how intersections were being tracked to
improve the efficiency of adjacency checks.
Adjusted the size of mazes slightly to reign in huge rooms. If the
problem persists, we can consider other options such as dropping dungeon
sizes a little more, increasing the number of splits, or biasing the
split plane selection toward the middle of the range.
Added code to minimize the number of doorways that involve dropping
through the floor. Added a DisjointSet class as part of the
implementation. I also split the maze construction process into two
classes (MazeDesigner and MazeBuilder) to make it clearer.
Deleted old function for removing random rooms. Fixed the occasional NPE
described in my previous commit - deferred the removal of nodes from the
graph until after iterating over their collection. Added conditions for
removing maze sections that are too small to be useful.