Commit graph

461 commits

Author SHA1 Message Date
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
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
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
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
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
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
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
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
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
StevenRS11
c7ddff97b2 Rift rendering work
Not sure if I want to keep working at this or not
2013-08-21 22:13:59 -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
2e833b55c3 rift rendering work
Getting closer- still need to sync client and server
2013-08-21 01:10:28 -04:00
SenseiKiwi
74c1bc4cf4 Merge pull request #1 from GreyMario/patch-1
Fixed the NEI breaking bug.
------------------
Thank you!
2013-08-20 19:36:58 -07: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
99d9b5a2a1 Merge branch 'master' into DungeonPacks 2013-08-20 18:57:12 -04:00
SenseiKiwi
4d1503db3f Minor Change
Minor change - fixing spacing that was messed up by Eclipse.
2013-08-20 18:55:26 -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
740ba51a04 BlockDimWallPerm: Sped up transition from Limbo to Overworld
Hijacking teleportEntity seems to make this faster.
2013-08-18 14:13:23 -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
caf33bd866 Improved EventHookContainer
Made some changes to EventHookContainer.onWorldLoad() to remove
redundant code that encouraged bugs. Unfortunately, a lot of
link-related code needs to be rewritten to get rid of bugs, so that'll
come after dungeon packs are completed.
2013-08-17 20:32:30 -04: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
7537d6cd7a Decreased Default Gateway Generation Chance
Decreased the default chance of a gateway generating. This won't affect
users unless they clear their config files. The decision is based on
user feedback and recent experiments on how common gateways could be.
2013-08-15 05:35:03 -04:00
SenseiKiwi
6b69d3d138 Added Nether Gateway Chance Correction
Modified RiftGenerator to correct for the rarity of Rift Gateways in the
Nether. Our config settings allow us to set the probability that we will
attempt to generate a gateway in a given chunk. However, that doesn't
guarantee that a gateway will generate.

I collected a lot of data and determined that generation succeeds in the
Nether only about 15% of the time. That's compared to 30% in the
Overworld when counting oceans (which always fail) and about 75%
(sometimes higher) when traveling mainly on land.

RiftGenerator now corrects for this by multiplying the chance of
attempting to generate gateways in the Nether by 4. Gateways in the
Nether are still relatively rare and hard to find, but you'll
occasionally come across them now. Also reorganized the code a little
for clarify.
2013-08-07 22:11:10 -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
0f3853c651 Merge remote-tracking branch 'upstream/master' into DungeonPacks 2013-08-05 20:17:15 -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
StevenRS11
1575f5139c added vanilla rail rotations 2013-08-05 16:27:33 -04:00
SenseiKiwi
35329f9024 Adding DungeonChainRuleDefinition
For some odd reason, git didn't commit DungeonChainRuleDefinition in my
last commit. Adding it again now.
2013-08-05 09:50:00 -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
2dfabccaa9 Minor Change
Overlooked a spelling mistake that would cause compilation errors.
2013-08-03 16:29:05 -04:00
SenseiKiwi
b7327b2bf6 Minor Change
Minor changes to make the rift block-eating code meet our coding
conventions and to make it more intuitive.
2013-08-03 16:26:22 -04:00
SenseiKiwi
82c6e214b0 Fixed Glass Immunity to Rifts
Removed glass from the list of blocks immune to rifts. That was just a
temporary change so that I could check how rifts were destroying blocks
in a controlled manner.
2013-08-03 15:05:46 -04:00
SenseiKiwi
3ef7630f2c Made Rifts Destroy Blocks in Layers
Made it so rifts destroy blocks in layers rather than destroying random
surrounding blocks, even through indestructible blocks. This resolves
issue #24.
2013-08-03 13:56:48 -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
84872acb97 Added Support for Activator Track
Added support for rotating the metadata of activator tracks.
2013-08-02 15:15:45 -04:00
SenseiKiwi
81bac7b7ff Added Support for More Metadata Rotations
Added support for rotating the metadata of powered tracks and detector
tracks. Also made a minor change to DungeonSchematic to protect its
internal state.
2013-08-02 14:46:47 -04:00
SenseiKiwi
62b1629a8a Fixed Metadata Rotation for Stairs
Changed BlockRotator so that missing stair types are recognized for
applying rotations. The general code for all stairs was there but the
block IDs for wooden and brick stairs weren't recognized. Also removed a
duplicate reference to nether brick stairs.
2013-08-02 13:49:24 -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
SenseiKiwi
8817653ce8 Merge remote-tracking branch 'upstream/master' 2013-08-01 23:42:01 -04:00
SenseiKiwi
1dd9d802b0 Converted Schematic Doors
Converted the doors in our schematics into doors from DD. Also converted
mangled block IDs into Fabric of Reality and wiped all tile entities
from Steven's schematics to remove prefilled chests that had been
included somehow. Changed DungeonSchematic to expect mod doors now. This
means we can include Vanilla doors in our designs and they will not be
converted anymore.

