Added a condition preventing rift clusters and gateways from generating
in The End. It's not really useful to do that right now and could
actually cause some annoying side-effects.
Fixed the regression bug that caused some of our doors to get placed in
the wrong direction. Changing doors to inherit from BaseDimDoor caused
BlockRotator to assume they weren't dimensional doors because it used
"instanceof DimensionalDoor" to check. Thanks for figuring it out,
Steven! ^_^
Also made a minor change to dungeon generation. We now check the game
rule doMobSpawning and don't spawn Monoliths from DungeonSchematic if
the value is false. This is useful for testing without Monoliths around.
We still do work to remove the portal frame blocks even if the mobs
aren't spawned.
Removed the rift creation code from the Rift Blade and removed unused
settings from DDProperties. Specifically, the rift creation flag for the
Rift Blade, since that's getting removed, and the RiftSpreadModified,
which hasn't been referenced for a while.
I also cleaned up the code in Rift Blade slightly. Its special functions
worked during testing but blocking did not. I'm not sure why at the
moment.
As part of the rewrite, I'd removed code related to replacing the
sandstone markers under dungeon exit doors, so the markers weren't being
replaced. Now that's working again.
Completed exit door code. Also fixed noise calculation for dungeon door
destinations - we were attempting to use pack depth in the calculation
before it had been initialized.
Fixed an issue with DDLoot where we couldn't distinguish between items
with the same ID but different subtypes while merging loot categories.
For instance, we could not include two different colors of dye in our
loot because their item IDs matched. We can now tell them apart properly
and include both items.
Changed EventHookContainer.LivingDeathEvent() to use the player's max
health instead of a fixed health value. No magic numbers! Also cleaned
up the code a little.
Deleted PlayerRespawnTracker and removed all references to it - we
weren't going to use it anymore anyway. Renamed IDDoorLogic to IDimDoor
- abbreviating the "Dim" as D next to the standard I for Interface is
confusing. Renamed DDoorBase to BaseDimDoor and made it into an abstract
class - that's effectively what it was supposed to be. We should be
declaring methods as abstract rather than using empty ones. I renamed
the class because the convention for naming abstract classes is to start
the name with Base. Cleaned up code in other files.
Added code so that exit doors will search for a destination and place a
platform for the player on the other side. However, the search function
only searches upward, not downward. I'd like to discuss some details
about this before completing the implementation:
1. How should the search work?
2. What should be the likelihood of a dungeon exit leading to a
different root dimension than the dungeon's actual root?
I've tested the exits and they're working well.
Added functions for generating destinations for some link types that we
hadn't included yet - player-made exits, trapdoors, and dungeon exits.
The player-made and dungeon exits still don't generate anything, but
there's a single function where we can write up the code:
DDTeleporter.generateSafeExit(). Also added some simple code for listing
root dimensions in PocketManager. None of this has been tested yet!
Cleaned up our code related to initializing dimensions. Removed
redundant instances of that code and instead created a function:
PocketManager.loadDimension() - to centralize all uses of that logic.
Added LinkTypes.REVERSE to represent links leading back out of pockets
through their entrances. That distinction might prove critical in the
future when we support resetting dungeons.
Added code so that the links for Unstable Doors are handled properly by
DDTeleporter. Hurray! Also cleaned up some unused imports in the
BiomeGen classes and removed the RANDOM_DUNGEON link type - it was meant
for the dd-rift command but there is no need for it anymore.
Moved DDTeleporter to the mod_pocketDim.core package. It seemed
reasonable given that DDTeleporter is closely tied to how Dimensional
Doors works. It controls the most critical feature for all items -
teleportation - and handles routing requests to initialize link
destinations.
Made minor changes to ItemRiftBlade to clarify our code. Had to update
mod_pocketDim to use ItemRiftBlade's new constructor after changing it
slightly.
Changed calls to canPlayerEdit() to pass hit.sideHit data with the
request. Also renamed several variables to make the code clearer.
Removed a custom implementation of the ray tracing call in BaseItemDoor
- we can use the built-in call from Minecraft there.
Made minor changes to LinkTypes for clarity. Removed removeRift() from
PocketManager since it wasn't used by anything and because it shouldn't
contain rift removal code anyway.
Fixed Rift Signatures and Stabilized Rift Signatures. A few unexpected
MC-related issues were preventing them from working properly. Also fixed
a typo that caused us to place rift blocks at the wrong coordinates with
respect to the rift sig endpoints. Autocorrected the indentation on both
source files for aesthetics.
Fixed how the door in a pocket is placed so that it doesn't break and so
that it's placed facing into the pocket. Also added code to make that
door link back to the parent dimension - forgot that before!
Fixed a similar bug in DDTeleporter and PocketBuilder that caused things
to be oriented wrong. Specifically, teleporting would orient the player
wrong relative to the destination door and pockets would be oriented
wrong relative to their parents. Teleporting works properly now.
1. Fixed mistakes in PocketBuilder that would cause dungeons to be
initialized as non-dungeon pockets. This restored Monolith spawning
around dungeons.
2. Fixed a bug in DungeonSchematic - returning links through entry doors
should work now.
3. Made minor changes to DungeonSchematic for clarity
Fixed the issue with integrated servers causing circular updates between
the combined server and client. We now check on the client side whether
the connection we're receiving data from is a memory connection (which
is presumably only used by integrated servers). If so, the client
ignores any incoming packets. We don't just disable update events
altogether because LAN games will require updating remote clients.
Also fixed a bug in PocketManager.unload() - we weren't setting isLoaded
to false after unloading everything and unregisterPockets() had to be
called before setting dimensionData to null.
Fixed more bugs. Now it's possible to generate a world without crashing.
Unfortunately, it's clear that there is a packet-sending loop going on.
I'll have to add a check to prevent integrated servers from spamming
themselves.
Finished implementing all the packet handling code. It could be improved
in the future to compress the initial packet sent to clients. With this,
the code is complete enough to run! Commands have not been fixed yet but
that will come in the future.
Threw out the complicated architecture that I'd made for synchronizing
server and client data perfectly. Instead, we now send just enough data
to the client and the resulting code is simpler. Some of the client-side
code is also done so all packet handling should be finished soon.
Continued building a system for transferring the complete internal
states of our dimensions from the server to the client. However, Steven
suggested that clients only need minimal data to operate properly, as
opposed to the server. My motivation for this more complicated system
was the concern that minimal information wouldn't be enough. I'm going
to commit my progress, then tear it down and write a much simpler
version.
Moved the DimLink code out of NewDimData in order to reduce clutter
inside that class and made it a separate class, except for functions
that should only be available for NewDimData. Deleted IDimLink and
changed all references to it to use DimLink instead. DimLink is now an
abstract class, which achieves the same encapsulation and protection we
had before by having DimLink implement IDimLink from within NewDimData.
NewDimData has a new class inside, InnerDimLink, which provides it
access to special functions that would be dangerous to expose. This is
the same mechanism used to protect NewDimData's dangerous functions.
These changes are in preparation for adding more code for packet
handling.
Not checking if a chunk existed before we placed a rift block could
cause the MC server to generate chunks in unloaded terrain. Bad things
commence. Possible world leak canidate.