Commit graph

20 commits

Author SHA1 Message Date
StevenRS11
60972eab21 Prevented 'overworld not loaded' crash, temp fix 2013-06-25 09:15:19 -04:00
SenseiKiwi
a628f3c63b Fixed Bug in RiftGenerator
Fixed a small bug. DDProperties.WorldRiftGenerationEnabled is supposed
to control whether rifts and gateways generate outside of Limbo. I
assume that rifts and gateways are always supposed to generate in Limbo
given the wording of that description. However, if the flag was set to
false, we would also disable rift generation in Limbo. I've fixed this
by ignoring that flag if we detect that the chunk is in Limbo.
2013-06-18 13:34:03 -04:00
SenseiKiwi
654a479692 Improved Gateway and Rift Generation
Added checks for the material that a gateway is being built upon. Now
gateways no longer generate on top of trees. Combined with multiple
generation attempts, there is a good chance that they will find a gap
between trees to generate at ground level. I also added checks to stop
gateways and rifts from generating on top of the Nether's bedrock.
2013-06-17 05:40:35 -04:00
SenseiKiwi
e7b064e3cb Fixed Gen Directionality Bug and Minor Tweak
I fixed a subtle bug in RiftGenerator. The code for picking random
coordinates on the surface of a chunk would subtract a random amount
from the coordinate of the chunk's corner. Unfortunately, subtracting
meant that we would almost always generate coordinates OUTSIDE the
intended chunk. The correct calculation was to add, not subtract. This
meant that if you walked in a direction in which our gateways were
generated outside of existing chunks, then their data would be lost and
no gateways would generate!

To reproduce this bug, max out the chance of generating gateways and fly
in the direction that decreases X and Z. You must fly into new chunks.
After passing the gateways produced when you spawn (if this is a new
world) you'll see that gateways don't generate on the landscape.
However, if you change directions, they'll begin generating again.

In addition to fixing that bug, I also tweaked all the block setting
calls in RiftGenerator so that they'll trigger block updates and send
update packets to the client. I think triggering block updates will
prevent unusual problems with floating sand, gravel, etc.
2013-06-17 03:38:10 -04:00
SenseiKiwi
4ceace1b47 Added retrying on Rift Gateway generation
Added a loop that allows RiftGenerator to retry generating a gateway if
it picks an invalid location for it. It has a limited number of tries
before it gives up and doesn't generate a gateway. I haven't added the
logic for avoiding generating on top of trees, but that'll be easy to
add now.
2013-06-17 03:20:00 -04:00
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
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
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
StevenRS11
cd4679c8fd configurable rift gen and monolith spawn density 2013-06-16 02:59:02 -04:00
SenseiKiwi
b11354767d Overhauled configuration properties
Moved all configuration variables from mod_pocketDim to DDProperties
(formerly DimDoorsConfig). Changed property names to be clearer in
config file, modified some comments, and generally cleaned up the config
file. Fixed some missing properties and variables that were reading from
the wrong properties. Modified the order in which mod_pocketDim
instantiated some of its static fields so that they would load after
properties are read. Almost all classes load after properties are read.
Fixed indentation across various files and replaced references to
properties in mod_pocketDim with references to DDProperties.
2013-06-13 19:01:54 -04:00
StevenRS11
bd1c1d0118 finished update, starting testing builds 2013-06-10 17:03:52 -04:00
StevenRS11
b97eab46b5 rebuilt how rifts get dungeon data assigned to them 2013-06-03 20:56:15 -04:00
StevenRS11
7c4feff0ea redid orientation handling, works better now.
Vastly improved y level detection for teleports
2013-05-03 19:34:01 -04:00
StevenRS11
3579070eb9 Moved file structure around a bit, and added stabilized rift sig
fixed XP bug moving through doors
made items shut doors again

Signed-off-by: StevenRS11 <stevenrs11@aol.com>
2013-04-16 20:48:49 -04:00
StevenRS11
fc45767963 Signed-off-by: StevenRS11 <stevenrs11@aol.com> 2013-03-29 18:19:27 -04:00
StevenRS11
c4172804d0 Signed-off-by: StevenRS11 <steven.r.stafford.ii.14@dartmouth.edu> 2013-03-18 18:42:56 -04:00
StevenRS11
c39b8cb97e Fixed config option not changing properly
Signed-off-by: StevenRS11 <stevenrs11@aol.com>
2013-02-26 11:29:17 -05:00
StevenRS11
9495c4cf36 Fixed world generation bug with mods that add other dims
Signed-off-by: StevenRS11 <stevenrs11@aol.com>
2013-02-21 16:27:51 -05:00
StevenRS11
7084d88aa0 Signed-off-by: StevenRS11 <stevenrs11@aol.com> 2013-02-17 21:46:16 -05:00