Commit graph

747 commits

Author SHA1 Message Date
SenseiKiwi
e8e0cdf8ad Minor Changes
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.
2013-09-05 00:15:48 -04:00
SenseiKiwi
fa33fa95c8 Fixed Rift Signatures
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.
2013-09-04 19:26:59 -04:00
SenseiKiwi
8d5a3ac72e Fixed More Bugs
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!
2013-09-04 16:06:54 -04:00
SenseiKiwi
70eb276086 Fixed More Bugs
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.
2013-09-04 14:29:53 -04:00
SenseiKiwi
b3847a62b7 Fixed More Bugs
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
2013-09-04 13:48:54 -04:00
StevenRS11
4f093751ee Merge pull request #82 from SenseiKiwi/rewrite
Fixed Various Bugs
2013-09-03 21:35:52 -07:00
SenseiKiwi
b9fcfea877 Fixed Various Bugs
Fixed various minor bugs affecting transient doors and teleportation.
2013-09-04 00:34:11 -04:00
StevenRS11
fb25fc43eb Merge branch 'DevBranch' of https://github.com/StevenRS11/DimDoors into DevBranch 2013-09-03 23:28:43 -04:00
StevenRS11
f9092f3b5a Merge pull request #81 from SenseiKiwi/rewrite
Rewrote All the Things
2013-09-03 20:26:52 -07:00
SenseiKiwi
549ee54852 Fixed More Bugs
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.
2013-09-03 21:41:54 -04:00
SenseiKiwi
1a50aa2290 Minor Changes
Minor changes: removed unused imports and random blocks of whitespace
2013-09-03 19:31:19 -04:00
SenseiKiwi
8bfe9dc22e Fixed More Bugs
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.
2013-09-03 18:28:42 -04:00
SenseiKiwi
77bc0e833f Fixed Bugs
Fixed bugs that would cause Minecraft to crash on startup. At least I
can get to the main menu now.
2013-09-03 17:47:02 -04:00
SenseiKiwi
4cd7d3c0ae Completed Packet Handling Code
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.
2013-09-03 17:25:58 -04:00
SenseiKiwi
3568d223ff Overhauled Server-Side Packet Handling
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.
2013-09-03 15:33:09 -04:00
SenseiKiwi
307d2258d1 Progress on Rewriting Packet Handling
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.
2013-09-02 16:51:20 -04:00
SenseiKiwi
56ecb0cd9e Reorganized DimLink Code
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.
2013-09-02 11:47:12 -04:00
StevenRS11
af7bb05042 Chunk leak patched
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.
2013-09-01 23:27:30 -04:00
StevenRS11
9c8a404a14 Merge pull request #79 from SenseiKiwi/rewrite
Rewrite
2013-09-01 19:17:17 -07:00
SenseiKiwi
0bd7ef9593 Deleted PacketHandler
Forgot to commit this change before.
2013-09-01 22:02:05 -04:00
SenseiKiwi
62fed83e2f Started Rewriting Packet Handling
Started rewriting our packet handling code. Deleted PacketHandler in
favor of using sided (Server-, Client-) packet handlers to make it
easier to follow what's going on in our code. Added some event-based
handling of updates which greatly simplified signaling that data needs
to be sent, but it's not completely done yet.
2013-09-01 22:01:17 -04:00
SenseiKiwi
efa5b3eb4c Modified NewDimData and IDimLink
Modified how links are created so that the caller must specify a link
type when the link is created, rather than setting it later. This was
done to avoid having to send two link data packets following the way
links would be handled logically. Turns out this was good idea overall
for ensuring link integrity, because there was one case where I forgot
to set the link type after creating the link.
2013-09-01 10:50:20 -04:00
SenseiKiwi
4086e75ead More Progress on Rewrite
Fixed the code in DDTeleporter and made minor changes to other classes
that depended on those fixes. Ensured that PocketManager's load, save,
and unload methods are called appropriately and rewrote some of their
code. Made various changes in other classes (e.g. EventHookContainer,
PlayerRespawnTracker) to pass them references to DDProperties through
their constructors instead of having them rely on
DDProperties.instance() - this is a better programming practice in the
long run.

Renamed initialization methods in mod_pocketDim to make it clear that
they're called on events. Commented out command registration in
mod_pocketDim so that we can test DD as soon as PacketHandler is fixed,
without worrying about fixing the command classes.
2013-09-01 09:21:27 -04:00
SenseiKiwi
b795885f1c Renamed ItemLinkSignature to ItemRiftSignature
Renamed ItemLinkSignature to ItemRiftSignature to match its in-game
name. Automatically updated references to the old class name.
2013-08-31 20:46:20 -04:00
SenseiKiwi
4f3ab403d3 More Progress on Rewrite
Fixed the code in ItemLinkSignature and ItemStabilizedRiftSignature.
Removed obsolete code from PocketManager - we don't need to worry about
storing link keys anymore. All the data is stored in NBT, which means no
more generating unique keys or worrying about saving and loading them.
2013-08-31 20:44:31 -04:00
SenseiKiwi
1cc1c374f6 Removed DimRail Files
Removed files related to DimRail since they seem to be left over from a
scrapped idea. We can revert this commit later to restore them.
2013-08-31 16:46:40 -04:00
SenseiKiwi
ea1fc5f4c0 Reorganized and Renamed Classes
Moved tile entity classes to a separate package. Renamed some block
classes to match their in-game names (e.g. ChaosDoor -> UnstableDoor).
Moved TransientDoor to the blocks package. Cleaned up a little bit of
the code and automatically updated references to the classes that were
modified.
2013-08-31 16:43:18 -04:00
SenseiKiwi
4b5870339b Removed Obsolete Code from PocketManager
Removed obsolete code from PocketManager. Much of that functionality has
already been reimplemented in other classes.
2013-08-31 16:30:41 -04:00
SenseiKiwi
f34b06b834 More Progress on Rewrite
More cleaning up errors and code. There were a lot of things that needed
simplifying. Rather than fix the 3 or 5 copies of the same function
throughout the code, I made an effort to use the same function and
delete its copies.

