Properly serialize and deserialize the Dungeon rooms
This commit is contained in:
parent
9b64e2a2f6
commit
61b11a88bf
9 changed files with 176 additions and 38 deletions
|
@ -25,6 +25,8 @@ public class Dungeon
|
|||
{
|
||||
public static boolean placeStructureAtPosition(Random rand, WorldServer world, BlockPos pos)
|
||||
{
|
||||
long startTime = System.nanoTime();
|
||||
|
||||
Map<EnumFacing, List<BlockPos>> availableDoorMap = new HashMap<EnumFacing, List<BlockPos>>(); //Map of doors. The EnumFacing indicates what way this door faces.
|
||||
List<AreaDescriptor> descriptorList = new ArrayList<AreaDescriptor>();
|
||||
Map<BlockPos, Pair<DungeonRoom, PlacementSettings>> roomMap = new HashMap<BlockPos, Pair<DungeonRoom, PlacementSettings>>(); // Placement positions in terms of actual positions
|
||||
|
@ -158,6 +160,11 @@ public class Dungeon
|
|||
}
|
||||
}
|
||||
|
||||
long endTime = System.nanoTime();
|
||||
|
||||
long duration = (endTime - startTime); //divide by 1000000 to get milliseconds.
|
||||
System.out.println("Duration: " + duration + "(ns), " + duration / 1000000 + "(ms)");
|
||||
|
||||
//Building what I've got
|
||||
for (Entry<BlockPos, Pair<DungeonRoom, PlacementSettings>> entry : roomMap.entrySet())
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue