Commit graph

353 commits

Author SHA1 Message Date
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
SenseiKiwi
bfc532da1f Renamed and Moved Files
Moved CommonTickHandler into the ticking package in preparation for the
next change. Renamed CommandStartDungeonCreation to CommandCreatePocket,
since creation pockets of variable sizes will be its future role now
that it's not strictly necessary for exporting. Renamed
CommandEndDungeonCreation to CommandExportDungeon, since we no longer
have a dungeon creation process like before.
2013-07-26 02:09:14 -04:00
SenseiKiwi
03b727881a Minor Change
Minor change. Renamed all the functions in LimboDecay to begin with
lowercase letters, as is the usual style for Java development. It
slipped my mind for some reason. Uppercase starting letters is the usual
style for C# development.
2013-07-26 01:58:35 -04:00
SenseiKiwi
1b8d2aed53 Removed dd-create Requirement for Exporting
Removed the code in DungeonHelper and CommandEndDungeonCreation that
would force the player to use "override" with when exporting dungeons
that DD did not recognized as having been built in custom dungeon
pockets. This restriction is no longer necessary now that we don't need
pockets with standardized orientations or Eternal Fabric boundaries.
2013-07-26 01:57:18 -04:00
SenseiKiwi
960f9af1a8 Added Support for doMobSpawning Game Rule
Added support for the doMobSpawning game rule. Jaitsu requested this so
that he could disable Monoliths while testing the mod. I think it's a
fair idea - you can't disable Monoliths without also disabling every
other mob except the animals.
2013-07-26 01:09:46 -04:00
SenseiKiwi
984755f920 Reduced Frequency of Fast Limbo Decay Operations
Added an interval to CommonTickHandler so that fast decay operations are
performed less frequency. The previous rate was unnecessarily fast. This
will also reduce the performance impact of fast decay considerably,
although testers did not report any noticeable performance decreases.
2013-07-25 23:54:30 -04:00
SenseiKiwi
43d5d6ea51 Minor Change
Minor change. Changes comments in LimboDecay slightly so that they act
as Javadoc comments instead. That was my original intention.
2013-07-25 21:47:56 -04:00
SenseiKiwi
d923e98942 Reimplemented Limbo Decay
Reimplemented Limbo Decay in two forms. Firstly, Unraveled Fabric
accepts random ticks now and has a 50% chance of searching the 6 blocks
against its faces for blocks to decay. The average time for this decay
to occur is about 2 minutes and 17 seconds. The decay progresses a
little slowly because of having to go through stages. We might want to
consider decaying straight into Unraveled Fabric, or at least having
fewer stages. This approach is better than randomly decaying isolated
blocks because it looks like decay is spreading from the Unraveled
Fabric.

Secondly, every tick, we pick a random block from each active section in
Limbo and turn it into Unraveled Fabric immediately. Note that a section
is a 16x16x16 block cube inside a chunk. This is "fast decay", and it's
meant to stop players from avoiding Limbo decay by building floating
structures. It's not immediately obvious if you place a single block,
but if you build a 5x5 block platform, the average time for some block
to get converted drops to about 8 seconds, and it spreads from there.

Most of the logic for this is in a new class: LimboDecay. It's worth
studying whether this new implementation affects Minecraft's
performance. I'm not completely sure whether that would be an issue. The
frequency of either decay type can be decreased to improve performance.
2013-07-25 17:25:43 -04:00
SenseiKiwi
9da6304dc9 Reorganized Code in CommonTickHandler
Reorganized code in CommonTickHandler. Should be a little more readable
now. This is in preparation for reimplementing Limbo decay.
2013-07-25 01:38:58 -04:00
SenseiKiwi
98162f2839 Removed Limbo Decay
Removed the code associated with Limbo decay from EventHookContainer,
LimboBlock, and CommonTickHandler. DimHelper still has blocksToDecay
since removing it could cause deserialization failures. However, nothing
should actually use that list. I also removed several unused or
redundant methods (e.g. overriding methods and putting in exactly the
same code as in the super class), fixed indentation and renamed cryptic
variables. We should have a rule against allowing cryptic variable names
like "par2", even if they're inherited from Forge. I'll implement proper
limbo decay in the next commit.
2013-07-25 00:12:13 -04:00
SenseiKiwi
272b125282 Minor Change
Added a note on a strange condition in EventHookContainer.
2013-07-24 23:31:15 -04:00
SenseiKiwi
84cfa9904c Fixed Export Height Bug
Fixed a bug in DungeonHelper that could cause dungeons to get clipped
during export if they extend past Y = 127. We used
world.getActualHeight() to obtain the height of the pocket, which should
be 256, but getActualHeight() returns 128 for dimensions with no sky.
Pocket dimensions are set to have no sky, so this becomes an issue.
2013-07-24 20:17:56 -04:00
SenseiKiwi
eb9c8822d9 Fixed NullPointerException in yCoordHelper
I believe I've fixed the cause of a NullPointerException that some
players have been experiencing. It seems to have been caused by
unregistered block IDs being present in Limbo. Possibly because people
removed mods and they had generated structures in Limbo. Or the players
had placed blocks and then removed the mods, or changed block IDs
around.

