예제 #1
0
 private static void MakeSign(int x, int y, int z, string strSignText, int intBlockAgainst)
 {
     bm.SetID(x, y, z, (int)BlockType.WALL_SIGN);
     Substrate.TileEntities.TileEntitySign tes = new Substrate.TileEntities.TileEntitySign();
     string[] strRandomSign = strSignText.Split('|');
     for (int a = 0; a <= 3; a++)
     {
         while (strRandomSign[a].Length < 12)
         {
             strRandomSign[a] += ' ';
             if (strRandomSign[a].Length < 12)
             {
                 strRandomSign[a] = ' ' + strRandomSign[a];
             }
         }
     }
     tes.Text1 = strRandomSign[0];
     tes.Text2 = strRandomSign[1];
     tes.Text3 = strRandomSign[2];
     tes.Text4 = strRandomSign[3];
     bm.SetTileEntity(x, y, z, tes);
     bm.SetData(x, y, z, BlockShapes.BlockDirection(x, y, z, intBlockAgainst));
 }