Commit graph

127 commits

Author SHA1 Message Date
StevenRS11
6b3b2d6471 Fixed Chunk Loading crash 2013-11-07 00:32:04 -05:00
StevenRS11
59489f290f Finished Server mode
Also added World Thread
2013-11-06 15:16:07 -05:00
StevenRS11
e3df3cad08 Finished Loading blacklist & forced chunks 2013-11-06 14:27:55 -05:00
StevenRS11
a04a266c17 THE UPDATE
Merging months of dev work into master. The update is playable, but
untested.
2013-11-05 18:15:23 -05: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
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
SenseiKiwi
ddf94334e0 Merged Changes
Merged all pending updates and changes into the master branch.
2013-08-22 16:09:42 -04:00
StevenRS11
758f5e5062 Fixed a few bugs, more rendering changes 2013-08-22 16:04:08 -04:00
SenseiKiwi
db98086096 Merge branch 'master' of https://github.com/SenseiKiwi/DimDoors 2013-08-22 02:47:27 -04:00
SenseiKiwi
939ed771a8 Completed Dungeon Pack Implementation
Added code so that the mod loads dungeon packs stored in the custom
dungeons folder. Changed the code for loading bundled dungeons so that
they're loaded as dungeon packs. This means dungeon packs are now fully
integrated into the mod. The changes were tested and seem to be working
perfectly.
2013-08-22 02:25:26 -04:00
SenseiKiwi
f1bfac3e16 Minor Change
Moved the getDimDungeonPack() function from SchematicLoader to
DungeonHelper so that DungeonHelper.RuinsPack could be a private
variable.
2013-08-21 14:49:41 -04:00
SenseiKiwi
0e67596ca0 Progress on Implementing Dungeon Packs
1. Integrated support for dungeon pack config options into the code
(i.e. we actually DO what the settings specify)
2. Added random transitions from one dungeon type to another. Dungeons
might also begin with a non-default pack.
3. Fixed a config reading bug that caused settings to be ignored and
some invalid settings wouldn't trigger exceptions. Also fixed other
dungeon pack bugs.
2013-08-21 14:26:10 -04:00
StevenRS11
69e32aa1fb Merge branch 'master' of https://github.com/StevenRS11/DimDoors 2013-08-20 21:43:38 -04:00
StevenRS11
d9a9091a2b changes to RiftRender 2013-08-20 21:43:33 -04:00
SenseiKiwi
acab06115a Progress on Implementing Dungeon Packs
Added code for parsing dungeon pack config files. The settings for our
built-in dungeons are now read from a file instead of being hardcoded.
One or two settings aren't being accessed yet and we still don't search
for other dungeon packs in the custom dungeon folder.  That'll come in
another commit.
2013-08-20 18:54:30 -04:00
GreyMario
0deb4b8917 dimHelper: changed teleportEntity to public
This enables use in BlockDimWallPerm for escaping Limbo quickly.
2013-08-18 14:14:36 -07:00
GreyMario
40310688ed yCoordhelper: added top-down search (may be redundant)
This is used for the code that determines where to come out of Limbo in. It tries to search from the top down to find a solid block to stand on. Isn't complete, though. This code does need some considerations put in, though... I'm concerned about Natura's clouds, for instance.
2013-08-18 14:11:51 -07:00
GreyMario
2d6194d599 Fixed the NEI breaking bug.
Whoops. We needed that experience packet.
2013-08-18 02:42:07 -07:00
GreyMario
40ae8a06bd Fixed the NEI breaking bug (and an undiscovered bug involving sleeping and entering pocket dimensions) 2013-08-18 02:38:23 -07:00
SenseiKiwi
dc7289a048 Dungeon Selection Fix and Chain Config Change
Changed how Random is initialized in SchematicLoader to prevent issues
with dim doors in the same chunks leading to the same dungeon. The
selection seems much more varied now. Also changed the hardcoded config
for the default dungeon chains to the one we'll be using later (from a
file). For testing purposes.
2013-08-15 07:29:37 -04:00
SenseiKiwi
68bf4a16c1 Merge remote-tracking branch 'upstream/master' into DungeonPacks 2013-08-06 05:30:19 -04:00
StevenRS11
57b6a5efb2 Various Fixes
Exit doors are safer now, but only dungeon exit doors will stop you from
falling into liquids.
Doors you place in pockets you make will happily drop you into lava, but
not spawn you inside of it.

