public static ushort RainHeight2DMap(this IMapChunk mapChunk, int x, int y, int chunkSize = 32)
{
- int index = y % chunkSize * chunkSize + x % chunkSize;
+ //int num = posZ % this.chunksize * this.chunksize + posX % this.chunksize;
+ int index = (y % chunkSize) * chunkSize + (x % chunkSize);
return mapChunk.RainHeightMap[index];
}
{
#if DEBUG
- CoreApi.World.Logger.VerboseDebug(" World Blocks [Count: {0}]", CoreApi.World.Blocks.Count);
+ //CoreApi.World.Logger.VerboseDebug(" World Blocks [Count: {0}]", CoreApi.World.Blocks.Count);
#endif
//If Brute force won't work; use GROOT FORCE!
//var theBlock = ClientApi.World.BlockAccessor.GetBlock(0);
}
#if DEBUG
- CoreApi.World.Logger.VerboseDebug("Block gaps: {0}", emptyCount);
+ //CoreApi.World.Logger.VerboseDebug("Block gaps: {0}", emptyCount);
#endif
}
AutomapMod ownMod = ownApi.ModLoader.GetModSystem<AutomapMod>( );
return ownMod.Mod;
}
-
+
+
+ public static bool EndsWith(this AssetLocation asset, string domain, string endPath)
+ {
+ return asset.Domain.Equals(domain,StringComparison.InvariantCultureIgnoreCase) && asset.Path.EndsWith(endPath, StringComparison.InvariantCultureIgnoreCase);
+ }
}
}