This fixes issue #47.
2013-07-24 15:34:21 -04:00
SenseiKiwi
7044d80457 Added Support for Hopper Metadata Rotation
Added code for SchematicLoader so that hoppers will rotate properly.
This was probably not considered an issue before we had support for tile
entity exports and imports. Now it's critical that we support hoppers.
There are other blocks that are still not supported - we should really
fix this in the future so that all blocks will rotate. The code for this
is overly complicated - we should look into a simpler method.
2013-07-19 09:28:54 -04:00
SenseiKiwi
8be0c9f1d2 Merge remote-tracking branch 'upstream/master' 2013-07-19 07:24:35 -04:00
SenseiKiwi
0b8a81ef6d Fixed Explosion Resistance Bug
Fixed Ancient Fabric and Eternal Fabric being vulnerable to explosions.
I also noticed that a lot of DD blocks have unusual stats. I'm not sure
whether those stats were assigned intentionally or simply because of
copying and pasting code, but the values are certainly counterintuitive
when you consider some of the block materials.
2013-07-19 07:24:11 -04:00
StevenRS11
45e6e5ac0d fixed build.xml 2013-07-18 14:39:02 -04:00
StevenRS11
3050dc9d1f Chnaged dungeon 2013-07-18 14:30:21 -04:00
StevenRS11
c0ac76cdfe Added dungeons and fixed monolith placement bug 2013-07-18 01:20:12 -04:00
StevenRS11
3654c10af1 finally 2013-07-17 03:49:39 -04:00
StevenRS11
0ca043cbfd and again 2013-07-17 03:48:52 -04:00
StevenRS11
ac219078ba texture fix 2013-07-17 03:42:33 -04:00
StevenRS11
54e8168bde fixing texture 2013-07-17 03:42:11 -04:00
StevenRS11
216c99e3e5 Merge pull request #43 from SenseiKiwi/master
Added New Dungeons and Fixed Various Minor Bugs
2013-07-17 00:02:10 -07:00
StevenRS11
c6989555a0 Merge pull request #42 from Unrepentant-Atheist/patch-1
Update mod_pocketDim.java
2013-07-16 22:58:43 -07:00
SenseiKiwi
71b9ce263a Added New Dungeons
Added 12 new dungeons to the mod. Integrated them to
registerBaseDungeons() so that they should generate like all the other
base dungeons.
2013-07-17 01:45:41 -04:00
SenseiKiwi
bd8a62b522 Removed setTickRandomly(true)
Removed setTickRandomly(true) from BlockDimWall and BlockDimWallPerm. It
was invoked in their constructors but no longer necessary.
2013-07-16 23:57:45 -04:00
SenseiKiwi
a887dfc819 Fixed Ancient Fabric Replacement Bug
Fixed a bug in BlockDimWall that would allow players to replace Ancient
Fabric by right clicking on it with a block in-hand, in the same way as
Fabric of Reality can be replaced. That would've defeated their purpose.
2013-07-16 23:37:00 -04:00
SenseiKiwi
71adfa2358 Fixed Fabric of Reality Replacement Bug
Fixed the bug in BlockDimWall that would cause Fabric of Reality to
replace itself when you right-clicked to place FoR against an FoR
surface. This happened because we considered FoR valid for replacing FoR
since it's a cube solid. Now we have an extra check to prevent that. It
was a waste of blocks to have them sort of eat each other up! Also
cleaned up some of the code in BlockDimWall.
2013-07-16 18:39:11 -04:00
SenseiKiwi
d805d63c0a Fixed Metadata Issue in SchematicLoader
I modified the way SchematicLoader handles blocks with metadata.
Previously, we would always copy metadata over without additional
checks. If we converted a mod block into Fabric of Reality, metadata
would have no effect because FoR did not have subtypes. Now that FoR has
subtypes, loading metadata blindly could cause unexpected effects, such
as generating Ancient Fabric instead of FoR. I changed the code so that
we only count a block as "changed" if we change its block ID and we
don't want to preserve the original metadata. In that case, the metadata
is set to 0.
2013-07-16 18:06:27 -04:00
SenseiKiwi
c4f0a16af8 Minor Change to SchematicLoader
Changed transformMetadata() from a public instance function to a private
static function. I was curious as to whether it was being used by code
outside SchematicLoader. The code compiles so it must be local-only. In
the future, when we switch from using this function to the rotation
class, the compiler will warn us that this function is no longer being
used. Then we'll remember to remove it.
2013-07-16 17:54:38 -04:00
SenseiKiwi
f132153cf4 Renamed Blocks and Minor Changes
Renamed block 1973:1 to Ancient Fabric. Renamed block 220 to Eternal
Fabric. I assigned new names so that we didn't need to use the long ones
we had before (e.g. "Fabric of Reality Permanent/Pushable"). Also
removed unused imports from various classes along the way.
2013-07-16 17:52:26 -04:00
SenseiKiwi
6598618370 Merge remote-tracking branch 'upstream/master' into R1.4.0-improvements 2013-07-16 17:20:09 -04:00
StevenRS11
ea1ea8a265 fixed some naming 2013-07-16 17:14:56 -04:00
SenseiKiwi
b6e0a5131e Merge remote-tracking branch 'upstream/master' into R1.4.0-improvements 2013-07-16 17:01:45 -04:00
SenseiKiwi
ab05db40fe Additional Fixes
Removed unused import from DDProperties. Changed argument lists of
CommandDeleteRifts, CommandDeleteAllLinks, and
CommandDeleteDimensionData to read "???" since we want to get this
update out and those commands are used infrequently. We'll fix them to
have proper information for the next update.
2013-07-16 17:00:25 -04:00
StevenRS11
26c16db59c renamed dungeons pending changes to loading 2013-07-16 16:59:22 -04:00
SenseiKiwi
f97b40f2c5 Minor Style Changes and Fixes
Made some minor changes such as removing unused imports and fixing up
code to remove warnings. Stop calling static methods as if they were
instance methods!!! @_@
2013-07-16 16:54:48 -04:00
SenseiKiwi
103287461e Merge remote-tracking branch 'upstream/master' into R1.4.0-improvements 2013-07-16 16:43:04 -04:00
Unrepentant-Atheist
495aa19a73 Update mod_pocketDim.java 2013-07-16 11:30:29 +02:00
StevenRS11
db9bb02b43 FoR changes
Added a metaData block to FoR, meta 1 acts like permafabric but can be
pushed with pistons. Fixed a bug where permafabric could be pushed by
pistons.
2013-07-16 03:00:57 -04:00
SenseiKiwi
f2f0abc8d9 Minor Change
Removed a comment from SchematicLoader.transformPoint() that is no
longer relevant. It refers to counterclockwise rotations even though our
rotations are commented as clockwise now.
2013-07-15 21:38:52 -04:00
StevenRS11
c2acfdfd1b Merge branch 'master' of https://github.com/StevenRS11/DimDoors 2013-07-15 18:15:22 -04:00
StevenRS11
a24aefb522 changes to sound 2013-07-15 18:15:10 -04:00
StevenRS11
9725c96592 Merge pull request #41 from SenseiKiwi/master
Implemented Importing and Exporting Tile Entities; Additional Improvements
2013-07-15 15:08:53 -07:00
SenseiKiwi
f350b0d17c Merge remote-tracking branch 'upstream/master' into R1.4.0-improvements 2013-07-15 17:03:03 -04:00
SenseiKiwi
3e096c0074 Minor Change
Removed a comment from Point3D. We don't need to cache hashes since
HashMap does so internally.
2013-07-15 17:00:09 -04:00
SenseiKiwi
1ac934b5e4 Added Support for Importing Tile Entities
Added code to SchematicLoader so that we can import tile entities. Empty
chests and dispensers will still be filled as before.
2013-07-15 16:58:44 -04:00
SenseiKiwi
888e6fe590 Fixed Bug in CommandEndDungeonCreation
Fixed a simple bug that caused dd-export to ask the user to use
'override' even though it was already being used.
2013-07-15 12:56:32 -04:00