Commit graph

625 commits

Author SHA1 Message Date
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
StevenRS11
3968255094 Merge pull request #65 from SenseiKiwi/master
Progress to Next Update
2013-08-03 20:29:01 -07: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
350b2e2e2c Removing Test File
Removed the test file from the previous commit
2013-08-02 08:06:58 -04:00
SenseiKiwi
7b315149ed Test Commit
Making a commit to test whether Jenkins is building my latest commits...
2013-08-02 08:04:07 -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
4e67a3faf6 Merge pull request #64 from SenseiKiwi/master
Converted Schematic Doors
2013-08-01 20:58:20 -07: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
StevenRS11
75fc063962 Merge pull request #62 from SenseiKiwi/master
Progress on Vertical Dungeon Clipping (broken)
2013-08-01 10:40:36 -07: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
StevenRS11
5baf0ed6ef Merge pull request #61 from SenseiKiwi/master
Progress to Next Update
2013-08-01 10:14:00 -07: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
SenseiKiwi
deb5f1a6db Added Stairs to Core Schematics
Copied simpleStairsUp and simpleStairsDown into the core schematics
folder. It's likely they'll be useful for testing in the future. To be
clear, I didn't remove them from the regular "ruins" folder, just copied
them.
2013-07-31 23:30:42 -04:00
SenseiKiwi
f0c1d2b700 Merge remote-tracking branch 'upstream/master' 2013-07-31 23:23:47 -04:00
SenseiKiwi
89e2f4d8b6 Reorganized Schematics
Removed untagged schematics and replaced them with the tagged
schematics. Moved two schematics that said NOT DONE into a "wip"
subfolder. Moved somethingBroke into a "core" subfolder. All remaining
schematics were placed in a "ruins" subfolder in preparation for the new
dungeon packs system. I did my best to ensure that all of the old
schematics had been copied and tagged, but it's possible I might have
missed one or two. I also copied in my new dungeons. This commit
temporarily breaks the mod until the new file names and locations are
referenced.
2013-07-31 23:22:33 -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
StevenRS11
7190a4ac6d Merge pull request #59 from SenseiKiwi/master
Fixed MCedit 1.7.1 Support
2013-07-31 14:24:26 -07: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
02e8325f30 Merge remote-tracking branch 'upstream/master' 2013-07-31 16:15:29 -04:00
SenseiKiwi
27cfd444a9 Minor Change
Added explanation of mysterious RiftGenerator condition.
2013-07-31 16:15:13 -04:00
StevenRS11
c92e5b2096 Merge pull request #58 from SenseiKiwi/master
Added Support for GenerateStructures
2013-07-31 12:43:38 -07:00
StevenRS11
9f039f3851 Merge pull request #57 from SenseiKiwi/ProgressOnUpdate
Progress to Next Update
2013-07-31 12:34:39 -07: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