Dungeon gateway orientation fix

Removed excess .schematics and fixed one of them.
2013-08-06 01:12:12 -04:00
SenseiKiwi
f372b9ccb5 Basic Configurable Dungeon Chains
Completed a basic version of configurable dungeon chains. Almost all of
the final funcionality is present. However, the configuration is
hardcoded at the moment, not read from a file. This was done for testing
purposes. I'll add reading from config files soon.

Dungeon packs are partially implemented. Built-in and custom dungeons
are currently thrown into the default pack, Ruins. The next step is to
generalize the dungeon registration code in DungeonHelper so that we can
detect dungeon packs, read their config files, and register dungeons
with their corresponding pack. dd-export will need to support packs as
well. dd-rift will have issues dealing with duplicate dungeon names
across packs, but this isn't a major concern and can be dealt with in
the long term.
2013-08-05 20:16:45 -04:00
SenseiKiwi
101e9e4ce6 Progress on Implementing Dungeon Packs
Completed enough of the implementation and integration to compile DD.
Some portions of the code are only for testing and will be removed
later. The configuration for default dungeons is hardcoded - we can
parse config files once we're certain that dungeon chains work. At the
moment, dungeons generate but it doesn't seem like the rules we set are
being followed properly.

Renamed OptimizedRule to DungeonChainRule, and renamed the old
DungeonChainRule to DungeonChainRuleDefinition, to match the role of
each class better. Added some hax to DungeonGenerator to get packs
integrated - the implementation will be much cleaner once the new save
format is done.
2013-08-05 09:48:49 -04:00
SenseiKiwi
e96fc02747 Progress on Implementing Dungeon Packs
Started implementing our support for dungeon packs. The code is not
usable yet and the mod is not functional at this stage. A few additional
changes should make it testable. A significant obstacle to implementing
dungeon packs easily is that DungeonGenerator doesn't have some
necessary information and shouldn't be modified. Even if it is modified,
old serialized instances wouldn't have the new fields initialized. I'm
having to create workarounds until we implement the new save format.

DungeonPack handles all of the logic of selecting a dungeon and
verifying whether its type is valid. It relies on DungeonChainRule and
OptimizedRule to check which dungeons should be generated next given a
list of the dungeons in a chain. DungeonType maps types in packs to ID
numbers and provides a reference to the pack that owns the type.
DungeonPackConfig will carry config information to be passed to the
DungeonPack constructor.
2013-08-04 19:27:34 -04:00
SenseiKiwi
3d04e9b9cc Made Rifts Check Block Hardness
Made rifts check block hardness while replacing blocks so that we can
avoid destroying strong or indestructible blocks from other mods.
Updated references throughout the code to use a function in BlockRift
for this purpose.
2013-08-03 06:12:56 -04:00
SenseiKiwi
b050c6c61b Improved Metadata Rotation Code
Simplified metadata rotation code by only having a single function that
rotates metadata by 90 degrees clockwise and applying it repeatedly for
180 and 270 degree rotations. Removed flipDoorMetadata() from dimHelper
and replaced all references to it with references to BlockRotator. This
makes all our rotations reference a single function. Replaced hardcoded
rotation in DungeonSchematic.

Added support for wood (tree trunk) and quartz pillar metadata
rotations.
2013-08-02 07:48:44 -04:00
SenseiKiwi
0c7da8a54c Minor Improvements to DungeonHelper
Minor improvements to DungeonHelper. Cleaned up constants a bit and
added a new constant.
2013-08-02 04:54:24 -04:00
StevenRS11
03163de4dd various fixes
Fixed rifts not moving correctly when moving dungeons to stay inside
world bounds
Regular pockets stay in world bounds.
RiftRegenerator no longer NPEs
Fixes #48, #63
2013-08-01 18:01:42 -04:00
SenseiKiwi
0b9f8fa5d5 Improved DungeonHelper
Completed changes so that our code uses registerDungeon() (formerly
registerCustomDungeons() ) to register all dungeons, both bundled with
the mod and custom ones. Made some changes to the code to hide
implementation details from other classes. Also, I had some problems
with old dungeons being mixed into the renamed ones. I had to remove
fallingTNThall from the schematics folder and deleted the WIP folder
because I think we have completed versions of those schematics already.

