Fixed PocketBuilder and More

1. Changed DungeonSchematic to use an external instance of Random rather
than initializing its own.
2. Created the Pair class, a strongly-typed tuple that was needed in
PocketBuilder.
3. Added a missing calculation in NewDimData for setting the packDepth
field during dungeon initialization.
4. Finished code missing in PocketBuilder. Changes listed above were
needed for this.
This commit is contained in:
SenseiKiwi
2013-08-30 16:27:27 -04:00
parent 8e8346864e
commit 9930068775
4 changed files with 122 additions and 54 deletions

View File

@@ -0,0 +1,26 @@
package StevenDimDoors.mod_pocketDim.util;
public class Pair<P, Q>
{
//Pair is an implementation of a 2-tuple with generic parameters for strongly-typed elements.
//It's used instead of Minecraft's Tuple type because Tuple doesn't have strongly-typed elements.
private P first;
private Q second;
public Pair(P first, Q second)
{
this.first = first;
this.second = second;
}
public P getFirst()
{
return first;
}
public Q getSecond()
{
return second;
}
}