Commit graph

85 commits

Author SHA1 Message Date
StevenRS11
2203239c81 Merging changes 2013-09-30 00:41:12 -04:00
StevenRS11
f47a9d8b99 Added orientation to linkdata and door regen 2013-09-30 00:21:52 -04:00
StevenRS11
78785047af Gold door completed, doors check for obstructions 2013-09-11 00:22:16 -04:00
StevenRS11
08b36054ce Gold dim door working
Needs to gen the right type of door.
2013-09-10 15:50:15 -04:00
StevenRS11
52aa836f75 Added gold dim doors, fixes
Deleted the sun and adding gold dim doors
2013-09-10 04:32:19 -04:00
StevenRS11
79349e9add Fixed door collision for minecarts 2013-09-09 16:47:47 -04:00
SenseiKiwi
9fec41f906 Minor Change
Renamed IDimDoor.placeDimDoor() to placeLink(), since that's what it's
actually being used for in our doors. Saying it places the door itself
is confusing.
2013-09-08 21:05:06 -04:00
SenseiKiwi
156c61a772 Improved DDTeleporter
Made a minor change to DDTeleporter - added a flag so that we can
specify that entities must be teleported to the destination without
trying to shift them around based on destination orientation. This is
important for the trapdoor, since otherwise entities might get shoved
into walls. Also cleaned up some code in DDTeleporter. It's much more
readable now. These changes are in preparation for completing Trans
Trapdoor destination selection.
2013-09-08 21:01:38 -04:00
SenseiKiwi
fc6dd63573 Minor Change
Renamed TransTrapdoor.isTrapdoorOnBlock() to
TransTrapdoor.isTrapdoorSetLow() so it would be easier to understand
what it indicates.
2013-09-08 16:48:16 -04:00
SenseiKiwi
4501e9373f Finished Merging Changes to Trapdoor
Merged together the different changes we had made to Transdimensional
Trapdoors. Cleaned up the rendering and tile entity code a bit, it
should be a little more understandable now.
2013-09-08 16:45:28 -04:00
SenseiKiwi
de5ef3b85f Renamed TileEntityDimHatch
Renamed TileEntityDimHatch to TileEntityTransTrapdoor. That matches the
name of the item we use in other parts of DD's code.
2013-09-08 15:31:17 -04:00
SenseiKiwi
72213de437 Minor Change
Removed unused import in TransTrapdoor
2013-09-08 15:22:19 -04:00
SenseiKiwi
672c19b032 Improved Dim Door Collision Detection
Improved our code for checking whether an entity in contact with a door
should be teleported. Now the check works better, works for Minecarts,
and is more readable. It also ignores particle effect entities.
2013-09-08 15:22:03 -04:00
StevenRS11
8dc47e8bef Added rendering effect to dimHatch 2013-09-08 02:49:36 -04:00
SenseiKiwi
f83841a142 Fixed Transdimensional Trapdoor
Got the Transdimensional Trapdoor working again. Renamed the file to
TransTrapdoor and trimmed off unnecessary code - BlockTrapDoor
implements a lot of the necessary logic. Implemented IDimDoor for
clarity.
2013-09-07 23:27:07 -04:00
SenseiKiwi
7280b54c47 Updated BlockRotator
Updated BlockRotator to check if a block is an instance of DoorBlock
instead of checking for BaseDimDoor - since we changed BaseDimDoor to
derive from DoorBlock, the latter check is no longer needed.
2013-09-07 22:16:47 -04:00
StevenRS11
87343b45ee Doors are finally doors, not chests! 2013-09-07 20:20:29 -04:00
SenseiKiwi
a0454351d5 Cleaned Up Code
Deleted PlayerRespawnTracker and removed all references to it - we
weren't going to use it anymore anyway. Renamed IDDoorLogic to IDimDoor
- abbreviating the "Dim" as D next to the standard I for Interface is
confusing. Renamed DDoorBase to BaseDimDoor and made it into an abstract
class - that's effectively what it was supposed to be. We should be
declaring methods as abstract rather than using empty ones. I renamed
the class because the convention for naming abstract classes is to start
the name with Base. Cleaned up code in other files.
2013-09-06 20:57:00 -04:00
StevenRS11
cff13e9bb5 Changed limbo trips to never kill the player
Solves the player not getting inventory back, especially for special
slots.
2013-09-06 15:36:12 -04:00
StevenRS11
6512327ee8 Cleaned up door code
More to come, but this helps a little. Should make changing dim door
behavior much easier.
2013-09-06 02:07:47 -04:00
SenseiKiwi
1dfa5817bf Moved DDTeleporter
Moved DDTeleporter to the mod_pocketDim.core package. It seemed
reasonable given that DDTeleporter is closely tied to how Dimensional
Doors works. It controls the most critical feature for all items -
teleportation - and handles routing requests to initialize link
destinations.
2013-09-05 16:31:32 -04:00
SenseiKiwi
b9fcfea877 Fixed Various Bugs
Fixed various minor bugs affecting transient doors and teleportation.
2013-09-04 00:34:11 -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
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
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
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
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
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
643785022a reverted rift rendering
sadface
2013-08-22 22:10:10 -04:00
StevenRS11
eaab6d6b83 Merge branch 'master' of https://github.com/StevenRS11/DimDoors 2013-08-22 16:11:53 -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
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
StevenRS11
d9a9091a2b changes to RiftRender 2013-08-20 21:43:33 -04: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
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
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
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
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
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
80968f9abf Fixed falling damage persisting after teleport 2013-07-30 20:19:00 -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
687a75f4d5 Overhauled Tick Sending by CommonTickHandler
Overhauled the way in which CommonTickHandler triggers tick-based
actions such as Limbo decay, spawning Monoliths, and regenerating rifts.
Now CommonTickHandler implements an interface called IRegularTickSender,
which indicates that it will periodically call on classes that implement
IRegulatTickReceiver to perform some task. I added classes for each
regularly scheduled task we were performing: MonolithSpawner and
RiftRegenerator, plus converted LimboDecay to a normal class instead of
a static class.  Modified several classes so that they have access to
the MonolithSpawner instance to request MonolithSpawning when needed.
This improves the structure of our code and gets us away from the way we
did things before, which was accessing a public static list inside
CommonTickHandler from other classes and adding arrays to specify chunk
coordinates. We should not be exposing the internal state of classes
like that! And we should be using clearly defined objects to pass
information.
2013-07-26 05:15:44 -04:00