Some of our dungeons have pre-filled chests and the contents are more
generous than our current loot system (e.g. ruinsO has a prefilled
chest). I'll have to wipe all the chests later.
2013-08-01 13:00:27 -04:00
SenseiKiwi
a174ad4b29 Fixed CommandCreateDungeonRift
Forgot to fix a reference to DungeonHelper in CommandCreateDungeonRift
during the last commit. Made some further improvements to DungeonHelper
to avoid exposing internal variables.
2013-08-01 00:05:08 -04:00
SenseiKiwi
5ddf2c636f Improvements to DungeonHelper
Removed hardcoded references to all our internal dungeons. The code will
be replaced by reading from a list in the next commit. Renamed
customDungeons to untaggedDungeons and removed registration of tagged
dungeons into that list. Now all tagged dungeons (custom and internal)
are listed in registeredDungeons. Fixed the comparator used to sort
dungeon names so that it sorts them case insensitively.
2013-07-31 23:56:26 -04:00
StevenRS11
b278af0c23 Changes to dimHelper
replaced dimHelper.dimList.get with dimHelper.instance.getDimData
added functions to make working with rifts easier
2013-07-31 19:34:08 -04:00
SenseiKiwi
96c1b3d7a4 Fixed Vertical Dungeon Clipping
Added code to SchematicLoader to adjust the Y coordinate of the
destination link into a dungeon before the dungeon is created.
IMPORTANT: The code is commented out at the moment because it causes a
link-related NullPointerException. A link needs to be updated through
DimHelper but the code is hard to follow so I've decided to just not
touch it - Steven will have to do it.

The function adjustDestinationY() checks if the given entrance location
would place any portion of the dungeon outside the vertical bounds of
the world. If so, it corrects the location while moving it as little as
possible from its original place.

Also added some checks to make sure that any schematic we load has an
entrance door. Otherwise, load defaultBreak instead. And I cut down on
the absurd number of compiler warnings in dimHelper. <_< Stop accessing
static fields as instance fields!
2013-07-31 12:09:47 -04:00
SenseiKiwi
356bfe4bd0 Limited Sizes of Generated Dungeons
Added validation to SchematicLoader that prevents dungeons beyond
certain maximum dimensions from being loaded. Our current limits are the
same as the largest dungeon we could export. Rewrote
generateDungeonPocket() to handle that possible failure better.
2013-07-31 08:05:58 -04:00
StevenRS11
c87e572136 Fixed /dd-rift orientation funkyness. 2013-07-30 20:15:55 -04:00
SenseiKiwi
9f728dbd6c Merged Upstream Changes 2013-07-30 18:11:33 -04:00
SenseiKiwi
766336a259 Fixed Door Bugs
Fixed the bugs that caused doors not to appear right in dungeons. First
there was a bug with filters that caused them not to replace blocks
properly. I made some changes to SchematicFilter and its derived classes
so that the implementations are a little more intuitive. That should
prevent those bugs in any future derived classes. Then doors wouldn't
rotate properly. DD was never designed to rotate dimensional doors. I
added code to BlockRotator for that and shifted some code from
DungeonHelper to BlockRotator. More coherence, less coupling!
2013-07-30 17:57:05 -04:00
StevenRS11
d747c96c08 Fixed rift rotation bug & added teleport command
Moved the selection of the dungeon to when the player first enters the
door, not when the rift is created.
2013-07-30 17:56:59 -04:00
SenseiKiwi
f4653d0522 Improved and Integrated DungeonSchematic
Improved DungeonSchematic to the point that it can replace
SchematicLoader as our method of loading dungeons. Some of the code was
copied over rather than refactored to save time. It's been subdivided so
make it much more readable. Also, we can reimplement portions of it as
WorldOperations later on further remove redudancy. Testing shows that
there is one problem left to fix: door blocks are not being set up
correctly at the moment. Rifts are being set up properly and attaching
doors to rifts will show that dungeons continue to generate fine.

