Example #1
0
 public void SetUp()
 {
     var world = new TrueCraft.Core.World.World();
     var assemblyDir = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
     Region = new Region(Coordinates2D.Zero, world,
         Path.Combine(assemblyDir, "Files", "r.0.0.mca"));
 }
Example #2
0
 private Region LoadOrGenerateRegion(Coordinates2D coordinates)
 {
     if (Regions.ContainsKey(coordinates))
         return (Region)Regions[coordinates];
     Region region;
     if (BaseDirectory != null)
     {
         var file = Path.Combine(BaseDirectory, Region.GetRegionFileName(coordinates));
         if (File.Exists(file))
             region = new Region(coordinates, this, file);
         else
             region = new Region(coordinates, this);
     }
     else
         region = new Region(coordinates, this);
     lock (Regions)
         Regions[coordinates] = region;
     return region;
 }
Example #3
0
 public void SetUp()
 {
     var world = new TrueCraft.Core.World.World();
     Region = new Region(Coordinates2D.Zero, world, "Files/r.0.0.mca");
 }