Commit graph

183 commits

Author SHA1 Message Date
StevenRS11
c4665e0737 Fixed dungeon entrance not updating client. 2013-06-16 22:10:52 -04:00
StevenRS11
8e771d4047 tweaked generation of the platform a bit 2013-06-16 16:03:10 -04:00
SenseiKiwi
cf2246061c Trivial Changes
Made trivial changes to DungeonHelper. Just some spacing and a note to
check something in the future. Need to commit to change branches.
2013-06-16 14:40:26 -04:00
SenseiKiwi
b2f5c4ea4e Overhauled RiftGenerator
Overhauled RIftGenerator. The code is significantly more readable now.
It's commented and much more compact. I also removed all fields from
RiftGenerator - they were unnecessary and using them increased the risk
of buggy code. Made the code rely solely on the Random instance provided
by MC, meaning our rifts and gateways will be tied to the world seed.
Tweaked the code slightly so that clusters of rifts and gateways can
never generate in the same chunk. This was previously possible, although
highly unlikely. It's a work of art now. <3
2013-06-16 14:36:32 -04:00
SenseiKiwi
8dce8c1c26 Renamed all singleton create() to initialize()
Renamed the create() function of DDProperties and DungeonHelper to
initialize(). Why? Because it was bugging me. <.< That is all.
2013-06-16 12:06:21 -04:00
SenseiKiwi
f542941074 Replaced Hashtable with HashMap
Replaced all instances of Hashtable in our code with HashMap. I had
never given that much thought until Steven mentioned it. HashMap is a
better alternative for our code.
2013-06-16 11:06:08 -04:00
SenseiKiwi
63be7fefc1 Tweaked Dungeon Tutorial Copy Code
Tweaked the code that copies the dungeon export tutorial. I'm not sure
it worked all the time before. It didn't seem quite right. I've
confirmed it's working better now. Also cleaned up copyfile a little.
2013-06-16 10:54:03 -04:00
SenseiKiwi
697b0da59f Fixed Configuration and Rift Generation Bugs
Although fields were created in DDProperties for Monolith spawning and
Rift generation, they were mislabeled as reading the "World Rift
Generation Enabled" property. I gave them proper names. I also changed
the fields and names to be more intuitive and rewrote the descriptions.
For instance, "MonolithSpawnDensity" is a misnomer because as density
increases, there should be more Monoliths, not less. Now the properties
clearly state how they affect a feature. I rewrote the conditions that
used each property to correspond with those simplified descriptions and
gave the properties default values that will match the generation rates
seen before.

