OSDN Git Service

Filter grass blocks from heightmap
[automap/automap.git] / Automap / Subsystems / AutomapSystem.cs
index 3420e4d..fef3886 100644 (file)
@@ -48,6 +48,7 @@ namespace Automap
                internal Dictionary<int, BlockDesignator> BlockID_Designators { get; private set; }
                internal Dictionary<AssetLocation, EntityDesignator> Entity_Designators { get; private set; }
                internal Dictionary<int, string> RockIdCodes { get; private set; }
+               internal Dictionary<int, string> AiryIdCodes { get; private set; }
 
                internal CommandType CurrentState { get; set; }
                //Run status, Chunks processed, stats, center of map....
@@ -321,6 +322,7 @@ namespace Automap
                        this.BlockID_Designators = new Dictionary<int, BlockDesignator>();
                        this.Entity_Designators = new Dictionary<AssetLocation, EntityDesignator>();
                        this.RockIdCodes = Helpers.ArbitrarytBlockIdHunter(ClientAPI, new AssetLocation(GlobalConstants.DefaultDomain, "rock-"), EnumBlockMaterial.Stone);
+                       this.AiryIdCodes = Helpers.ArbitrarytBlockIdHunter(ClientAPI, new AssetLocation(GlobalConstants.DefaultDomain, "tallgrass-"), EnumBlockMaterial.Plant);
 
                        //Add special marker types for BlockID's of "Interest", overwrite colour, and method
 
@@ -613,7 +615,7 @@ namespace Automap
 
                                                int aBlockId = worldChunk.Blocks[indicie];
 
-                                               if (aBlockId == 0) {//Air
+                                               if (aBlockId == 0 || AiryIdCodes.ContainsKey(aBlockId)) {//Airy blocks,,,
                                                chunkMeta.AirBlocks++;
                                                continue;
                                                }