This process was done by automatically re-exporting all of our dungeons
multiple times, so it serves as a good test that importing and exporting
are working properly. We confirmed by thorough testing that our
schematics load properly into WorldEdit. MCedit, unfortunately, does not
handle them right. We believe this is a bug in MCedit, NOT with us.
2013-08-01 23:36:28 -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
StevenRS11
43162a6fce Merge branch 'master' of https://github.com/StevenRS11/DimDoors 2013-08-01 13:55:07 -04:00
StevenRS11
15b9d65f9f Fixed packet bug
no need to send link creation packet when blockRift is placed.
2013-08-01 13:54:51 -04:00
SenseiKiwi
a081419855 Progress on Vertical Dungeon Clipping (broken)
Changed SchematicLoader to use new dimHelper functions to move links
around. This should have allowed us to shift dungeons safely.
Unfortunately, Minecraft still crashes, so the link functions aren't
working as advertised. Please figure out what's going on. >_< The code
is done, it's just link issues that prevent it from working.
2013-08-01 13:37:33 -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
c83d622ceb Fixed MCedit 1.7.1 Support
Made a minor change to Schematic so that MCedit will load our schematics
properly.
2013-07-31 16:56:42 -04:00
SenseiKiwi
27cfd444a9 Minor Change
Added explanation of mysterious RiftGenerator condition.
2013-07-31 16:15:13 -04:00
SenseiKiwi
a4793944b3 Added Support for GenerateStructures
We now check whether structure generation is allowed. This can be
configured on servers and when creating single-player worlds. If set to
false, Rift Gateways will not generate. Rift clusters still generate.
That was an intentional feature - we could make the setting disable
those as well if we want.
2013-07-31 14:25:24 -04:00
SenseiKiwi
371b5ce30f Added Exception on Bad Terrain Block IDs
DDProperties will now throw an exception that should crash Minecraft if
the user tries to use invalid block IDs for worldgen blocks. Should save
everyone some suffering.
2013-07-31 12:24:10 -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
80968f9abf Fixed falling damage persisting after teleport 2013-07-30 20:19:00 -04:00
StevenRS11
c87e572136 Fixed /dd-rift orientation funkyness. 2013-07-30 20:15:55 -04:00
SenseiKiwi
0c8d012f50 Minor Change
Made a minor change to DungeonSchematic so that it replaces foreign mod
blocks with the standardized FoR ID on export. Previously it used the
Forge-assigned ID, but since that happens after ID standardization, it
could cause us to export non-standard IDs.
2013-07-30 18:27:40 -04:00
SenseiKiwi
9f728dbd6c Merged Upstream Changes 2013-07-30 18:11:33 -04:00
StevenRS11
b4a4c52784 Merge branch 'master' of https://github.com/StevenRS11/DimDoors 2013-07-30 17:57:06 -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