OSDN Git Service

W.I.P. Improved slope shading
[automap/automap.git] / Automap / Helpers.cs
index 52fd3f7..2aa7d3b 100644 (file)
@@ -94,6 +94,11 @@ namespace Automap
             return whichever;
         }
 
+               public static ushort RainHeight2DMap(this IMapChunk mapChunk, int x, int y, int chunkSize = 32)
+               {
+                       int index = y % chunkSize * chunkSize + x % chunkSize;
+                       return mapChunk.RainHeightMap[index];
+               }
 
 
         /// <summary>
@@ -160,7 +165,11 @@ namespace Automap
             return arbBlockIDTable;
         }
 
-
+               public static Mod Self(this ICoreClientAPI ownApi)
+               {
+               AutomapMod ownMod = ownApi.ModLoader.GetModSystem<AutomapMod>( );
+               return ownMod.Mod;
+               }
                       
     }
 }