fCraft.Map.GetEdgeTexture C# (CSharp) Method

GetEdgeTexture() private method

private GetEdgeTexture ( Block block ) : string
block Block
return string
        internal static string GetEdgeTexture( Block block )
        {
            string result;
            if ( BlockEdgeTextures.TryGetValue( block, out result ) ) {
                return result;
            } else {
                return null;
            }
        }

Usage Example

Example #1
0
        public string GenerateWoMConfig(bool sendMotd)
        {
            StringBuilder sb = new StringBuilder();

            sb.AppendLine("server.name = " + ConfigKey.ServerName.GetString());
            if (sendMotd)
            {
                sb.AppendLine("server.detail = " + ConfigKey.MOTD.GetString());
            }
            else
            {
                sb.AppendLine("server.detail = " + ClassyName);
            }
            sb.AppendLine("user.detail = World " + ClassyName);
            if (CloudColor > -1)
            {
                sb.AppendLine("environment.cloud = " + CloudColor);
            }
            if (FogColor > -1)
            {
                sb.AppendLine("environment.fog = " + FogColor);
            }
            if (SkyColor > -1)
            {
                sb.AppendLine("environment.sky = " + SkyColor);
            }
            if (EdgeLevel > -1)
            {
                sb.AppendLine("environment.level = " + EdgeLevel);
            }
            if (Terrain != null)
            {
                sb.AppendLine("environment.terrain = " + Terrain);
            }
            if (EdgeBlock != Block.Water)
            {
                string edgeTexture = Map.GetEdgeTexture(EdgeBlock);
                if (edgeTexture != null)
                {
                    sb.AppendLine("environment.edge = " + edgeTexture);
                }
            }
            if (SideBlock != Block.Admincrete)
            {
                string sideTexture = Map.GetEdgeTexture(SideBlock);
                if (sideTexture != null)
                {
                    sb.AppendLine("environment.side = " + sideTexture);
                }
            }
            sb.AppendLine("server.sendwomid = true");
            return(sb.ToString());
        }
All Usage Examples Of fCraft.Map::GetEdgeTexture