I also made the rift generation code less cryptic and fixed a bug; there
was a check that compared if a dimension was a pocket dimension by its
name to prevent rift generation. That name check was wrong - it would
never work. Now we check if the provider is an instance of
pocketProvider. That will continue working even if we change the way
that pocket dimensions are named.
2013-06-16 09:57:51 -04:00
SenseiKiwi
61297c3a3a Improved DungeonHelper
Separated exportDungeon() from registerCustomDungeon() - exporting a
dungeon no longer automatically registers it. Also changed
exportDungeon() so that it returns a boolean indicating success or
failure, instead of an instance of DungeonGenerator that was never being
used. I modified CommandEndDungeonCreation so that it can warn you if
exporting the dungeon failed (if exportDungeon() returned false), and
also, to register the dungeon after it's exported since it's no longer
automatic.
2013-06-16 05:59:53 -04:00
SenseiKiwi
a95b282814 Cleaned references in mod_pocketDim
Cleaned references in mod_pocketDim
2013-06-16 05:18:17 -04:00
SenseiKiwi
256384b455 Merging upstream changes
Merging upstream changes
2013-06-16 04:56:27 -04:00
StevenRS11
5e107f37f9 a few last tweaks 2013-06-16 03:40:46 -04:00
StevenRS11
cd4679c8fd configurable rift gen and monolith spawn density 2013-06-16 02:59:02 -04:00
SenseiKiwi
1bb8ddc1c4 Merging in upstream changes 2013-06-16 02:46:39 -04:00
StevenRS11
0752c032d3 merged SenseiKiwi changes 2013-06-16 01:50:23 -04:00
StevenRS11
a2eb4cf524 Fixed limbo return, schematic crash 2013-06-16 01:44:05 -04:00
SenseiKiwi
af555bbac8 Merge remote-tracking branch 'upstream/master' into R1.4.0-improvements 2013-06-16 01:30:50 -04:00
SenseiKiwi
8e200da01b Fixed minor bug
Fixed a bug with an uninitialized variable in DungeonHelper. Oops!
2013-06-16 01:30:13 -04:00
SenseiKiwi
d2259c3f5d Reintegrated initialization code for DungeonHelper
I had previously removed the function calls in mod_pocketDim to migrate
them to DungeonHelper. Completed the migration now.
2013-06-16 01:13:06 -04:00
SenseiKiwi
f56893018d Changed DungeonHelper into a singleton
Changed DungeonHelper into a singleton. Changed code in other classes to
interface with it properly.
2013-06-16 01:00:05 -04:00
StevenRS11
cb9c996861 monolith spawn and NPE in SchematicLoader fixes 2013-06-16 00:32:10 -04:00
SenseiKiwi
9828bd7f40 Fixed duplicate custom dungeon listing
Removed a line in CommandEndDungeonCreation that inserted a new dungeon
directly into DungeonHelper.customDungeons. This had a chance of causing
a duplicate listing. registerCustomDungeon() was already being invoked
before and if reading tags from the file name failed, the dungeon would
get added twice. This could explain some of the buggy dungeon listing
that would appear during testing.
2013-06-15 11:30:05 -04:00
SenseiKiwi
86f0cd7d21 Improved DungeonHelper.registerCustomDungeon()
Changed the function to use a Hashtable mapping dungeon types to their
respective lists so that it wouldn't be necessary to hardcode a
condition for each type. The code is much shorter now and we can add new
types with ease. The next stage will be to remove
weightedDungeonGetList, if possible, so that we don't have to construct
a list with duplicates just to have weights. The loop that repeatedly
inserted dungeons into that list has been removed anyway, but it
shouldn't affect anything since custom dungeon integration was broken
and weights were being ignored.
2013-06-15 11:21:49 -04:00
SenseiKiwi
1e2dedaafe Overhauling DungeonHelper
I changed the name filter for schematic names from
CommandEndDungeonCreation to DungeonHelper, and renamed it to
NamePattern. I also rewrote most of registerCustomDungeon() to be much
more concise. The changes are incomplete but I'm making an intermediate
commit. The aim is to change DungeonHelper into a proper singleton and
to eliminate the clunky sections that manually map dungeon categories to
their corresponding lists. Instead, I'll use data structures to
implement that far more efficiently.
2013-06-15 10:25:50 -04:00
SenseiKiwi
51969793a5 Fixed minor bug and cleaned up DungeonHelper
Set various lists of DungeonGenerators to private - there was no need to
make them public fields. While cleaning up the code before, I
accidentally erased the default constructor, which handled loading a
reference to DDProperties. I've put the code back in so that the class
works correctly.
2013-06-15 08:46:28 -04:00
SenseiKiwi
84e430abfd Improved DungeonHelper
I was able to infer that HashMap schematic should have generic
parameters <String, Tag> and changed the declaration accordingly. All
generic collections in DungeonHelper are now parameterized properly.
2013-06-15 08:13:50 -04:00
SenseiKiwi
172e3e3af1 Cleaned up and tweaked DungeonHelper
Cleaned up the indentation and empty lines in DungeonHelper. Set
metadataFlipList and metadataNextList to have generic type Integer,
since they're used to store block IDs. Whenever possible, we should
always be using parameterized collections instead of leaving their types
unspecified. I'd like to fix up the schematic HashMap in the future -
unless it's necessary, we shouldn't be storing values of various types
in that collection. Strongly typed variables or a class with the
appropriate fields would be much cleaner.
2013-06-15 08:07:33 -04:00
SenseiKiwi
4e8b8deab7 Formatted DungeonGenerator
Changed the formatting in DungeonGenerator. Autocorrected indentation
and removed extra empty lines to improve readability. None of the
variables were changed since that would break compability with previous
serialized instances.
2013-06-15 07:50:00 -04:00
SenseiKiwi
4c23e5c7b8 Minor change to SchematicLoader
Changed SchematicLoader to use DDLoot.DungeonChestInfo instead of
requesting a reference to the same data through ChestGenHooks. Exactly
the same data is being retrieved, but ChestGenHooks retrieves it by
performing a lookup on a map relating loot categories to loot info, so
it's slightly slower. No point in doing that if we have access to the
reference directly.
2013-06-15 07:24:28 -04:00
SenseiKiwi
21d94b7c66 Tweaked loot generation
Decreased the weight of DD items very slightly to make them a little
more rare. Added a section to DDLoot.mergeCategories() that searches for
the enchanted book loot and fixes its weight to 3 (instead of the usual
1). This makes enchanted books slightly more common. I confirmed that
books are actually spawning in loot chests. There is the possibility
that there is a built-in chance of an enchanted book taking up a chest
slot but not actually generating anything.
2013-06-15 06:32:30 -04:00
StevenRS11
d75de7c2e0 oknow 2013-06-15 05:34:37 -04:00
StevenRS11
9c33393d89 release 2013-06-15 05:34:36 -04:00
StevenRS11
1f4f38cfe3 more monolith spawning 2013-06-15 05:34:35 -04:00
StevenRS11
4a58f793a9 oknow 2013-06-15 04:30:46 -04:00
StevenRS11
7ebcfb6c20 release 2013-06-15 04:19:08 -04:00
StevenRS11
7bdce8d2be Merge branch 'master' of https://github.com/StevenRS11/DimDoors 2013-06-15 03:09:52 -04:00
StevenRS11
c0b7e7d2d3 more monolith spawning 2013-06-15 03:09:46 -04:00
SenseiKiwi
a24cd87ddb Added a filter for bad schematic names
Added a regex filter for bad schematic names in
CommandEndDungeonCreatoin. Names can only be made of letters, numbers,
and underscores now. This should prevent any nasty tricks people might
try to affect the underlying file system.
2013-06-15 02:40:00 -04:00
SenseiKiwi
b174c69e5b Merge remote-tracking branch 'upstream/master' 2013-06-15 02:19:00 -04:00
StevenRS11
cf332703c9 tweaked mob spawn frequency and rifts erase 2013-06-15 02:17:06 -04:00
SenseiKiwi
929d4680bb Merge remote-tracking branch 'upstream/master' 2013-06-15 02:10:27 -04:00
StevenRS11
fa4055f198 Fixed monolith spawning 2013-06-15 02:09:17 -04:00
SenseiKiwi
03d60dc07d Fixed bug in DDLoot, delayed loot generation
Changed DDLoot to use the correct item IDs when adding DD items to
chests. Moved loot chest registration from init() to postInit() in the
hopes that we'll be able to catch the loot of other mods that also hook
into Vanilla chests.
2013-06-15 01:58:53 -04:00
StevenRS11
4a5ea9efb3 Merge branch 'master' of https://github.com/StevenRS11/DimDoors 2013-06-14 23:16:36 -04:00
StevenRS11
b5b3fffdd3 Fixed it even MORE 2013-06-14 23:16:27 -04:00
SenseiKiwi
1c7028cd1c Separated loot config settings
Created a separate category for loot properties so that they're not lost
among all the Limbo flags.
2013-06-14 20:09:37 -04:00
SenseiKiwi
70d5c3d97e Merge remote-tracking branch 'upstream/master' 2013-06-14 15:24:17 -04:00
SenseiKiwi
b1130d0cc6 Overhauled loot generation
Dimensional dungeon loot chests are now registered with Forge. Other
mods can tap into our chests and our own generation is cleaner. The list
of items in our chests is generated in DDLoot.
2013-06-14 15:22:22 -04:00
StevenRS11
44a413f6fb Fixed monlith sound and spawn 2013-06-14 15:21:38 -04:00
SenseiKiwi
6fb05c9be5 Corrections and additions to config properties
Corrected typos in the names of two properties. Added properties for
toggling each item in our mod as dimensional dungeon loot. These
properties are not being used yet, but my next commit will actually
integrate them.
2013-06-14 13:12:39 -04:00