Created the BaseItemDoor class to hold all the basic door item methods
that don't vary between types. That helped cut down on fixing things.
Also renamed the door item classes to match their in-game  names.

There is still a ton of duplicate code out there.
2013-08-31 16:00:18 -04:00
SenseiKiwi
d9056e551f More Progress on Rewrite
Continued fixing things across various classes to make them work with
our new core classes. I've also cleaned up indentation and random code
snippets along the way.
2013-08-31 12:58:35 -04:00
SenseiKiwi
5cabd3762e More Progress on Rewrite
Continued fixing things across various classes to make them work with
our new core classes.
2013-08-31 07:39:52 -04:00
SenseiKiwi
9930068775 Fixed PocketBuilder and More
1. Changed DungeonSchematic to use an external instance of Random rather
than initializing its own.
2. Created the Pair class, a strongly-typed tuple that was needed in
PocketBuilder.
3. Added a missing calculation in NewDimData for setting the packDepth
field during dungeon initialization.
4. Finished code missing in PocketBuilder. Changes listed above were
needed for this.
2013-08-30 16:27:27 -04:00
SenseiKiwi
8e8346864e Fixed DungeonSchematic
Modified DungeonSchematic to use the new link and dimension classes.
2013-08-30 10:57:08 -04:00
StevenRS11
42098e50b6 Merge pull request #77 from SenseiKiwi/rewrite
Flipped a Table
2013-08-28 23:28:59 -07:00
StevenRS11
c17583820c Merge pull request #75 from SenseiKiwi/master
Minor Fixes to Old Dungeons
2013-08-28 23:18:15 -07:00
SenseiKiwi
934dcfde3d Flipped a Table
Replaced several core classes from DD with new classes to enforce
integrity checks. Rewriting everything that depended on those classes is
a massive undertaking but it should simplify our code and prevent the
many bugs we've seen lately. The rewrite isn't done yet, just committing
my progress so far.
2013-08-29 02:14:24 -04:00
SenseiKiwi
050bdd1090 Merging Changes to Master
Merging recent changes to master.
2013-08-26 02:11:24 -04:00
SenseiKiwi
30b8e98ad8 Minor Fixes to Old Dungeons
Fixed the two blocks sticking out in the multilevel maze that made a
staircase unusable. Put a floor in simpleDropHall so it's actually
usable rather than killing the player.
2013-08-26 01:59:37 -04:00
StevenRS11
928b7d4cba Merge pull request #74 from SenseiKiwi/master
Improved Dungeon Loot and Selection
2013-08-24 10:45:39 -07:00
SenseiKiwi
02b96c0c05 Improved Dungeon Loot and Selection
DDLoot: Implemented a custom version of MC's generateChestContents() for
our own chests. It avoids two notable bugs that affect MC's version.

FillContainersOperation: Changed code to use
DDLoot.generateChestContents()

SchematicLoader: Fixed a bug in the way we calculated a seed for
selecting our dungeons that would cause certain seeds to dominate all
the others. Under certain circumstances, the function would only return
-1. That would make our dungeon selection severely biased. That was
resolved and the code was specifically tuned for seeding Java's Random
even for doors with nearly identical positions. The result was an
apparent major improvement in the randomness of dungeons.

ruins\rules.txt: Changed the dungeon generation rules to precisely match
the complicated scheme we had before. We're still using simple rules to
choose dungeons - I used a program to derive the effective distribution
of dungeon types that the old code would produce and converted it into
the current rule system.
2013-08-24 07:52:35 -04:00
SenseiKiwi
dd9b1f0c65 Started Rewriting LinkData
Created NewLinkData and replaced references to the original LinkData.
Moved it to the mod_pocketDim.core package. Added Point4D, an immutable
point type for 3D integer coordinates with an added dimension ID.
2013-08-23 04:12:56 -04:00
StevenRS11
a1a9e39caa Minor fixes
Rift placement with /dd-rift is fixed
Signs rotate properly
consistent behavior for wooden dim doors in pockets and dungeons
2013-08-23 01:30:24 -04:00
StevenRS11
3e3bd95844 Merge pull request #73 from SenseiKiwi/master
Fixed Config Loading Bug
2013-08-22 19:58:55 -07:00
SenseiKiwi
2b1d80f9f9 Fixed Config Loading Bug
Fixed a problem that caused bundled configs to not load sometimes.
2013-08-22 22:57:26 -04:00
StevenRS11
db3351441d Merge branch 'master' of https://github.com/StevenRS11/DimDoors 2013-08-22 22:10:16 -04:00
StevenRS11
643785022a reverted rift rendering
sadface
2013-08-22 22:10:10 -04:00
StevenRS11
45d61e3aa2 Merge pull request #71 from SenseiKiwi/master
Completed Implementation of Dungeon Packs
2013-08-22 18:22:08 -07:00
SenseiKiwi
35e97b03e2 Merge remote-tracking branch 'upstream/master' 2013-08-22 17:43:25 -04:00
StevenRS11
eaab6d6b83 Merge branch 'master' of https://github.com/StevenRS11/DimDoors 2013-08-22 16:11:53 -04:00
StevenRS11
879f3a1eaf Render fix 2013-08-22 16:11:49 -04:00