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
+ var airBlocksQuery = from airyBlock in ClientAPI.World.Blocks
+ where airyBlock.MatterState == EnumMatterState.Solid
+ where airyBlock.BlockMaterial == EnumBlockMaterial.Plant || airyBlock.BlockMaterial == EnumBlockMaterial.Leaves
+ where airyBlock.CollisionBoxes == null || airyBlock.CollisionBoxes.Length == 0
+ select airyBlock;
+ //^^ 'Solid' phase - 'Plant' Blocks without any boundg box ? Except water...
+ this.AiryIdCodes = airBlocksQuery.ToDictionary(aBlk => aBlk.BlockId, aBlk => aBlk.Code.Path);
+ //Add special marker types for BlockID's of "Interest", overwrite colour, and method
Reload_POI_Designators();
}