Added classes to support DungeonSchematic and its additional filtering
logic on import and export. SpecialBlockFinder handles listing the
entrance, other doors in the dungeon, and end portal frames.
FillContainersOperation is a WorldOperation that fills chests and
dispensers. BlockRotator is a temporary class to hold
transformMetadata() and transformPoint() until we rewrite that code
later.

Stripped out most of the code from SchematicLoader to ensure it's no
longer used. The only remaining function sets up dungeon pockets. We can
phase it out in a later version so as not to delay our release. Removed
references to SchematicLoader in mod_pocketDim since it no longer needs
to be instantiated.
2013-07-30 13:58:14 -04:00
SenseiKiwi
877678c945 Created DungeonSchematic Class
Created DungeonSchematic, a class that extends Schematic and adds
DD-specific functionality such as methods for filtering the schematic's
block before importing and exporting. Testing confirms that
DungeonSchematic works well so far, although it still lacks critical
features.

Made some minor changes to Schematic and copied
SchematicLoader.setBlockDirectly(). I realized during testing that
setting blocks without using that function could cause problems. First,
it's possible that the blocks would not be placed if chunks weren't
created. Second, there are issues with blocks updating if we use World
to set them, even if block updates are disabled. That causes some
torches to break and other weird problems.

Added classes to support block filtering operations applied to
Schematic. These are used to implement ID standardization and removing
mod blocks when importing.
2013-07-29 09:58:47 -04:00
SenseiKiwi
210c791af4 Created Schematic Class
Separated part of the dungeon-exporting logic into a new class:
Schematic. Also created a few classes to implement important operations.
Some parts of the original exporting logic are missing now, such as
mapping certain blocks to standard IDs. That will be reimplemented in
the future. Importing schematics is not supported yet. I need to test
what's done so far.
2013-07-27 06:52:30 -04:00
SenseiKiwi
a766589eb0 Finished Renaming Classes
Removed the Xs from the ends of LimboSkyProvider and PocketProvider. Now
their names are properly capitalized.
2013-07-26 05:31:59 -04:00
SenseiKiwi
3a6b22c7cc Renamed Classes
Renamed MobObelisk to MobMonolith. Renamed LimboSkyProvider and
PocketProvider to have Xs at the ends of their names. This is temporary
so that I can change the name's capitalization. Windows considers the
names the same because it's file naming is case insensitive.
2013-07-26 05:30:59 -04:00
SenseiKiwi
1b8d2aed53 Removed dd-create Requirement for Exporting
Removed the code in DungeonHelper and CommandEndDungeonCreation that
would force the player to use "override" with when exporting dungeons
that DD did not recognized as having been built in custom dungeon
pockets. This restriction is no longer necessary now that we don't need
pockets with standardized orientations or Eternal Fabric boundaries.
2013-07-26 01:57:18 -04:00
SenseiKiwi
84cfa9904c Fixed Export Height Bug
Fixed a bug in DungeonHelper that could cause dungeons to get clipped
during export if they extend past Y = 127. We used
world.getActualHeight() to obtain the height of the pocket, which should
be 256, but getActualHeight() returns 128 for dimensions with no sky.
Pocket dimensions are set to have no sky, so this becomes an issue.
2013-07-24 20:17:56 -04:00
SenseiKiwi
eb9c8822d9 Fixed NullPointerException in yCoordHelper
I believe I've fixed the cause of a NullPointerException that some
players have been experiencing. It seems to have been caused by
unregistered block IDs being present in Limbo. Possibly because people
removed mods and they had generated structures in Limbo. Or the players
had placed blocks and then removed the mods, or changed block IDs
around.

This fixes issue #47.
2013-07-24 15:34:21 -04:00
StevenRS11
3050dc9d1f Chnaged dungeon 2013-07-18 14:30:21 -04:00
StevenRS11
c0ac76cdfe Added dungeons and fixed monolith placement bug 2013-07-18 01:20:12 -04:00